Skip to content

Commit 5f12df7

Browse files
authored
Merge branch refs/heads/1.12.x into 2.0.x
2 parents d3cf77b + 9c81a80 commit 5f12df7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Analyser/MutatingScope.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -711,15 +711,16 @@ private function getNodeKey(Expr $node): string
711711
{
712712
$key = $this->exprPrinter->printExpr($node);
713713

714+
$attributes = $node->getAttributes();
714715
if (
715716
$node instanceof Node\FunctionLike
716-
&& $node->hasAttribute(ArrayMapArgVisitor::ATTRIBUTE_NAME)
717-
&& $node->hasAttribute('startFilePos')
717+
&& (($attributes[ArrayMapArgVisitor::ATTRIBUTE_NAME] ?? null) !== null)
718+
&& (($attributes['startFilePos'] ?? null) !== null)
718719
) {
719-
$key .= '/*' . $node->getAttribute('startFilePos') . '*/';
720+
$key .= '/*' . $attributes['startFilePos'] . '*/';
720721
}
721722

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

0 commit comments

Comments
 (0)