File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,12 @@ protected static function getFunctionName(CallExpression $node): ?string
87
87
case 'Identifier ' :
88
88
return $ callee ->getName ();
89
89
case 'MemberExpression ' :
90
- return $ callee ->getProperty ()->getName ();
90
+ $ property = $ callee ->getProperty ();
91
+
92
+ if ($ property ->getType () === 'Identifier ' ) {
93
+ return $ property ->getName ();
94
+ }
95
+ return null ;
91
96
default :
92
97
return null ;
93
98
}
Original file line number Diff line number Diff line change @@ -27,4 +27,7 @@ fn9(ARG_8);
27
27
/* No Related comment 4 */
28
28
) ;
29
29
} )
30
- fn13 ( fn14 ( fn15 ( 'foo' ) ) ) ;
30
+ fn13 ( fn14 ( fn15 ( 'foo' ) ) ) ;
31
+
32
+ // https://github.com/php-gettext/JS-Scanner/issues/3
33
+ var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol [ 'for' ] && Symbol [ 'for' ] ( 'react.element' ) || 0xeac7 ;
You can’t perform that action at this time.
0 commit comments