Skip to content

Commit 7883d5d

Browse files
committed
Updated Rector to commit be60d74cdf29f3184d0c2b7b2ef70a3556eb0d0e
rectorphp/rector-src@be60d74 [ci] add rule validation to check code samples have at least one diff (#8067)
1 parent 848d154 commit 7883d5d

2 files changed

Lines changed: 39 additions & 3 deletions

File tree

rules/DeadCode/Rector/Class_/RemoveRefactorDuplicatedNodeInstanceCheckRector.php

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Rector\PHPStan\ScopeFetcher;
1919
use Rector\Rector\AbstractRector;
2020
use Rector\StaticTypeMapper\ValueObject\Type\ShortenedObjectType;
21+
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
2122
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
2223
use RectorPrefix202606\Webmozart\Assert\Assert;
2324
/**
@@ -40,7 +41,42 @@ public function __construct(PhpDocInfoFactory $phpDocInfoFactory, ValueResolver
4041
}
4142
public function getRuleDefinition(): RuleDefinition
4243
{
43-
return new RuleDefinition('Remove refactor() method of Rector rule double check of $classMethod instance, if already defined in @param type', []);
44+
return new RuleDefinition('Remove refactor() method of Rector rule double check of $classMethod instance, if already defined in @param type', [new CodeSample(<<<'CODE_SAMPLE'
45+
final class SomeRector extends AbstractRector
46+
{
47+
public function getNodeTypes(): array
48+
{
49+
return [ClassMethod::class];
50+
}
51+
52+
/**
53+
* @param ClassMethod $node
54+
*/
55+
public function refactor(Node $node)
56+
{
57+
if (! $node instanceof ClassMethod) {
58+
return null;
59+
}
60+
}
61+
}
62+
CODE_SAMPLE
63+
, <<<'CODE_SAMPLE'
64+
final class SomeRector extends AbstractRector
65+
{
66+
public function getNodeTypes(): array
67+
{
68+
return [ClassMethod::class];
69+
}
70+
71+
/**
72+
* @param ClassMethod $node
73+
*/
74+
public function refactor(Node $node)
75+
{
76+
}
77+
}
78+
CODE_SAMPLE
79+
)]);
4480
}
4581
public function getNodeTypes(): array
4682
{

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '07451c9670374512c1692c8b51c7a4b0af0905be';
22+
public const PACKAGE_VERSION = 'be60d74cdf29f3184d0c2b7b2ef70a3556eb0d0e';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2026-06-20 14:52:44';
27+
public const RELEASE_DATE = '2026-06-20 15:47:21';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)