Updated Rector to commit 7f9dae6ddcce4331acb1058a47d9947ee1b87c17

7f9dae6ddc [CodeQuality] More handling on Function/Static/Instantition callable node on OptionalParametersAfterRequiredRector (#6558)
This commit is contained in:
Tomas Votruba 2024-12-11 18:53:52 +00:00
parent f0cd6d0251
commit 8cd1b8a88e
2 changed files with 8 additions and 5 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'cce509740aef05ae9eb8640090388489d841185b';
public const PACKAGE_VERSION = '7f9dae6ddcce4331acb1058a47d9947ee1b87c17';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-12-11 17:23:52';
public const RELEASE_DATE = '2024-12-12 01:51:18';
/**
* @var int
*/

View File

@ -86,8 +86,11 @@ use PhpParser\NodeTraverser;
use PHPStan\Analyser\MutatingScope;
use PHPStan\Analyser\NodeScopeResolver;
use PHPStan\Analyser\ScopeContext;
use PHPStan\Node\FunctionCallableNode;
use PHPStan\Node\InstantiationCallableNode;
use PHPStan\Node\MethodCallableNode;
use PHPStan\Node\Printer\Printer;
use PHPStan\Node\StaticMethodCallableNode;
use PHPStan\Node\UnreachableStatementNode;
use PHPStan\Node\VirtualNode;
use PHPStan\Parser\ParserErrorsException;
@ -328,10 +331,10 @@ final class PHPStanNodeScopeResolver
$node->cond->setAttribute(AttributeKey::SCOPE, $mutatingScope);
return;
}
if ($node instanceof MethodCallableNode) {
if ($node instanceof MethodCallableNode || $node instanceof FunctionCallableNode || $node instanceof StaticMethodCallableNode || $node instanceof InstantiationCallableNode) {
$node->getOriginalNode()->setAttribute(AttributeKey::SCOPE, $mutatingScope);
$node->getOriginalNode()->var->setAttribute(AttributeKey::SCOPE, $mutatingScope);
$node->getOriginalNode()->name->setAttribute(AttributeKey::SCOPE, $mutatingScope);
$this->processCallike($node->getOriginalNode(), $mutatingScope);
return;
}
};
try {