Skip to content

Commit

Permalink
[DX] Make use of addParameter() (#4801)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba authored Aug 16, 2023
1 parent 41de617 commit 58c67ff
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions packages/Config/RectorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,7 @@ public function importShortClasses(bool $importShortClasses = true): void
public function phpstanConfig(string $filePath): void
{
Assert::fileExists($filePath);

$paths = SimpleParameterProvider::provideArrayParameter(Option::PHPSTAN_FOR_RECTOR_PATHS);

$paths[] = $filePath;

SimpleParameterProvider::setParameter(Option::PHPSTAN_FOR_RECTOR_PATHS, $paths);
SimpleParameterProvider::addParameter(Option::PHPSTAN_FOR_RECTOR_PATHS, [$filePath]);
}

/**
Expand All @@ -153,9 +148,9 @@ public function phpstanConfig(string $filePath): void
*/
public function phpstanConfigs(array $filePaths): void
{
foreach ($filePaths as $filePath) {
$this->phpstanConfig($filePath);
}
Assert::allString($filePaths);
Assert::allFileExists($filePaths);
SimpleParameterProvider::addParameter(Option::PHPSTAN_FOR_RECTOR_PATHS, $filePaths);
}

/**
Expand Down

0 comments on commit 58c67ff

Please sign in to comment.