Updated Rector to commit 522668e4edce544bcb17ba3d71182629df19fd95

522668e4ed [Performance] [VendorLocker] Early allow change return type on private method on ClassMethodReturnTypeOverrideGuard::shouldSkipClassMethod() (#5642)
This commit is contained in:
Tomas Votruba 2024-02-20 16:01:20 +00:00
parent c2f97b2f3a
commit 1281d2f6ab
2 changed files with 6 additions and 2 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api * @api
* @var string * @var string
*/ */
public const PACKAGE_VERSION = '23179d00859ca75e0b2e1ceff61bba93a9558806'; public const PACKAGE_VERSION = '522668e4edce544bcb17ba3d71182629df19fd95';
/** /**
* @api * @api
* @var string * @var string
*/ */
public const RELEASE_DATE = '2024-02-20 22:48:32'; public const RELEASE_DATE = '2024-02-20 22:59:11';
/** /**
* @var int * @var int
*/ */

View File

@ -48,6 +48,10 @@ final class ClassMethodReturnTypeOverrideGuard
if ($this->magicClassMethodAnalyzer->isUnsafeOverridden($classMethod)) { if ($this->magicClassMethodAnalyzer->isUnsafeOverridden($classMethod)) {
return \true; return \true;
} }
// early allow add return type on private method
if ($classMethod->isPrivate()) {
return \false;
}
$classReflection = $this->reflectionResolver->resolveClassReflection($classMethod); $classReflection = $this->reflectionResolver->resolveClassReflection($classMethod);
if (!$classReflection instanceof ClassReflection) { if (!$classReflection instanceof ClassReflection) {
return \true; return \true;