| Total Complexity | 6 | 
| Total Lines | 50 | 
| Duplicated Lines | 0 % | 
| Coverage | 0% | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 10 | class ProcessConversionException extends RuntimeException implements ProcessExceptionInterface  | 
            ||
| 11 | { | 
            ||
| 12 | /** @var Process */  | 
            ||
| 13 | private $process;  | 
            ||
| 14 | |||
| 15 | public function __construct(Process $process, SymfonyProcessException\RuntimeException $previousException)  | 
            ||
| 16 |     { | 
            ||
| 17 | parent::__construct(  | 
            ||
| 18 | $previousException->getMessage(),  | 
            ||
| 19 | $previousException->getCode(),  | 
            ||
| 20 | $previousException  | 
            ||
| 21 | );  | 
            ||
| 22 | |||
| 23 | $this->process = $process;  | 
            ||
| 24 | }  | 
            ||
| 25 | |||
| 26 | /**  | 
            ||
| 27 | * Return symfony process object.  | 
            ||
| 28 | */  | 
            ||
| 29 | public function getProcess(): Process  | 
            ||
| 30 |     { | 
            ||
| 31 | return $this->process;  | 
            ||
| 32 | }  | 
            ||
| 33 | |||
| 34 | public function wasCausedByFailure(): bool  | 
            ||
| 35 |     { | 
            ||
| 36 | return $this->getPrevious() instanceof SymfonyProcessException\ProcessFailedException;  | 
            ||
| 37 | }  | 
            ||
| 38 | |||
| 39 | public function wasCausedBySignal(): bool  | 
            ||
| 40 |     { | 
            ||
| 41 | return $this->getPrevious() instanceof SymfonyProcessException\ProcessSignaledException;  | 
            ||
| 42 | }  | 
            ||
| 43 | |||
| 44 | public function wasCausedByTimeout(): bool  | 
            ||
| 47 | }  | 
            ||
| 48 | |||
| 49 | /**  | 
            ||
| 50 | * @return SymfonyProcessException\ProcessFailedException|SymfonyProcessException\ProcessSignaledException|SymfonyProcessException\ProcessTimedOutException  | 
            ||
| 51 | */  | 
            ||
| 52 | public function getSymfonyProcessRuntimeException(): SymfonyProcessException\RuntimeException  | 
            ||
| 60 | }  | 
            ||
| 61 | }  | 
            ||
| 62 |