Skip to content

Commit 6658d75

Browse files
authored
[Php81] Fix missing implements MinPhpVersionInterface on FunctionLikeToFirstClassCallableRector (rectorphp#7501)
1 parent 3b1df04 commit 6658d75

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

rules/CodingStyle/Rector/FunctionLike/FunctionLikeToFirstClassCallableRector.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@
2020
use PHPStan\Analyser\Scope;
2121
use Rector\PHPStan\ScopeFetcher;
2222
use Rector\Rector\AbstractRector;
23+
use Rector\ValueObject\PhpVersionFeature;
24+
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
2325
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
2426
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
2527

2628
/**
2729
* @see \Rector\Tests\CodingStyle\Rector\FunctionLike\FunctionLikeToFirstClassCallableRector\FunctionLikeToFirstClassCallableRectorTest
2830
*/
29-
final class FunctionLikeToFirstClassCallableRector extends AbstractRector
31+
final class FunctionLikeToFirstClassCallableRector extends AbstractRector implements MinPhpVersionInterface
3032
{
3133
public function getRuleDefinition(): RuleDefinition
3234
{
@@ -238,4 +240,9 @@ private function isChainedCall(FuncCall|MethodCall|StaticCall $callLike): bool
238240

239241
return $callLike->var instanceof CallLike;
240242
}
243+
244+
public function provideMinPhpVersion(): int
245+
{
246+
return PhpVersionFeature::FIRST_CLASS_CALLABLE_SYNTAX;
247+
}
241248
}

0 commit comments

Comments
 (0)