Skip to content

Commit

Permalink
Fix/158 Add Min php version for WithConsecutiveRector rule (#258)
Browse files Browse the repository at this point in the history
Co-authored-by: Erison Silva <[email protected]>
  • Loading branch information
eerison and Erison Silva authored Sep 18, 2023
1 parent 2a9734a commit 0636ef2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Rector/StmtsAwareInterface/WithConsecutiveRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\Return_;
use Rector\Core\Rector\AbstractRector;
use Rector\Core\ValueObject\PhpVersionFeature;
use Rector\PHPUnit\NodeAnalyzer\TestsNodeAnalyzer;
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;

/**
* @see \Rector\PHPUnit\Tests\Rector\StmtsAwareInterface\WithConsecutiveRector\WithConsecutiveRectorTest
*/
final class WithConsecutiveRector extends AbstractRector
final class WithConsecutiveRector extends AbstractRector implements MinPhpVersionInterface
{
public function __construct(
private readonly TestsNodeAnalyzer $testsNodeAnalyzer
Expand Down Expand Up @@ -177,4 +179,9 @@ private function matchAndRefactorExpectsMethodCall(Expression $expression): ?Met

return $exactlyMethodCall;
}

public function provideMinPhpVersion(): int
{
return PhpVersionFeature::MATCH_EXPRESSION;
}
}

0 comments on commit 0636ef2

Please sign in to comment.