Skip to content

Commit 58dc99a

Browse files
committed
Update TypeSpecifier.php
1 parent fca50f7 commit 58dc99a

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/Analyser/TypeSpecifier.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ public function specifyTypesInCondition(
457457
) {
458458
$newScope = $scope->filterBySpecifiedTypes($result);
459459
$callType = $newScope->getType($expr->right);
460-
$newContext = $this->createSpecifierContextReturnType($callType, $context);
460+
$newContext = TypeSpecifierContext::createTrue($callType);
461461

462462
return $this->specifyTypesInCondition(
463463
$scope,
@@ -1949,21 +1949,6 @@ private function getTypeSpecifyingExtensionsForType(array $extensions, string $c
19491949
return array_merge(...$extensionsForClass);
19501950
}
19511951

1952-
private function createSpecifierContextReturnType(
1953-
Type $contextReturnType,
1954-
TypeSpecifierContext $context,
1955-
): TypeSpecifierContext
1956-
{
1957-
if (!$context->null()) {
1958-
return TypeSpecifierContext::createTrue($contextReturnType);
1959-
}
1960-
//} elseif ($context->false()) {
1961-
// return TypeSpecifierContext::createFalse($contextReturnType);
1962-
//}
1963-
1964-
//return $context;
1965-
}
1966-
19671952
public function resolveEqual(Expr\BinaryOp\Equal $expr, Scope $scope, TypeSpecifierContext $context): SpecifiedTypes
19681953
{
19691954
$expressions = $this->findTypeExpressionsFromBinaryOperation($scope, $expr);

0 commit comments

Comments
 (0)