Skip to content

Commit

Permalink
Merge branch refs/heads/1.12.x into 2.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
phpstan-bot authored Dec 17, 2024
2 parents d3cf77b + 9c81a80 commit 5f12df7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Analyser/MutatingScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -711,15 +711,16 @@ private function getNodeKey(Expr $node): string
{
$key = $this->exprPrinter->printExpr($node);

$attributes = $node->getAttributes();
if (
$node instanceof Node\FunctionLike
&& $node->hasAttribute(ArrayMapArgVisitor::ATTRIBUTE_NAME)
&& $node->hasAttribute('startFilePos')
&& (($attributes[ArrayMapArgVisitor::ATTRIBUTE_NAME] ?? null) !== null)
&& (($attributes['startFilePos'] ?? null) !== null)
) {
$key .= '/*' . $node->getAttribute('startFilePos') . '*/';
$key .= '/*' . $attributes['startFilePos'] . '*/';
}

if ($node->getAttribute(self::KEEP_VOID_ATTRIBUTE_NAME) === true) {
if (($attributes[self::KEEP_VOID_ATTRIBUTE_NAME] ?? null) === true) {
$key .= '/*' . self::KEEP_VOID_ATTRIBUTE_NAME . '*/';
}

Expand Down

0 comments on commit 5f12df7

Please sign in to comment.