Skip to content

Commit

Permalink
Updated Rector to commit 7f9dae6ddcce4331acb1058a47d9947ee1b87c17
Browse files Browse the repository at this point in the history
rectorphp/rector-src@7f9dae6 [CodeQuality] More handling on Function/Static/Instantition callable node on OptionalParametersAfterRequiredRector (#6558)
  • Loading branch information
TomasVotruba committed Dec 11, 2024
1 parent f0cd6d0 commit 8cd1b8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@
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;
Expand Down Expand Up @@ -328,10 +331,10 @@ public function processNodes(array $stmts, string $filePath, ?MutatingScope $for
$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 {
Expand Down

0 comments on commit 8cd1b8a

Please sign in to comment.