Skip to content

Commit

Permalink
Renamed DirectParser to RichParser
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Oct 22, 2020
1 parent 642dcd1 commit 93bbcf2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conf/config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ services:
autowired: no

currentPhpVersionParser:
class: PHPStan\Parser\DirectParser
class: PHPStan\Parser\RichParser
arguments:
parser: @currentPhpVersionPhpParser
lexer: @currentPhpVersionLexer
Expand Down
2 changes: 1 addition & 1 deletion src/Parser/DirectParser.php → src/Parser/RichParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use PHPStan\File\FileReader;
use PHPStan\NodeVisitor\StatementOrderVisitor;

class DirectParser implements Parser
class RichParser implements Parser
{

private \PhpParser\Parser $parser;
Expand Down
4 changes: 2 additions & 2 deletions tests/PHPStan/Analyser/AnalyserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
use PHPStan\Dependency\ExportedNodeResolver;
use PHPStan\File\RelativePathHelper;
use PHPStan\NodeVisitor\StatementOrderVisitor;
use PHPStan\Parser\DirectParser;
use PHPStan\Parser\NodeChildrenVisitor;
use PHPStan\Parser\RichParser;
use PHPStan\Php\PhpVersion;
use PHPStan\PhpDoc\PhpDocInheritanceResolver;
use PHPStan\PhpDoc\PhpDocNodeResolver;
Expand Down Expand Up @@ -521,7 +521,7 @@ private function createAnalyser(bool $reportUnmatchedIgnoredErrors): \PHPStan\An
$fileAnalyser = new FileAnalyser(
$this->createScopeFactory($broker, $typeSpecifier),
$nodeScopeResolver,
new DirectParser(
new RichParser(
new \PhpParser\Parser\Php7($lexer),
$lexer,
new \PhpParser\NodeVisitor\NameResolver(),
Expand Down

0 comments on commit 93bbcf2

Please sign in to comment.