Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class Result implements \Countable, \IteratorAggregate |
||
11 | { |
||
12 | /** |
||
13 | * @var int<0, max> |
||
14 | */ |
||
15 | public int $count = 0; |
||
16 | |||
17 | /** |
||
18 | * @var Node[] |
||
19 | */ |
||
20 | public array $items = []; |
||
21 | |||
22 | 22 | public function count() : int |
|
23 | { |
||
24 | 22 | return max(0, $this->count); |
|
25 | } |
||
26 | |||
27 | 2 | public function getIterator() : \Traversable |
|
30 | } |
||
31 | } |
||
32 |