Skip to content

Commit 7c56c35

Browse files
Fix test
1 parent 7c7d940 commit 7c56c35

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
class ClassA {}
88
class ClassB {}
99

10-
function instanceofVariants(mixed $obj): void
10+
/**
11+
* @param mixed $obj
12+
*/
13+
function instanceofVariants($obj): void
1114
{
1215
$isA = $obj instanceof ClassA;
1316
$isB = $obj instanceof ClassB;
@@ -28,7 +31,10 @@ function instanceofVariants(mixed $obj): void
2831
*/
2932
class ClassC {}
3033

31-
function threeWayInstanceof(mixed $obj): void
34+
/**
35+
* @param mixed $obj
36+
*/
37+
function threeWayInstanceof($obj): void
3238
{
3339
$isA = $obj instanceof ClassA;
3440
$isB = $obj instanceof ClassB;
@@ -42,8 +48,10 @@ function threeWayInstanceof(mixed $obj): void
4248
/**
4349
* Different narrowing kinds across the OR's arms — `null !==` on the left,
4450
* `instanceof` on the right.
51+
*
52+
* @param mixed $b
4553
*/
46-
function mixedNarrowingKinds(?ClassA $a, mixed $b): void
54+
function mixedNarrowingKinds(?ClassA $a, $b): void
4755
{
4856
$aNotNull = $a !== null;
4957
$bIsB = $b instanceof ClassB;

0 commit comments

Comments
 (0)