Skip to content

Commit

Permalink
final touch: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Mar 7, 2022
1 parent a4b7ac9 commit 9043d0e
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ public function mapConstantArrayType(ConstantArrayType $constantArrayType): Arra
}

$keyValue = $keyType->getValue();

if ($this->reflectionProvider->hasClass($keyValue)) {
return null;
}

$keyDocTypeNode = new IdentifierTypeNode($keyValue);
$valueType = $constantArrayType->getValueTypes()[$index];

Expand All @@ -48,10 +53,6 @@ public function mapConstantArrayType(ConstantArrayType $constantArrayType): Arra
TypeKind::RETURN()
);

if ($this->reflectionProvider->hasClass($keyValue)) {
return null;
}

$arrayShapeItemNodes[] = new ArrayShapeItemNode(
$keyDocTypeNode,
$constantArrayType->isOptionalKey($index),
Expand Down

0 comments on commit 9043d0e

Please sign in to comment.