The expression return $this->type could return the type Digia\GraphQL\Util\SerializationInterface which is incompatible with the type-hinted return Digia\GraphQL\Language\AST\Node\TypeNodeInterface. Consider adding an additional type-check to rule them out.
The method toArray() does not exist on Digia\GraphQL\Language\AST\Node\TypeNodeInterface. Since it exists in all sub-types, consider adding an abstract or default implementation to Digia\GraphQL\Language\AST\Node\TypeNodeInterface.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation