File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,10 @@ public function getNamespace()
176176 */
177177 public function getMethods ()
178178 {
179+ if (count ($ this ->methods ) > 0 ) {
180+ return $ this ->methods ;
181+ }
182+
179183 $ this ->addMagicMethods ();
180184 $ this ->detectMethods ();
181185 return $ this ->methods ;
@@ -411,10 +415,9 @@ public function getDocComment($prefix = "\t\t")
411415 */
412416 protected function removeDuplicateMethodsFromPhpDoc ()
413417 {
414- $ methods = count ($ this ->methods ) > 0 ? $ this ->methods : $ this ->getMethods ();
415418 $ methodNames = array_map (function (Method $ method ) {
416419 return $ method ->getName ();
417- }, $ methods );
420+ }, $ this -> getMethods () );
418421
419422 foreach ($ this ->phpdoc ->getTags () as $ tag ) {
420423 if ($ tag instanceof MethodTag && in_array ($ tag ->getMethodName (), $ methodNames )) {
You can’t perform that action at this time.
0 commit comments