We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28f5852 commit c419fe2Copy full SHA for c419fe2
1 file changed
src/NodeTypeResolver/NodeTypeResolver.php
@@ -281,10 +281,6 @@ public function getNativeType(Expr $expr): Type
281
$type = $this->resolveArrayDimFetchType($expr, $scope, $type);
282
}
283
284
- if ($type instanceof IntersectionType) {
285
- $type = $this->cleanArrayIntersectionType($type);
286
- }
287
-
288
if (! $type instanceof UnionType) {
289
if ($this->isAnonymousObjectType($type)) {
290
return new ObjectWithoutClassType();
@@ -383,6 +379,8 @@ private function correctType(Type $type): Type
383
379
$type = $this->accessoryNonEmptyStringTypeCorrector->correct($type);
384
380
$type = $this->genericClassStringTypeCorrector->correct($type);
385
381
382
+ $type = $this->cleanArrayIntersectionType($type);
+
386
return $this->accessoryNonEmptyArrayTypeCorrector->correct($type);
387
388
0 commit comments