Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php declare(strict_types=1); /* * This file is part of PHP CS Fixer. * * (c) Fabien..
Decoded Output download
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiski <[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;
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiski <[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;
}
}
Function Calls
None |
Stats
MD5 | 27136fb5e8127cca5cf7ea612bdfbbf3 |
Eval Count | 0 |
Decode Time | 107 ms |