MissingNodeException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
1
<?php
2
3
namespace AmaTeam\TreeAccess\API\Exception;
4
5
use AmaTeam\TreeAccess\Paths;
6
use Throwable;
7
8
class MissingNodeException extends IllegalTargetException
9
{
10
    /**
11
     * @param string[] $path
12
     * @param string|null $message
13
     * @param Throwable|null $previous
14
     */
15 3
    public function __construct(array $path, $message = null, Throwable $previous = null)
16
    {
17 3
        if ($message === null) {
18 1
            $template = 'Node at requested path `%s` doesn\'t exist';
19 1
            $message = sprintf($template, Paths::toString($path));
20
        }
21 3
        parent::__construct($path, $message, $previous);
22 3
    }
23
}
24