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

ProcessHasErrorOutputException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 21
rs 10
c 0
b 0
f 0
ccs 8
cts 8
cp 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 19 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