1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Remove unnecessary assertion

This commit is contained in:
Brown 2019-09-19 15:41:44 -04:00
parent e6f90ab83f
commit f6b0de08f8

View File

@ -195,20 +195,18 @@ class AssertionFinder
throw new \UnexpectedValueException('$count_equality_position value');
}
if ($counted_expr->args) {
/** @var PhpParser\Node\Expr\FuncCall $counted_expr */
$var_name = ExpressionAnalyzer::getArrayVarId(
$counted_expr->args[0]->value,
$this_class_name,
$source
);
/** @var PhpParser\Node\Expr\FuncCall $counted_expr */
$var_name = ExpressionAnalyzer::getArrayVarId(
$counted_expr->args[0]->value,
$this_class_name,
$source
);
if ($var_name) {
if (self::hasReconcilableNonEmptyCountEqualityCheck($conditional)) {
$if_types[$var_name] = [['non-empty-countable']];
} else {
$if_types[$var_name] = [['=non-empty-countable']];
}
if ($var_name) {
if (self::hasReconcilableNonEmptyCountEqualityCheck($conditional)) {
$if_types[$var_name] = [['non-empty-countable']];
} else {
$if_types[$var_name] = [['=non-empty-countable']];
}
}