File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1048,6 +1048,11 @@ protected function createPhpDocs($class)
10481048
10491049 $ tagLine = trim ("@ {$ attr } {$ property ['type ' ]} {$ name } {$ property ['comment ' ]}" );
10501050 $ tag = Tag::createInstance ($ tagLine , $ phpdoc );
1051+
1052+ if ($ this ->tagExists ($ phpdoc , $ tag )) {
1053+ continue ;
1054+ }
1055+
10511056 $ phpdoc ->appendTag ($ tag );
10521057 }
10531058
@@ -1762,4 +1767,19 @@ protected function setForeignKeys($schema, $table)
17621767 }
17631768 }
17641769 }
1770+
1771+ /**
1772+ * @param DocBlock $phpdoc
1773+ * @param Tag $tag
1774+ */
1775+ public function tagExists ($ phpdoc , $ tag ): bool
1776+ {
1777+ foreach ($ phpdoc ->getTags () as $ originalTag ) {
1778+ if ($ originalTag ->getContent () == $ tag ->getContent ()) {
1779+ return true ;
1780+ }
1781+ }
1782+
1783+ return false ;
1784+ }
17651785}
You can’t perform that action at this time.
0 commit comments