Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
clxmstaab committed Mar 23, 2022
1 parent b6af292 commit 495e9c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Type/Php/InArrayFunctionTypeSpecifyingExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function specifyTypes(FunctionReflection $functionReflection, FuncCall $n
$arrayValueType = $arrayType->getIterableValueType();

$specifiedTypes = new SpecifiedTypes([], []);
if ($context->true() && $arrayType->isArray()->yes()) {
if ($context->true() && $arrayType->isArray()->yes() && !$arrayType->isIterableAtLeastOnce()->yes()) {
$arrayType = TypeCombinator::intersect($arrayType, new NonEmptyArrayType());

$specifiedTypes = $specifiedTypes->unionWith($this->typeSpecifier->create(
Expand Down

0 comments on commit 495e9c2

Please sign in to comment.