Skip to content

Commit d1fd984

Browse files
authored
Use FullyQualified in DowngradeFirstClassCallableSyntaxRector (#1353)
1 parent e1fd9d2 commit d1fd984

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use PhpParser\Node\Expr\StaticCall;
1616
use PhpParser\Node\Identifier;
1717
use PhpParser\Node\Name;
18+
use PhpParser\Node\Name\FullyQualified;
1819
use PhpParser\Node\Scalar\String_;
1920
use PhpParser\Node\VariadicPlaceholder;
2021
use Rector\Core\Rector\AbstractRector;
@@ -96,6 +97,6 @@ private function createCallback(FuncCall|MethodCall|StaticCall $node): Expr
9697

9798
private function createClosureFromCallableCall(Expr $expr): StaticCall
9899
{
99-
return new StaticCall(new Name('\\Closure'), 'fromCallable', [new Arg($expr)]);
100+
return new StaticCall(new FullyQualified('Closure'), 'fromCallable', [new Arg($expr)]);
100101
}
101102
}

0 commit comments

Comments
 (0)