Skip to content

Commit 4085ef4

Browse files
committed
Update non-empty-string-str-containing-fns.php
1 parent 8117605 commit 4085ef4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/PHPStan/Analyser/nsrt/non-empty-string-str-containing-fns.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ public function variants(string $s) {
103103
}
104104
assertType('string', $s);
105105

106+
if (strpos($s, '0') == 0) { // 0|false
107+
assertType('string', $s);
108+
} else {
109+
assertType('string', $s);
110+
}
111+
assertType('string', $s);
112+
106113
if (strpos($s, '0') === 0) {
107114
assertType('string', $s); // could be non-empty-string
108115
} else {

0 commit comments

Comments
 (0)