Skip to content

Commit 2c8a30c

Browse files
committed
Update InvalidKeyInArrayDimFetchRuleTest.php
1 parent be7d2e9 commit 2c8a30c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/PHPStan/Rules/Arrays/InvalidKeyInArrayDimFetchRuleTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,26 @@ public function testBug12273(): void
116116
]);
117117
}
118118

119+
public function testBug12981(): void
120+
{
121+
$this->analyse([__DIR__ . '/data/bug-12981.php'], [
122+
[
123+
'Invalid array key type array<int, int|string>.',
124+
31,
125+
],
126+
[
127+
'Invalid array key type array<int, int|string>.',
128+
33,
129+
],
130+
[
131+
'Possibly invalid array key type array<int, int|string>|int|string.',
132+
39,
133+
],
134+
[
135+
'Possibly invalid array key type array<int, int|string>|int|string.',
136+
41,
137+
],
138+
]);
139+
}
140+
119141
}

0 commit comments

Comments
 (0)