Failed Conditions
Push — master ( 01d6ae...9ca6d9 )
by Philippe
534:14 queued 469:10
created

ProcessHasErrorOutputException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 16
nc 1
nop 3
dl 0
loc 19
rs 9.7333
c 0
b 0
f 0
ccs 8
cts 8
cp 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PhpSpellcheck\Exception;
6
7
class ProcessHasErrorOutputException extends \RuntimeException implements ExceptionInterface
8
{
9 4
    public function __construct(string $errorOutput, string $parsedText, string $command)
10
    {
11
        $exceptionTemplateMessage = <<<'MSG'
12 4
Process has generated the following output errors:
13
14
%s
15
16
With command: "%s"
17
18
For text:
19
"%s"
20
MSG;
21
22 4
        parent::__construct(
23 4
            \Safe\sprintf(
24 4
                $exceptionTemplateMessage,
25 4
                $errorOutput,
26 4
                $command,
27 4
                $parsedText
28
            )
29
        );
30 4
    }
31
}
32