Skip to content

Commit 5488107

Browse files
committed
kill mutants
1 parent b83d632 commit 5488107

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/PHPStan/Analyser/nsrt/count-recursive.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,20 @@ public function unionIntegerCountAfterKeyExists(array $array, int $i): void {
210210
}
211211
}
212212
}
213+
214+
public function countMaybeCountable(array $arr, bool $b, int $i) {
215+
$c = rand(0,1) ? $arr : $b;
216+
assertType('array|bool', $c);
217+
assertType('int<0, max>', count($c, $i));
218+
219+
if ($arr === []) {
220+
return;
221+
}
222+
assertType('int<1, max>', count($arr, $i));
223+
224+
$c = rand(0,1) ? $arr : $b;
225+
assertType('non-empty-array|bool', $c);
226+
assertType('int<0, max>', count($c, $i));
227+
228+
}
213229
}

0 commit comments

Comments
 (0)