We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de2d305 commit 83f93ddCopy full SHA for 83f93dd
tests/PHPStan/Rules/Classes/ImpossibleInstanceOfRuleTest.php
@@ -513,6 +513,10 @@ public function testBug10036(): void
513
'Instanceof between stdClass and string|null results in an error.',
514
19,
515
],
516
+ [
517
+ 'Instanceof between stdClass and array results in an error.',
518
+ 39,
519
+ ],
520
]);
521
}
522
tests/PHPStan/Rules/Classes/data/bug-10036.php
@@ -28,4 +28,14 @@ public function sayMixed(mixed $class): void
28
{
29
var_dump(new stdClass instanceof $class);
30
31
+
32
+ public function sayObject(object $class): void
33
+ {
34
+ var_dump(new stdClass instanceof $class);
35
+ }
36
37
+ public function sayArray(array $class): void
38
39
40
41
0 commit comments