From 46a8fd6c6ed77eba3764fcc32a971a2873ad829f Mon Sep 17 00:00:00 2001 From: Roman Lytvynenko Date: Thu, 12 Jan 2023 12:46:13 +0200 Subject: [PATCH] fixed removed type inferrence when phpdoc is used for array item --- src/Support/Generator/TypeTransformer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Support/Generator/TypeTransformer.php b/src/Support/Generator/TypeTransformer.php index 5708d1e5..ca0cd630 100644 --- a/src/Support/Generator/TypeTransformer.php +++ b/src/Support/Generator/TypeTransformer.php @@ -109,7 +109,7 @@ public function transform(Type $type) $openApiType = $varNode && $varNode->type ? $this->transform(PhpDocTypeHelper::toType($varNode->type)) - : new UnknownType; + : $openApiType; if ($varNode && $varNode->description) { $openApiType->setDescription($varNode->description);