mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-06 08:09:00 +01:00
Updated Rector to commit 297853b887236d6770547058d0727a228385f87d
297853b887
[TypeDeclaration] Add Static Call support on AddMethodCallBasedStrictParamTypeRector (#5960)
This commit is contained in:
parent
b0c2f67914
commit
66d6637cdd
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '589c1e73399a17223ea93ad6a50d2abd8a68505a';
|
||||
public const PACKAGE_VERSION = '297853b887236d6770547058d0727a228385f87d';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-06-11 05:19:02';
|
||||
public const RELEASE_DATE = '2024-06-11 16:32:25';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -5,6 +5,7 @@ namespace Rector\PhpParser\NodeFinder;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
use PhpParser\Node\Expr\StaticCall;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PHPStan\Type\TypeWithClassName;
|
||||
@ -46,13 +47,13 @@ final class LocalMethodCallFinder
|
||||
$classMethodName = $this->nodeNameResolver->getName($classMethod);
|
||||
/** @var MethodCall[] $matchingMethodCalls */
|
||||
$matchingMethodCalls = $this->betterNodeFinder->find($class->getMethods(), function (Node $subNode) use($className, $classMethodName) : bool {
|
||||
if (!$subNode instanceof MethodCall) {
|
||||
if (!$subNode instanceof MethodCall && !$subNode instanceof StaticCall) {
|
||||
return \false;
|
||||
}
|
||||
if (!$this->nodeNameResolver->isName($subNode->name, $classMethodName)) {
|
||||
return \false;
|
||||
}
|
||||
$callerType = $this->nodeTypeResolver->getType($subNode->var);
|
||||
$callerType = $subNode instanceof MethodCall ? $this->nodeTypeResolver->getType($subNode->var) : $this->nodeTypeResolver->getType($subNode->class);
|
||||
if (!$callerType instanceof TypeWithClassName) {
|
||||
return \false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user