Skip to content

Commit 9c85f7d

Browse files
committed
scrutinizer fixes
1 parent 5226079 commit 9c85f7d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/PhpFunctionsScanner.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ public function scan(string $code, string $filename = null): array
2222
{
2323
$ast = $this->parser->parse($code);
2424

25+
if (empty($ast)) {
26+
return [];
27+
}
28+
2529
$traverser = new NodeTraverser();
2630
$visitor = new PhpNodeVisitor($filename, $this->validFunctions);
2731
$traverser->addVisitor($visitor);

src/PhpNodeVisitor.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ public function getFunctions(): array
5757

5858
protected function createFunction(FuncCall $node): ParsedFunction
5959
{
60-
$arguments = [];
6160
$function = new ParsedFunction(
6261
$node->name->getLast(),
6362
$this->filename,

0 commit comments

Comments
 (0)