Updated Rector to commit aac9573e0ef040c236a569a9cbbe965af61ab0b8

aac9573e0e [Privatization] Skip call non-private method on non-final class on PrivatizeLocalGetterToPropertyRector (#5309)
This commit is contained in:
Tomas Votruba 2023-12-02 08:58:47 +00:00
parent b698053254
commit de5ec400ca
2 changed files with 7 additions and 3 deletions

View File

@ -68,7 +68,8 @@ CODE_SAMPLE
{
$class = $node;
$hasChanged = \false;
$this->traverseNodesWithCallable($node, function (Node $node) use($class, &$hasChanged) : ?PropertyFetch {
$isFinal = $class->isFinal();
$this->traverseNodesWithCallable($node, function (Node $node) use($class, &$hasChanged, $isFinal) : ?PropertyFetch {
if (!$node instanceof MethodCall) {
return null;
}
@ -86,6 +87,9 @@ CODE_SAMPLE
if (!$classMethod instanceof ClassMethod) {
return null;
}
if (!$classMethod->isPrivate() && !$isFinal) {
return null;
}
$propertyFetch = $this->matchLocalPropertyFetchInGetterMethod($classMethod);
if (!$propertyFetch instanceof PropertyFetch) {
return null;

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '5c8fa12ec90e4d4b55fd05f48509c538c243482d';
public const PACKAGE_VERSION = 'aac9573e0ef040c236a569a9cbbe965af61ab0b8';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-12-02 05:03:12';
public const RELEASE_DATE = '2023-12-02 15:56:28';
/**
* @var int
*/