Skip to content

Commit 991bffd

Browse files
committed
Update bug-12933.php
1 parent 2faab41 commit 991bffd

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/Rules/Arrays/AllowedArrayKeysTypes.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use PHPStan\Type\Constant\ConstantIntegerType;
99
use PHPStan\Type\Constant\ConstantStringType;
1010
use PHPStan\Type\FloatType;
11-
use PHPStan\Type\IntegerRangeType;
1211
use PHPStan\Type\IntegerType;
1312
use PHPStan\Type\MixedType;
1413
use PHPStan\Type\NullType;

tests/PHPStan/Analyser/nsrt/bug-12933.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,13 @@ public function issetNarrowsIntRange(int $index, string $name): void
3636
assert(isset($this->list[$index]));
3737
assertType('int<0, 5>', $index);
3838
}
39+
40+
/**
41+
* @param int<5, 15> $index
42+
*/
43+
public function issetNotWidensIntRange(int $index, string $name): void
44+
{
45+
assert(isset($this->list[$index]));
46+
assertType('int<5, 15>', $index);
47+
}
3948
}

0 commit comments

Comments
 (0)