Skip to content

Commit a09c050

Browse files
committed
test HasOffsetValueType
1 parent 7ba85bb commit a09c050

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/PHPStan/Rules/Arrays/data/bug-12605.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,11 @@ function doFooBar(): void {
2727
}
2828
}
2929

30+
function doBaz(): void {
31+
$test = test();
32+
33+
if (array_key_exists(5, $test) && is_int($test[5])) {
34+
echo $test[3];
35+
}
36+
}
37+

0 commit comments

Comments
 (0)