| Total Complexity | 4 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 6 | final class Tree |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var NodeCollection |
||
| 10 | */ |
||
| 11 | private $nodes; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var int |
||
| 15 | */ |
||
| 16 | private $startLine; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var int |
||
| 20 | */ |
||
| 21 | private $endLine; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Tree constructor. |
||
| 25 | * |
||
| 26 | * @param NodeCollection $nodes |
||
| 27 | * @param int $startLine |
||
| 28 | * @param int $endLine |
||
| 29 | */ |
||
| 30 | public function __construct(NodeCollection $nodes, int $startLine, int $endLine) |
||
| 31 | { |
||
| 32 | $this->nodes = $nodes; |
||
| 33 | $this->startLine = $startLine; |
||
| 34 | $this->endLine = $endLine; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return NodeCollection |
||
| 39 | */ |
||
| 40 | public function nodes(): NodeCollection |
||
| 41 | { |
||
| 42 | return $this->nodes; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return int |
||
| 47 | */ |
||
| 48 | public function startLine(): int |
||
| 49 | { |
||
| 50 | return $this->startLine; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return int |
||
| 55 | */ |
||
| 56 | public function endLine(): int |
||
| 59 | } |
||
| 60 | } |
||
| 61 |