File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -932,7 +932,35 @@ protected function createPhpDocs($class)
932932 continue ;
933933 }
934934 $ arguments = implode (', ' , $ method ['arguments ' ]);
935- $ tagLine = "@method static {$ method ['type ' ]} {$ name }( {$ arguments }) " ;
935+
936+ $ staticMethodNames = [
937+ 'newQuery ' ,
938+ 'query ' ,
939+ 'newModelQuery ' ,
940+ ];
941+
942+ if (in_array ($ name , $ staticMethodNames )) {
943+ $ tagLine = "@method static {$ method ['type ' ]} {$ name }( {$ arguments }) " ;
944+ } else {
945+ $ tagLine = "@method {$ method ['type ' ]} {$ name }( {$ arguments }) " ;
946+ }
947+
948+ if ($ method ['comment ' ] !== '' ) {
949+ $ tagLine .= " {$ method ['comment ' ]}" ;
950+ }
951+ $ tag = Tag::createInstance ($ tagLine , $ phpdoc );
952+ $ phpdoc ->appendTag ($ tag );
953+ }
954+
955+ foreach ($ this ->methods as $ name => $ method ) {
956+ if (in_array ($ name , $ methods )) {
957+ continue ;
958+ }
959+ $ arguments = implode (', ' , $ method ['arguments ' ]);
960+
961+
962+
963+ $ tagLine = "@method {$ method ['type ' ]} {$ name }( {$ arguments }) " ;
936964 if ($ method ['comment ' ] !== '' ) {
937965 $ tagLine .= " {$ method ['comment ' ]}" ;
938966 }
You can’t perform that action at this time.
0 commit comments