Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
TreenodeDtoUnordered
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * @author: Doug Wilbourne (dougwilbourne@gmail.com)
5 */
6
7declare(strict_types=1);
8
9namespace pvc\struct\tree\dto;
10
11use pvc\interfaces\struct\dto\DtoInterface;
12
13/**
14 * @template PayloadType
15 */
16readonly class TreenodeDtoUnordered implements DtoInterface
17{
18    public function __construct(
19        /**
20         * @var non-negative-int
21         */
22        public int   $nodeId,
23
24        /**
25         * @var non-negative-int|null
26         */
27        public ?int  $parentId,
28
29        /**
30         * @var non-negative-int|null
31         * dto is allowed to have a null treeId.  The node hydration method takes two arguments: the first is this dto
32         * and the second is the containing tree (because the node keeps a reference to its containing tree).  If this
33         * dto has a non-null treeid, then the treeid value of this dto is compared to the treeid of the containing
34         * tree to ensure they are the same.  But if this dto's treeid is null, the node hydration method will use the
35         * treeid from the containing tree.
36         */
37        public ?int  $treeId,
38
39    )
40    {
41    }
42}