mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Filter duplicate properties
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user