Skip to content

Commit

Permalink
using nameresolver copied
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessandroMinoccheri committed Nov 17, 2022
1 parent 4f74c38 commit c4e7828
Show file tree
Hide file tree
Showing 5 changed files with 332 additions and 86 deletions.
71 changes: 0 additions & 71 deletions src/Analyzer/DocBlockNameResolver.php

This file was deleted.

5 changes: 1 addition & 4 deletions src/Analyzer/FileParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use PhpParser\ErrorHandler\Collecting;
use PhpParser\Lexer\Emulative;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NameResolver;
use PhpParser\ParserFactory;

class FileParser implements Parser
Expand All @@ -29,8 +28,7 @@ public function __construct(
NodeTraverser $traverser,
FileVisitor $fileVisitor,
NameResolver $nameResolver,
TargetPhpVersion $targetPhpVersion,
DocBlockNameResolver $docBlockNameResolver
TargetPhpVersion $targetPhpVersion
) {
$this->fileVisitor = $fileVisitor;
$this->parsingErrors = [];
Expand All @@ -43,7 +41,6 @@ public function __construct(
$this->parser = (new ParserFactory())->create(ParserFactory::PREFER_PHP7, $lexer);
$this->traverser = $traverser;
$this->traverser->addVisitor($nameResolver);
$this->traverser->addVisitor($docBlockNameResolver);
$this->traverser->addVisitor($this->fileVisitor);
}

Expand Down
4 changes: 1 addition & 3 deletions src/Analyzer/FileParserFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use Arkitect\CLI\TargetPhpVersion;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NameResolver;

class FileParserFactory
{
Expand All @@ -16,8 +15,7 @@ public static function createFileParser(TargetPhpVersion $targetPhpVersion): Fil
new NodeTraverser(),
new FileVisitor(),
new NameResolver(),
$targetPhpVersion,
new DocBlockNameResolver()
$targetPhpVersion
);
}
}
Loading

0 comments on commit c4e7828

Please sign in to comment.