Skip to content

Commit

Permalink
Refactor GetTypeTrait
Browse files Browse the repository at this point in the history
  • Loading branch information
jerowork committed Jan 3, 2025
1 parent 9813c86 commit fb223ff
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Parser/NodeParser/GetTypeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ public function getType(ReflectionNamedType $type, ?TypedAttribute $attribute):
}

// Retrieve from class
if ($type->isBuiltin()) {
return Type::createScalar($type->getName());
}

return Type::createObject($type->getName());
return $type->isBuiltin() ? Type::createScalar($type->getName()) : Type::createObject($type->getName());
}
}

0 comments on commit fb223ff

Please sign in to comment.