Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
NodeNotInTreeException | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * @author: Doug Wilbourne (dougwilbourne@gmail.com) |
4 | */ |
5 | |
6 | declare(strict_types=1); |
7 | |
8 | namespace pvc\struct\tree\err; |
9 | |
10 | use pvc\err\stock\LogicException; |
11 | use Throwable; |
12 | |
13 | /** |
14 | * Class NodeNotInTreeException |
15 | */ |
16 | class NodeNotInTreeException extends LogicException |
17 | { |
18 | public function __construct(?int $treeid, int $nodeid, ?Throwable $prev = null) |
19 | { |
20 | /** |
21 | * it is possible for nodes to be created without having a treeid set |
22 | */ |
23 | $treeidString = (is_null($treeid) ? '{treeid not set}' : (string)$treeid); |
24 | parent::__construct($treeidString, $nodeid, $prev); |
25 | } |
26 | } |