Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
NodeNotInTreeException | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
3 / 3 |
|
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( |
19 | ?int $treeid, |
20 | int $nodeid, |
21 | ?Throwable $prev = null |
22 | ) { |
23 | /** |
24 | * it is possible for nodes to be created without having a treeid set |
25 | */ |
26 | $treeidString = (is_null($treeid) ? '{treeid not set}' |
27 | : (string)$treeid); |
28 | parent::__construct($treeidString, $nodeid, $prev); |
29 | } |
30 | } |