Skip to content

Commit 776ed64

Browse files
authored
Skip PHP version 5.6 or earlier
resolves rectorphp/rector#9691
1 parent 572e318 commit 776ed64

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rules/TypeDeclaration/Rector/ClassMethod/StrictStringParamConcatRector.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@
2424
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory;
2525
use Rector\Rector\AbstractRector;
2626
use Rector\VendorLocker\ParentClassMethodTypeOverrideGuard;
27+
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
2728
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
2829
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
2930

3031
/**
3132
* @see \Rector\Tests\TypeDeclaration\Rector\ClassMethod\StrictStringParamConcatRector\StrictStringParamConcatRectorTest
3233
*/
33-
final class StrictStringParamConcatRector extends AbstractRector
34+
final class StrictStringParamConcatRector extends AbstractRector implements MinPhpVersionInterface
3435
{
3536
public function __construct(
3637
private readonly ParentClassMethodTypeOverrideGuard $parentClassMethodTypeOverrideGuard,
@@ -73,6 +74,11 @@ public function getNodeTypes(): array
7374
return [ClassMethod::class, Function_::class, Closure::class];
7475
}
7576

77+
public function provideMinPhpVersion(): int
78+
{
79+
return PhpVersionFeature::SCALAR_TYPES;
80+
}
81+
7682
/**
7783
* @param ClassMethod|Function_|Closure $node
7884
*/

0 commit comments

Comments
 (0)