Skip to content

Commit

Permalink
Code style cleanup to conform with newer recommendations.
Browse files Browse the repository at this point in the history
  • Loading branch information
BusterNeece committed Mar 9, 2024
1 parent 8a41670 commit b9da508
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/PhpFunctionsScanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
namespace Gettext\Scanner;

use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor;
use PhpParser\Parser;
use PhpParser\ParserFactory;

Expand All @@ -27,9 +26,9 @@ public function scan(string $code, string $filename): array
return [];
}

$traverser = new NodeTraverser();
$visitor = $this->createNodeVisitor($filename);
$traverser->addVisitor($visitor);

$traverser = new NodeTraverser($visitor);
$traverser->traverse($ast);

return $visitor->getFunctions();
Expand Down
1 change: 0 additions & 1 deletion src/PhpScanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
namespace Gettext\Scanner;

use Gettext\Translation;
use Gettext\Translations;

/**
* Class to scan PHP files and get gettext translations
Expand Down

0 comments on commit b9da508

Please sign in to comment.