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 28f6ee1 commit 4196932Copy full SHA for 4196932
tests/PHPStan/Analyser/nsrt/bug-13546.php
@@ -72,3 +72,15 @@ function firstInCondition(array $array): mixed
72
assertType('list<string>', $array);
73
return null;
74
}
75
+
76
+/** @param list<string> $array */
77
+function maybeNull(array $array, ?int $nullOrInt, ?string $nullOrString): void
78
+{
79
+ if (array_key_first($array) !== $nullOrInt) {
80
+ assertType('list<string>', $array);
81
+ }
82
+ if (array_key_first($array) !== $nullOrString) {
83
84
85
86
+}
0 commit comments