Skip to content

Commit c3efa48

Browse files
committed
more readable
1 parent 83de825 commit c3efa48

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/Analyser/MutatingScope.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -990,12 +990,23 @@ private function resolveType(string $exprString, Expr $node): Type
990990

991991
private function expressionHasNewInChain(Expr $expr): bool
992992
{
993-
if ($expr instanceof MethodCall || $expr instanceof PropertyFetch || $expr instanceof Expr\NullsafeMethodCall || $expr instanceof Expr\NullsafePropertyFetch || $expr instanceof Expr\ArrayDimFetch) {
993+
if (
994+
$expr instanceof MethodCall ||
995+
$expr instanceof Expr\NullsafeMethodCall ||
996+
$expr instanceof Expr\ArrayDimFetch ||
997+
$expr instanceof PropertyFetch ||
998+
$expr instanceof Expr\NullsafePropertyFetch
999+
) {
9941000
return $expr->var instanceof Expr\New_ || $this->expressionHasNewInChain($expr->var);
9951001
}
996-
if (($expr instanceof Expr\StaticCall || $expr instanceof Expr\StaticPropertyFetch || $expr instanceof Expr\ClassConstFetch) && $expr->class instanceof Expr) {
1002+
if (
1003+
$expr instanceof Expr\StaticCall
1004+
|| $expr instanceof Expr\StaticPropertyFetch
1005+
|| $expr instanceof Expr\ClassConstFetch
1006+
) {
9971007
return $expr->class instanceof Expr\New_ || $this->expressionHasNewInChain($expr->class);
9981008
}
1009+
9991010
return false;
10001011
}
10011012

0 commit comments

Comments
 (0)