![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/vendor/friendsofphp/php-cs-fixer/src/Runner/Parallel/ |
<?php declare(strict_types=1); /* * This file is part of PHP CS Fixer. * * (c) Fabien Potencier <[email protected]> * Dariusz RumiĆski <[email protected]> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace PhpCsFixer\Runner\Parallel; /** * @author Greg Korba <[email protected]> */ final class ParallelConfig { /** @internal */ public const DEFAULT_FILES_PER_PROCESS = 10; /** @internal */ public const DEFAULT_PROCESS_TIMEOUT = 120; private int $filesPerProcess; private int $maxProcesses; private int $processTimeout; /** * @param positive-int $maxProcesses * @param positive-int $filesPerProcess * @param positive-int $processTimeout */ public function __construct( int $maxProcesses = 2, int $filesPerProcess = self::DEFAULT_FILES_PER_PROCESS, int $processTimeout = self::DEFAULT_PROCESS_TIMEOUT ) { if ($maxProcesses <= 0 || $filesPerProcess <= 0 || $processTimeout <= 0) { throw new \InvalidArgumentException('Invalid parallelisation configuration: only positive integers are allowed'); } $this->maxProcesses = $maxProcesses; $this->filesPerProcess = $filesPerProcess; $this->processTimeout = $processTimeout; } public function getFilesPerProcess(): int { return $this->filesPerProcess; } public function getMaxProcesses(): int { return $this->maxProcesses; } public function getProcessTimeout(): int { return $this->processTimeout; } }