Skip to content

Commit c1ec0bd

Browse files
committed
Cleanup
1 parent f595e35 commit c1ec0bd

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

src/Parser/PathRoutingParser.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
class PathRoutingParser implements Parser
1010
{
1111

12-
private ?string $singleReflectionFile;
13-
1412
/** @var bool[] filePath(string) => bool(true) */
1513
private array $analysedFiles = [];
1614

@@ -19,10 +17,8 @@ public function __construct(
1917
private Parser $currentPhpVersionRichParser,
2018
private Parser $currentPhpVersionSimpleParser,
2119
private Parser $php8Parser,
22-
?string $singleReflectionFile,
2320
)
2421
{
25-
$this->singleReflectionFile = $singleReflectionFile !== null ? $fileHelper->normalizePath($singleReflectionFile) : null;
2622
}
2723

2824
/**
@@ -44,7 +40,7 @@ public function parseFile(string $file): array
4440
}
4541

4642
$file = $this->fileHelper->normalizePath($file);
47-
if (!isset($this->analysedFiles[$file]) && $file !== $this->singleReflectionFile) {
43+
if (!isset($this->analysedFiles[$file])) {
4844
return $this->currentPhpVersionSimpleParser->parseFile($file);
4945
}
5046

src/Reflection/BetterReflection/BetterReflectionSourceLocatorFactory.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ public function __construct(
5555
private array $analysedPaths,
5656
private array $composerAutoloaderProjectPaths,
5757
private array $analysedPathsFromConfig,
58-
private ?string $singleReflectionFile,
5958
)
6059
{
6160
}
@@ -64,10 +63,6 @@ public function create(): SourceLocator
6463
{
6564
$locators = [];
6665

67-
if ($this->singleReflectionFile !== null) {
68-
$locators[] = $this->optimizedSingleFileSourceLocatorRepository->getOrCreate($this->singleReflectionFile);
69-
}
70-
7166
$astLocator = new Locator($this->parser);
7267
$locators[] = new AutoloadFunctionsSourceLocator(
7368
new AutoloadSourceLocator($this->fileNodesFetcher, false),

tests/PHPStan/Parser/CachedParserTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public function testParseTheSameFileWithDifferentMethod(): void
8585
self::getContainer()->getService('currentPhpVersionRichParser'),
8686
self::getContainer()->getService('currentPhpVersionSimpleDirectParser'),
8787
self::getContainer()->getService('php8Parser'),
88-
null
8988
);
9089
$parser = new CachedParser($pathRoutingParser, 500);
9190
$path = $fileHelper->normalizePath(__DIR__ . '/data/test.php');

0 commit comments

Comments
 (0)