File tree Expand file tree Collapse file tree
rules/TypeDeclaration/Rector/FunctionLike Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,15 +72,15 @@ public function refactor(Node $node): ?Node
7272 return null ;
7373 }
7474
75- $ funcReflection = $ this -> reflectionResolver -> resolveFunctionLikeReflectionFromCall ( $ node );
75+ $ args = $ node -> getArgs ( );
7676
77- if (! $ funcReflection instanceof NativeFunctionReflection ) {
77+ if (! isset ( $ args [ 0 ]) || ! $ args [ 0 ]-> value instanceof Closure ) {
7878 return null ;
7979 }
8080
81- $ args = $ node -> getArgs ( );
81+ $ funcReflection = $ this -> reflectionResolver -> resolveFunctionLikeReflectionFromCall ( $ node );
8282
83- if (! isset ( $ args [ 0 ]) || ! $ args [ 0 ]-> value instanceof Closure ) {
83+ if (! $ funcReflection instanceof NativeFunctionReflection ) {
8484 return null ;
8585 }
8686
Original file line number Diff line number Diff line change @@ -76,15 +76,15 @@ public function refactor(Node $node): ?Node
7676 return null ;
7777 }
7878
79- $ funcReflection = $ this -> reflectionResolver -> resolveFunctionLikeReflectionFromCall ( $ node );
79+ $ args = $ node -> getArgs ( );
8080
81- if (! $ funcReflection instanceof NativeFunctionReflection ) {
81+ if (! isset ( $ args [ 1 ]) || ! $ args [ 1 ]-> value instanceof Closure ) {
8282 return null ;
8383 }
8484
85- $ args = $ node -> getArgs ( );
85+ $ funcReflection = $ this -> reflectionResolver -> resolveFunctionLikeReflectionFromCall ( $ node );
8686
87- if (! isset ( $ args [ 1 ]) || ! $ args [ 1 ]-> value instanceof Closure ) {
87+ if (! $ funcReflection instanceof NativeFunctionReflection ) {
8888 return null ;
8989 }
9090
You can’t perform that action at this time.
0 commit comments