Skip to content

Commit 123bdeb

Browse files
committed
kill mutants
1 parent 14a5eea commit 123bdeb

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/Type/Php/CountFunctionReturnTypeExtension.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,7 @@ public function getTypeFromFunctionCall(
3535
return null;
3636
}
3737

38-
$arrayType = $scope->getType($args[0]->value);
39-
if (!$this->isNormalCount($functionCall, $arrayType, $scope)->yes()) {
40-
if ($arrayType->isIterableAtLeastOnce()->yes()) {
41-
return IntegerRangeType::fromInterval(1, null);
42-
}
43-
return null;
44-
}
45-
4638
return $scope->getType($args[0]->value)->getArraySize();
4739
}
4840

49-
private function isNormalCount(FuncCall $countFuncCall, Type $countedType, Scope $scope): TrinaryLogic
50-
{
51-
if (count($countFuncCall->getArgs()) === 1) {
52-
$isNormalCount = TrinaryLogic::createYes();
53-
} else {
54-
$mode = $scope->getType($countFuncCall->getArgs()[1]->value);
55-
$isNormalCount = (new ConstantIntegerType(COUNT_NORMAL))->isSuperTypeOf($mode)->result->or($countedType->getIterableValueType()->isArray()->negate());
56-
}
57-
return $isNormalCount;
58-
}
59-
6041
}

0 commit comments

Comments
 (0)