Skip to content

Commit 018e5dd

Browse files
committed
These handlers are not for first class callables
1 parent 2b5c2e6 commit 018e5dd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Analyser/Generator/ExprHandler/FuncCallHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(private ReflectionProvider $reflectionProvider)
3131

3232
public function supports(Expr $expr): bool
3333
{
34-
return $expr instanceof FuncCall;
34+
return $expr instanceof FuncCall && !$expr->isFirstClassCallable();
3535
}
3636

3737
public function analyseExpr(

src/Analyser/Generator/ExprHandler/MethodCallHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ final class MethodCallHandler implements ExprHandler
2626

2727
public function supports(Expr $expr): bool
2828
{
29-
return $expr instanceof MethodCall;
29+
return $expr instanceof MethodCall && !$expr->isFirstClassCallable();
3030
}
3131

3232
public function analyseExpr(

src/Analyser/Generator/ExprHandler/NewHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ final class NewHandler implements ExprHandler
2525

2626
public function supports(Expr $expr): bool
2727
{
28-
return $expr instanceof New_;
28+
return $expr instanceof New_ && !$expr->isFirstClassCallable();
2929
}
3030

3131
public function analyseExpr(

0 commit comments

Comments
 (0)