Skip to content

Commit e518d8f

Browse files
committed
Fix test __toString() without return on php 7.4
1 parent b6b20da commit e518d8f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ public function test(): void
2323

2424
$x = array_fill_keys($y, null);
2525

26-
assertType('array<string, null>', $x);
26+
if (PHP_VERSION_ID >= 80000) {
27+
assertType('array<string, null>', $x);
28+
} else {
29+
assertType('array<null>', $x);
30+
}
2731
}
2832
}

0 commit comments

Comments
 (0)