Skip to content

Commit

Permalink
[Performance][Testing] Remove $nodeScopeResolver->setAnalysedFiles() …
Browse files Browse the repository at this point in the history
…on AbstractRectorTestCase (#4911)
  • Loading branch information
samsonasik authored Sep 4, 2023
1 parent 4a3627e commit 1812281
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/Testing/PHPUnit/AbstractRectorTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Iterator;
use Nette\Utils\FileSystem;
use Nette\Utils\Strings;
use PHPStan\Analyser\NodeScopeResolver;
use PHPUnit\Framework\ExpectationFailedException;
use Rector\Core\Application\ApplicationFileProcessor;
use Rector\Core\Autoloading\AdditionalAutoloader;
Expand Down Expand Up @@ -250,11 +249,6 @@ private function processFilePath(string $filePath): string
{
$this->dynamicSourceLocatorProvider->setFilePath($filePath);

// needed for PHPStan, because the analyzed file is just created in /temp - need for trait and similar deps
/** @var NodeScopeResolver $nodeScopeResolver */
$nodeScopeResolver = $this->make(NodeScopeResolver::class);
$nodeScopeResolver->setAnalysedFiles([$filePath]);

/** @var ConfigurationFactory $configurationFactory */
$configurationFactory = $this->make(ConfigurationFactory::class);
$configuration = $configurationFactory->createForTests([$filePath]);
Expand Down

0 comments on commit 1812281

Please sign in to comment.