mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-05 02:40:50 +00:00
Updated Rector to commit a67952f6d15ef954da70898c58aa10567b51c11e
a67952f6d1
[Php81] Skip on property and class const on FirstClassCallableRector (#5813)
This commit is contained in:
parent
e56fb5adb0
commit
d495dc4fe7
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user