Skip to content

Commit dce1d56

Browse files
committed
simplify
1 parent 47e1e30 commit dce1d56

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Analyser/ExprHandler/Helper/NonNullabilityHelper.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,11 @@ public function ensureShallowNonNullability(MutatingScope $scope, Scope $origina
5555
// To properly revert this, we must also save and restore the parent expression's type.
5656
if ($exprToSpecify instanceof Expr\ArrayDimFetch && $exprToSpecify->dim !== null) {
5757
$parentExpr = $exprToSpecify->var;
58-
$hasParentExpressionType = $originalScope->hasExpressionType($parentExpr);
59-
6058
$specifiedExpressions[] = new EnsuredNonNullabilityResultExpression(
6159
$parentExpr,
6260
$scope->getType($parentExpr),
6361
$scope->getNativeType($parentExpr),
64-
$hasParentExpressionType,
62+
$originalScope->hasExpressionType($parentExpr),
6563
);
6664
}
6765

0 commit comments

Comments
 (0)