diff --git a/src/Application/ApplicationFileProcessor.php b/src/Application/ApplicationFileProcessor.php index 621a7e5e660..6ca4d9f602a 100644 --- a/src/Application/ApplicationFileProcessor.php +++ b/src/Application/ApplicationFileProcessor.php @@ -78,7 +78,7 @@ public function run(Configuration $configuration, InputInterface $input): array $systemErrorsAndFileDiffs = $this->runParallel($fileInfos, $configuration, $input); } else { // 1. collect all files from files+dirs provided paths - $files = $this->fileFactory->createFromPaths($configuration->getPaths(), $configuration); + $files = $this->fileFactory->createFromPaths($fileInfos); // 2. PHPStan has to know about all files too $this->configurePHPStanNodeScopeResolver($files); diff --git a/src/ValueObjectFactory/Application/FileFactory.php b/src/ValueObjectFactory/Application/FileFactory.php index 16da19873bf..2da30c48a0b 100644 --- a/src/ValueObjectFactory/Application/FileFactory.php +++ b/src/ValueObjectFactory/Application/FileFactory.php @@ -42,13 +42,11 @@ public function createFileInfosFromPaths(array $paths, Configuration $configurat } /** - * @param string[] $paths + * @param string[] $filePaths * @return File[] */ - public function createFromPaths(array $paths, Configuration $configuration): array + public function createFromPaths(array $filePaths): array { - $filePaths = $this->createFileInfosFromPaths($paths, $configuration); - $files = []; foreach ($filePaths as $filePath) { $files[] = new File($filePath, FileSystem::read($filePath));