Skip to content

Commit c419fe2

Browse files
committed
move to correct type method
1 parent 28f5852 commit c419fe2

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/NodeTypeResolver/NodeTypeResolver.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,6 @@ public function getNativeType(Expr $expr): Type
281281
$type = $this->resolveArrayDimFetchType($expr, $scope, $type);
282282
}
283283

284-
if ($type instanceof IntersectionType) {
285-
$type = $this->cleanArrayIntersectionType($type);
286-
}
287-
288284
if (! $type instanceof UnionType) {
289285
if ($this->isAnonymousObjectType($type)) {
290286
return new ObjectWithoutClassType();
@@ -383,6 +379,8 @@ private function correctType(Type $type): Type
383379
$type = $this->accessoryNonEmptyStringTypeCorrector->correct($type);
384380
$type = $this->genericClassStringTypeCorrector->correct($type);
385381

382+
$type = $this->cleanArrayIntersectionType($type);
383+
386384
return $this->accessoryNonEmptyArrayTypeCorrector->correct($type);
387385
}
388386

0 commit comments

Comments
 (0)