Skip to content

Commit c7174a8

Browse files
committed
zero or more
1 parent ce026a8 commit c7174a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Analyser/TypeSpecifier.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,12 +1063,12 @@ private function specifyTypesForCountFuncCall(
10631063

10641064
$isConstantArray = $type->isConstantArray();
10651065
$isList = $type->isList();
1066-
$positiveInt = IntegerRangeType::fromInterval(1, null);
1066+
$zeroOrMore = IntegerRangeType::fromInterval(0, null);
10671067
if (
10681068
!$isNormalCount->yes()
10691069
|| (!$isConstantArray->yes() && !$isList->yes())
10701070
|| $type->isIterableAtLeastOnce()->no() // array{} cannot be used for further narrowing
1071-
|| !$positiveInt->isSuperTypeOf($sizeType)->yes()
1071+
|| !$zeroOrMore->isSuperTypeOf($sizeType)->yes()
10721072
) {
10731073
return null;
10741074
}

0 commit comments

Comments
 (0)