mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-15 23:52:23 +00:00
Updated Rector to commit aac9573e0ef040c236a569a9cbbe965af61ab0b8
aac9573e0e
[Privatization] Skip call non-private method on non-final class on PrivatizeLocalGetterToPropertyRector (#5309)
This commit is contained in:
parent
b698053254
commit
de5ec400ca
|
@ -68,7 +68,8 @@ CODE_SAMPLE
|
||||||
{
|
{
|
||||||
$class = $node;
|
$class = $node;
|
||||||
$hasChanged = \false;
|
$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) {
|
if (!$node instanceof MethodCall) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -86,6 +87,9 @@ CODE_SAMPLE
|
||||||
if (!$classMethod instanceof ClassMethod) {
|
if (!$classMethod instanceof ClassMethod) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
if (!$classMethod->isPrivate() && !$isFinal) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
$propertyFetch = $this->matchLocalPropertyFetchInGetterMethod($classMethod);
|
$propertyFetch = $this->matchLocalPropertyFetchInGetterMethod($classMethod);
|
||||||
if (!$propertyFetch instanceof PropertyFetch) {
|
if (!$propertyFetch instanceof PropertyFetch) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const PACKAGE_VERSION = '5c8fa12ec90e4d4b55fd05f48509c538c243482d';
|
public const PACKAGE_VERSION = 'aac9573e0ef040c236a569a9cbbe965af61ab0b8';
|
||||||
/**
|
/**
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const RELEASE_DATE = '2023-12-02 05:03:12';
|
public const RELEASE_DATE = '2023-12-02 15:56:28';
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user