1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Switch order to satisfy new refinement

This commit is contained in:
Matt Brown 2020-11-24 14:57:34 -05:00 committed by Daniil Gentili
parent e5f25c7780
commit e469e7179e
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -2923,8 +2923,8 @@ class AssertionFinder
|| $conditional instanceof PhpParser\Node\Expr\BinaryOp\Smaller;
if ($left_count
&& $conditional->right instanceof PhpParser\Node\Scalar\LNumber
&& $operator_less_than_or_equal
&& $conditional->right instanceof PhpParser\Node\Scalar\LNumber
) {
$max_count = $conditional->right->value -
($conditional instanceof PhpParser\Node\Expr\BinaryOp\Smaller ? 1 : 0);
@ -2942,8 +2942,8 @@ class AssertionFinder
|| $conditional instanceof PhpParser\Node\Expr\BinaryOp\Greater;
if ($right_count
&& $conditional->left instanceof PhpParser\Node\Scalar\LNumber
&& $operator_greater_than_or_equal
&& $conditional->left instanceof PhpParser\Node\Scalar\LNumber
) {
$max_count = $conditional->left->value -
($conditional instanceof PhpParser\Node\Expr\BinaryOp\Greater ? 1 : 0);