Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
NodeNotInTreeException
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2/**
3 * @author: Doug Wilbourne (dougwilbourne@gmail.com)
4 */
5
6declare(strict_types=1);
7
8namespace pvc\struct\tree\err;
9
10use pvc\err\stock\LogicException;
11use Throwable;
12
13/**
14 * Class NodeNotInTreeException
15 */
16class 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}