Skip to content

Commit

Permalink
feat: enable parallel fixing (#5)
Browse files Browse the repository at this point in the history
* chore: make ability to parallel

* refactor: update composer.json to needed parallel
  • Loading branch information
ddevsr authored May 18, 2024
1 parent e5a54a1 commit 10c671c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"require": {
"php": "^8.1",
"ext-tokenizer": "*",
"friendsofphp/php-cs-fixer": "^3.54"
"friendsofphp/php-cs-fixer": "^3.57.1"
},
"require-dev": {
"nexusphp/tachycardia": "^2.1",
Expand Down
2 changes: 2 additions & 0 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use PhpCsFixer\Config;
use PhpCsFixer\ConfigInterface;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;

/**
* The Factory class is invoked on each project's `.php-cs-fixer.dist.php` to create
Expand Down Expand Up @@ -159,6 +160,7 @@ private function invoke(array $overrides = []): ConfigInterface
$rules = array_merge($this->options['rules'], $overrides);

return (new Config($this->ruleset->getName()))
->setParallelConfig(ParallelConfigFactory::detect())
->registerCustomFixers($this->options['customFixers'])
->setCacheFile($this->options['cacheFile'])
->setFinder($this->options['finder'])
Expand Down

0 comments on commit 10c671c

Please sign in to comment.