77use PhpParser \Node \Expr \Variable ;
88use PhpParser \Node \Stmt ;
99use PhpParser \Node \Stmt \ClassMethod ;
10+ use PhpParser \Node \Stmt \Class_ ;
1011use PhpParser \Node \Stmt \Function_ ;
1112use PhpParser \NodeDumper ;
1213use PhpParser \NodeVisitor \FindingVisitor ;
@@ -24,7 +25,7 @@ public function __construct()
2425
2526 /**
2627 * @param list<Stmt> $stmt
27- * @return List <Function_>
28+ * @return list <Function_>
2829 */
2930 private function getFunctions (array $ stmt ): array
3031 {
@@ -35,7 +36,7 @@ private function getFunctions(array $stmt): array
3536 $ traverser ->addVisitor ($ functionVisitor );
3637 $ traverser ->traverse ($ stmt );
3738
38- return $ functionVisitor ->getFoundNodes ();
39+ return $ functionVisitor ->getFoundNodes (); // @phpstan-ignore-line
3940 }
4041
4142 /**
@@ -51,7 +52,7 @@ private function getVariables(Function_|ClassMethod $function): array
5152 $ traverser ->addVisitor ($ variableVisitor );
5253 $ traverser ->traverse ([$ function ]);
5354
54- return $ variableVisitor ->getFoundNodes ();
55+ return $ variableVisitor ->getFoundNodes (); // @phpstan-ignore-line
5556 }
5657
5758 /**
@@ -67,7 +68,7 @@ private function parseFunctions(array $stmts): array
6768 $ variables = $ this ->getVariables ($ foundFunction );
6869 $ func = new Func ($ foundFunction ->name ->name );
6970 foreach ($ variables as $ variable ) {
70- $ func ->addVariable (new VarReference ($ variable ->name , $ variable ->getLine ()));
71+ $ func ->addVariable (new VarReference ($ variable ->name , $ variable ->getLine ())); // @phpstan-ignore-line
7172 }
7273 $ functions [] = $ func ;
7374 }
@@ -76,7 +77,7 @@ private function parseFunctions(array $stmts): array
7677
7778 /**
7879 * @param list<Stmt> $stmt
79- * @return List <Class_>
80+ * @return list <Class_>
8081 */
8182 private function getClasses (array $ stmt ): array
8283 {
@@ -87,7 +88,7 @@ private function getClasses(array $stmt): array
8788 $ traverser ->addVisitor ($ classVisitor );
8889 $ traverser ->traverse ($ stmt );
8990
90- return $ classVisitor ->getFoundNodes ();
91+ return $ classVisitor ->getFoundNodes (); // @phpstan-ignore-line
9192 }
9293
9394 /**
@@ -104,7 +105,7 @@ private function parseClasses(array $stmts): array
104105 $ variables = $ this ->getVariables ($ method );
105106 $ func = new Func (sprintf ('%s::%s ' , $ foundClass ->name , $ method ->name ->name ));
106107 foreach ($ variables as $ variable ) {
107- $ func ->addVariable (new VarReference ($ variable ->name , $ variable ->getLine ()));
108+ $ func ->addVariable (new VarReference ($ variable ->name , $ variable ->getLine ())); // @phpstan-ignore-line
108109 }
109110 $ methods [] = $ func ;
110111 }
0 commit comments