Skip to content

Commit 7140bec

Browse files
committed
Updated Rector to commit 03df84917444112f3256754b3e8f94caf8cba0be
rectorphp/rector-src@03df849 [TypeDeclaration] Skip has parent method on AddParamFromDimFetchKeyUseRector (#7426)
1 parent 6aa11ef commit 7140bec

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

rules/TypeDeclaration/Rector/ClassMethod/AddParamFromDimFetchKeyUseRector.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Rector\Rector\AbstractRector;
1212
use Rector\StaticTypeMapper\StaticTypeMapper;
1313
use Rector\TypeDeclarationDocblocks\NodeFinder\ArrayDimFetchFinder;
14+
use Rector\VendorLocker\ParentClassMethodTypeOverrideGuard;
1415
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
1516
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
1617
/**
@@ -26,10 +27,15 @@ final class AddParamFromDimFetchKeyUseRector extends AbstractRector
2627
* @readonly
2728
*/
2829
private StaticTypeMapper $staticTypeMapper;
29-
public function __construct(ArrayDimFetchFinder $arrayDimFetchFinder, StaticTypeMapper $staticTypeMapper)
30+
/**
31+
* @readonly
32+
*/
33+
private ParentClassMethodTypeOverrideGuard $parentClassMethodTypeOverrideGuard;
34+
public function __construct(ArrayDimFetchFinder $arrayDimFetchFinder, StaticTypeMapper $staticTypeMapper, ParentClassMethodTypeOverrideGuard $parentClassMethodTypeOverrideGuard)
3035
{
3136
$this->arrayDimFetchFinder = $arrayDimFetchFinder;
3237
$this->staticTypeMapper = $staticTypeMapper;
38+
$this->parentClassMethodTypeOverrideGuard = $parentClassMethodTypeOverrideGuard;
3339
}
3440
public function getRuleDefinition(): RuleDefinition
3541
{
@@ -80,6 +86,9 @@ public function refactor(Node $node): ?Node
8086
if ($classMethod->params === []) {
8187
continue;
8288
}
89+
if ($this->parentClassMethodTypeOverrideGuard->hasParentClassMethod($classMethod)) {
90+
continue;
91+
}
8392
foreach ($classMethod->getParams() as $param) {
8493
if ($param->type instanceof Node) {
8594
continue;

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 = 'd52149d8f1d62270dbb4bac336c32ddcd794c39b';
22+
public const PACKAGE_VERSION = '03df84917444112f3256754b3e8f94caf8cba0be';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2025-10-04 23:53:19';
27+
public const RELEASE_DATE = '2025-10-05 01:40:33';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)