Skip to content

Commit c73d0db

Browse files
committed
Fix
1 parent 1eac9e9 commit c73d0db

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Diff for: phpstan-baseline.neon

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
parameters:
22
ignoreErrors:
3+
-
4+
message: "#^Casting to int something that's already int\\.$#"
5+
count: 2
6+
path: src/Analyser/MutatingScope.php
7+
38
-
49
message: "#^Only numeric types are allowed in pre\\-decrement, bool\\|float\\|int\\|string\\|null given\\.$#"
510
count: 1

Diff for: src/Analyser/MutatingScope.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5498,7 +5498,7 @@ private function integerRangeMath(Type $range, Expr $node, Type $operand): Type
54985498
}
54995499
}
55005500

5501-
return IntegerRangeType::fromInterval($min, $max);
5501+
return IntegerRangeType::fromInterval($min !== null ? (int) $min : null, $max !== null ? (int) $max : null);
55025502
}
55035503

55045504
}

0 commit comments

Comments
 (0)