Passed
Push — main ( 03d0aa...06b87c )
by Stanislav
02:17
created

CircularDependencyException::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 7
ccs 5
cts 5
cp 1
crap 2
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Diezz\YamlToObjectMapper\Resolver;
4
5
use RuntimeException;
6
7
class CircularDependencyException extends RuntimeException
8
{
9 2
    public function __construct(array $path)
10
    {
11 2
        $message = 'Circular dependency detected at path: ';
12 2
        foreach ($path as $item) {
13 2
            $message .= "$item->";
14
        }
15 2
        parent::__construct(substr($message, 0, -2));
16 2
    }
17
}
18