mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Use the clever methods when evaluating expression
This commit is contained in:
parent
35e08f5cd2
commit
4bd0e7c90f
@ -1437,7 +1437,7 @@ class StatementsChecker
|
||||
// ignore deeply-nested string concatenation
|
||||
}
|
||||
else if ($stmt instanceof PhpParser\Node\Expr\BinaryOp\BooleanAnd) {
|
||||
$left_type_assertions = $this->_type_checker->getTypeAssertions($stmt->left, true);
|
||||
$left_type_assertions = $this->_type_checker->getReconcilableTypeAssertions($stmt->left);
|
||||
|
||||
if ($this->_checkExpression($stmt->left, $context) === false) {
|
||||
return false;
|
||||
@ -1468,7 +1468,7 @@ class StatementsChecker
|
||||
$context->vars_possibly_in_scope = array_merge($op_context->vars_possibly_in_scope, $context->vars_possibly_in_scope);
|
||||
}
|
||||
else if ($stmt instanceof PhpParser\Node\Expr\BinaryOp\BooleanOr) {
|
||||
$left_type_assertions = $this->_type_checker->getTypeAssertions($stmt->left, true);
|
||||
$left_type_assertions = $this->_type_checker->getNegatableTypeAssertions($stmt->left);
|
||||
|
||||
$negated_type_assertions = TypeChecker::negateTypes($left_type_assertions);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user