Updated Rector to commit a67952f6d15ef954da70898c58aa10567b51c11e

a67952f6d1 [Php81] Skip on property and class const on FirstClassCallableRector (#5813)
This commit is contained in:
Tomas Votruba 2024-04-08 13:35:12 +00:00
parent e56fb5adb0
commit d495dc4fe7
2 changed files with 11 additions and 5 deletions

View File

@ -10,7 +10,10 @@ use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Stmt\ClassConst;
use PhpParser\Node\Stmt\Property;
use PhpParser\Node\VariadicPlaceholder;
use PhpParser\NodeTraverser;
use PHPStan\Analyser\Scope;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Reflection\ReflectionProvider;
@ -79,14 +82,17 @@ CODE_SAMPLE
*/
public function getNodeTypes() : array
{
return [Array_::class];
return [Property::class, ClassConst::class, Array_::class];
}
/**
* @param Array_ $node
* @return null|\PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\MethodCall
* @param Property|ClassConst|Array_ $node
* @return int|null|\PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\MethodCall
*/
public function refactorWithScope(Node $node, Scope $scope)
{
if ($node instanceof Property || $node instanceof ClassConst) {
return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
}
$arrayCallable = $this->arrayCallableMethodMatcher->match($node, $scope);
if (!$arrayCallable instanceof ArrayCallable) {
return null;

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '1bbb3faaed01bd234f8e53564d1686529551e75a';
public const PACKAGE_VERSION = 'a67952f6d15ef954da70898c58aa10567b51c11e';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-04-08 20:16:33';
public const RELEASE_DATE = '2024-04-08 20:32:48';
/**
* @var int
*/