Skip to content

Commit

Permalink
Fix AnnotationReader returning Input classes as Type classes. (#532)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoelker committed Dec 18, 2022
1 parent 677a3b7 commit 25d243f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/AnnotationReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ static function ($attribute) {
public function getTypeAnnotation(ReflectionClass $refClass): TypeInterface|null
{
try {
$type = $this->getClassAnnotation($refClass, Type::class)
?? $this->getClassAnnotation($refClass, Input::class);
$type = $this->getClassAnnotation($refClass, Type::class);

if ($type !== null && $type->isSelfType()) {
$type->setClass($refClass->getName());
Expand Down

0 comments on commit 25d243f

Please sign in to comment.