Skip to content

Commit 9257029

Browse files
committed
Updated Rector to commit 8a7cd36365b2f05683f072309cd2484978d9e5b2
rectorphp/rector-src@8a7cd36 [Renaming] Use continue 2 on RenameMethodRector after ClassMethod renamed on configured method call renames loop (#5989)
1 parent 856c640 commit 9257029

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

rules/Renaming/Rector/MethodCall/RenameMethodRector.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,12 @@ private function refactorClass($classOrInterface, Scope $scope)
151151
continue;
152152
}
153153
foreach ($this->methodCallRenames as $methodCallRename) {
154-
if ($this->shouldSkipRename($methodName, $classMethod, $methodCallRename, $classReflection, $classOrInterface)) {
154+
if ($this->shouldSkipRename($methodName, $classMethod, $methodCallRename, $classOrInterface, $classReflection)) {
155155
continue;
156156
}
157157
$classMethod->name = new Identifier($methodCallRename->getNewMethod());
158158
$hasChanged = \true;
159+
continue 2;
159160
}
160161
}
161162
if ($hasChanged) {
@@ -166,7 +167,7 @@ private function refactorClass($classOrInterface, Scope $scope)
166167
/**
167168
* @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\Interface_ $classOrInterface
168169
*/
169-
private function shouldSkipRename(string $methodName, ClassMethod $classMethod, MethodCallRenameInterface $methodCallRename, ClassReflection $classReflection, $classOrInterface) : bool
170+
private function shouldSkipRename(string $methodName, ClassMethod $classMethod, MethodCallRenameInterface $methodCallRename, $classOrInterface, ?ClassReflection $classReflection) : bool
170171
{
171172
if (!$this->nodeNameResolver->isStringName($methodName, $methodCallRename->getOldMethod())) {
172173
return \true;

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 = '2dda748541be13dac8ef328011bc50233f2030bc';
22+
public const PACKAGE_VERSION = '8a7cd36365b2f05683f072309cd2484978d9e5b2';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2024-06-20 14:52:05';
27+
public const RELEASE_DATE = '2024-06-20 22:34:06';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)