Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
TreenodeDtoOrdered
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
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
 getIndex
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace pvc\struct\tree\dto;
6
7readonly class TreenodeDtoOrdered extends TreenodeDto
8{
9    /**
10     * @param  non-negative-int  $nodeId
11     * @param  non-negative-int|null  $parentId
12     * @param  non-negative-int|null  $treeId
13     * @param  non-negative-int  $index
14     */
15    public function __construct(
16        int $nodeId,
17        ?int $parentId,
18        ?int $treeId,
19        public int $index,
20    ) {
21        parent::__construct($nodeId, $parentId, $treeId);
22    }
23
24    public function getIndex(): int
25    {
26        return $this->index;
27    }
28}