Skip to content

Commit b6cead2

Browse files
committed
[NodeTypeResolver] Apply logic Mixed inside Union check on TypeFactory::createUnionOrSingleType()
1 parent 0414d6b commit b6cead2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ private function unionToSingleType(array $staticTypesByArgumentPosition, bool $r
127127
$unionedType
128128
);
129129

130-
if ($staticTypeByArgumentPosition[$position] instanceof UnionType) {
130+
if ($removeMixedArray && $staticTypeByArgumentPosition[$position] instanceof UnionType) {
131131
foreach ($staticTypeByArgumentPosition[$position]->getTypes() as $subType) {
132-
if ($removeMixedArray && $subType instanceof ArrayType && $this->isArrayMixedMixedType($subType)) {
132+
if ($subType instanceof ArrayType && $this->isArrayMixedMixedType($subType)) {
133133
$staticTypeByArgumentPosition[$position] = new MixedType();
134134
continue 2;
135135
}

0 commit comments

Comments
 (0)