Skip to content

Commit b2494e8

Browse files
committed
Update TypeSpecifier.php
1 parent a34755e commit b2494e8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Analyser/TypeSpecifier.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,12 +1203,8 @@ private function specifyTypesForCountFuncCall(
12031203
$intersection[] = new NonEmptyArrayType();
12041204

12051205
$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-
) {
1206+
foreach ($builderData as [$offsetType, $valueType]) {
1207+
if ($zero->isSuperTypeOf($offsetType)->yes()) {
12121208
continue;
12131209
}
12141210
$intersection[] = new HasOffsetValueType($offsetType, $valueType);

0 commit comments

Comments
 (0)