Filter duplicate properties

This commit is contained in:
Barry vd. Heuvel
2024-02-18 13:28:36 +01:00
parent 6709385ca5
commit 381d41d638
+8
View File
@@ -1004,6 +1004,14 @@ class ModelsCommand extends Command
}
}
$tags = collect($tags)->unique(function (Tag $tag) {
if (method_exists($tag, 'getVariableName')) {
return $tag->getName() . ' ' . $tag->getVariableName();
}
return (string) $tag;
})->toArray();
$phpdoc = new DocBlock($summary ?: '', $description, $tags, $phpDocContext);
$docComment = $serializer->getDocComment($phpdoc);