We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fd3856 commit a11fe43Copy full SHA for a11fe43
src/Parse/VariableParser.php
@@ -30,7 +30,9 @@ public function parse(string $content): ParseResult
30
$functionLikes = $nodeFinder->findInstanceOf($stmts, FunctionLike::class);
31
32
$functions = array_map(function (FunctionLike $function) use ($nodeFinder) {
33
- $func = new Func($function->name->name);
+ $functionIdentifier = $function->name->name ?? $function->getType() . '@' . $function->getStartLine();
34
+
35
+ $func = new Func($functionIdentifier);
36
$variables = $nodeFinder->findInstanceOf($function, Variable::class);
37
foreach ($variables as $variable) {
38
$func->addVariable(new VarReference($variable->name, $variable->getLine()));
0 commit comments