File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed
Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 1414use Rector \Contract \Rector \ConfigurableRectorInterface ;
1515use Rector \Contract \Rector \RectorInterface ;
1616use Rector \DependencyInjection \Laravel \ContainerMemento ;
17+ use Rector \Enum \Config \Defaults ;
1718use Rector \Exception \ShouldNotHappenException ;
1819use Rector \Skipper \SkipCriteriaResolver \SkippedClassResolver ;
1920use Rector \Validation \RectorConfigValidator ;
@@ -93,8 +94,11 @@ public function disableParallel(): void
9394 SimpleParameterProvider::setParameter (Option::PARALLEL , false );
9495 }
9596
96- public function parallel (int $ processTimeout = 120 , int $ maxNumberOfProcess = 16 , int $ jobSize = 16 ): void
97- {
97+ public function parallel (
98+ int $ processTimeout = 120 ,
99+ int $ maxNumberOfProcess = Defaults::PARALLEL_MAX_NUMBER_OF_PROCESS ,
100+ int $ jobSize = 16
101+ ): void {
98102 SimpleParameterProvider::setParameter (Option::PARALLEL , true );
99103 SimpleParameterProvider::setParameter (Option::PARALLEL_JOB_TIMEOUT_IN_SECONDS , $ processTimeout );
100104 SimpleParameterProvider::setParameter (Option::PARALLEL_MAX_NUMBER_OF_PROCESSES , $ maxNumberOfProcess );
Original file line number Diff line number Diff line change 2020use Rector \Contract \Rector \ConfigurableRectorInterface ;
2121use Rector \Contract \Rector \RectorInterface ;
2222use Rector \Doctrine \Set \DoctrineSetList ;
23+ use Rector \Enum \Config \Defaults ;
2324use Rector \Exception \Configuration \InvalidConfigurationException ;
2425use Rector \Php \PhpVersionResolver \ComposerJsonPhpVersionResolver ;
2526use Rector \PHPUnit \Set \PHPUnitSetList ;
@@ -90,7 +91,7 @@ final class RectorConfigBuilder
9091
9192 private int $ parallelTimeoutSeconds = 120 ;
9293
93- private int $ parallelMaxNumberOfProcess = 16 ;
94+ private int $ parallelMaxNumberOfProcess = Defaults:: PARALLEL_MAX_NUMBER_OF_PROCESS ;
9495
9596 private int $ parallelJobSize = 16 ;
9697
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace Rector \Enum \Config ;
6+
7+ final class Defaults
8+ {
9+ /**
10+ * @var int
11+ */
12+ public const PARALLEL_MAX_NUMBER_OF_PROCESS = 32 ;
13+ }
You can’t perform that action at this time.
0 commit comments