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 265836d commit 4f814d6Copy full SHA for 4f814d6
src/Analyser/TypeSpecifier.php
@@ -1203,12 +1203,8 @@ private function specifyTypesForCountFuncCall(
1203
$intersection[] = new NonEmptyArrayType();
1204
1205
$zero = new ConstantIntegerType(0);
1206
- foreach ($builderData as [$offsetType, $valueType, $optional]) {
1207
- if (
1208
- $optional
1209
- // list already is non-empty
1210
- || $zero->isSuperTypeOf($offsetType)->yes()
1211
- ) {
+ foreach ($builderData as [$offsetType, $valueType]) {
+ if ($zero->isSuperTypeOf($offsetType)->yes()) {
1212
continue;
1213
}
1214
$intersection[] = new HasOffsetValueType($offsetType, $valueType);
0 commit comments