Skip to content

Commit 690bd90

Browse files
committed
Fix CS
1 parent ab11f34 commit 690bd90

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/Analyser/NullsafeOperatorHelper.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,15 @@ public static function getNullsafeShortcircuitedExpr(Expr $expr): Expr
114114
$result = new Expr\StaticPropertyFetch($result, $node->name);
115115
}
116116

117-
if ($result === $node) {
118-
// This level shortcircuits to itself — the nullsafe operator is
119-
// above it, not inside it. Only that answer is remembered: a
120-
// rebuilt expression stays freshly built, because callers compare
121-
// the result with === to tell whether anything was rewritten.
122-
$node->setAttribute(self::SHORTCIRCUITED_ATTRIBUTE, true);
117+
if ($result !== $node) {
118+
continue;
123119
}
120+
121+
// This level shortcircuits to itself — the nullsafe operator is
122+
// above it, not inside it. Only that answer is remembered: a
123+
// rebuilt expression stays freshly built, because callers compare
124+
// the result with === to tell whether anything was rewritten.
125+
$node->setAttribute(self::SHORTCIRCUITED_ATTRIBUTE, true);
124126
}
125127

126128
return $result;

0 commit comments

Comments
 (0)