ConfigBuildException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 9
c 1
b 0
f 0
dl 0
loc 18
ccs 0
cts 3
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 16 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Composer\Config\Exception;
6
7
use Throwable;
8
9
final class ConfigBuildException extends Exception
10
{
11
    public function __construct(Throwable $previous)
12
    {
13
        $message = sprintf(
14
            <<<TEXT
15
                An error occurred during configuration build.
16
                The file being processed: "%s:%d".
17
                Error text:
18
                    %s
19
                Please, take care of fixing errors in this file before you continue.
20
                TEXT,
21
            $previous->getFile(),
22
            $previous->getLine(),
23
            $previous->getMessage()
24
        );
25
26
        parent::__construct($message, (int)$previous->getCode());
27
    }
28
}
29