We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a37c535 commit 105f18aCopy full SHA for 105f18a
src/Analyser/TypeSpecifier.php
@@ -455,6 +455,9 @@ public function specifyTypesInCondition(
455
!$context->null()
456
&& $expr->right instanceof Expr\CallLike
457
) {
458
+ if (!$scope instanceof MutatingScope) {
459
+ throw new ShouldNotHappenException();
460
+ }
461
$newScope = $scope->filterBySpecifiedTypes($result);
462
$callType = $newScope->getType($expr->right);
463
$newContext = TypeSpecifierContext::createTruthy($callType);
0 commit comments