Skip to content

Commit e36ac33

Browse files
authored
Added Annotation RewriteReturnType which used to rewrite the return type when generating models.
1 parent b2b42ea commit e36ac33

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/PhpDocReader.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ public function getReturnClass(ReflectionMethod $method, bool $withoutNamespace
8181
return $this->readReturnClass($method, false, $withoutNamespace);
8282
}
8383

84+
public function isPrimitiveType(string $type): bool
85+
{
86+
return array_key_exists($type, self::PRIMITIVE_TYPES);
87+
}
88+
8489
protected function readReturnClass(ReflectionMethod $method, bool $allowPrimitiveTypes, bool $withoutNamespace = false): array
8590
{
8691
// Use reflection

0 commit comments

Comments
 (0)