Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | 12 | public function __construct($process) |
|
19 | { |
||
20 | 12 | if (!\class_exists(Process::class)) { |
|
21 | throw new \LogicException(\sprintf('"symfony/process" is required to use "%s". Install with "composer require symfony/process".', self::class)); |
||
22 | } |
||
23 | |||
24 | 12 | if (!$process instanceof Process) { |
|
25 | 11 | $process = Process::fromShellCommandline($process); |
|
26 | } |
||
27 | |||
28 | 12 | $this->process = $process; |
|
29 | |||
30 | 12 | parent::__construct($process->getCommandLine()); |
|
31 | 12 | } |
|
56 |