File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -321,14 +321,9 @@ public function getDeclaration(): string
321
321
return "ZEND_FUNCTION( $ this ->name ); \n" ;
322
322
}
323
323
324
- public function getName (): string
325
- {
326
- return $ this ->className ? "$ this ->className :: $ this ->name " : $ this ->name ;
327
- }
328
-
329
324
public function __toString ()
330
325
{
331
- return $ this ->getName () ;
326
+ return $ this ->className ? " $ this -> className :: $ this -> name " : $ this -> name ;
332
327
}
333
328
}
334
329
@@ -642,7 +637,7 @@ function parseFunctionLike(
642
637
$ args = [];
643
638
$ numRequiredArgs = 0 ;
644
639
$ foundVariadic = false ;
645
- static $ warnings = [] ;
640
+ $ hasParameterWarning = false ;
646
641
foreach ($ func ->getParams () as $ i => $ param ) {
647
642
$ varName = $ param ->var ->name ;
648
643
$ preferRef = !empty ($ paramMeta [$ varName ]['preferRef ' ]);
@@ -661,8 +656,8 @@ function parseFunctionLike(
661
656
}
662
657
663
658
$ type = $ param ->type ? Type::fromNode ($ param ->type ) : null ;
664
- if ($ type === null && !isset ($ docParamTypes [$ varName ]) && !isset ( $ warnings [ $ name -> getName ()]) ) {
665
- $ warnings [ $ name -> getName ()] = true ;
659
+ if ($ type === null && !isset ($ docParamTypes [$ varName ]) && !$ hasParameterWarning ) {
660
+ $ hasParameterWarning = true ;
666
661
//throw new Exception("Missing argument type for function $name()");
667
662
echo "Warning: Missing argument type for function $ name() \n" ;
668
663
}
You can’t perform that action at this time.
0 commit comments