Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jan 13, 2022
1 parent 1eac9e9 commit c73d0db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions phpstan-baseline.neon
@@ -1,5 +1,10 @@
parameters:
ignoreErrors:
-
message: "#^Casting to int something that's already int\\.$#"
count: 2
path: src/Analyser/MutatingScope.php

-
message: "#^Only numeric types are allowed in pre\\-decrement, bool\\|float\\|int\\|string\\|null given\\.$#"
count: 1
Expand Down
2 changes: 1 addition & 1 deletion src/Analyser/MutatingScope.php
Expand Up @@ -5498,7 +5498,7 @@ private function integerRangeMath(Type $range, Expr $node, Type $operand): Type
}
}

return IntegerRangeType::fromInterval($min, $max);
return IntegerRangeType::fromInterval($min !== null ? (int) $min : null, $max !== null ? (int) $max : null);
}

}

0 comments on commit c73d0db

Please sign in to comment.