| Total Complexity | 6 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace Mbh\Tree; |
||
| 14 | class Builder |
||
| 15 | { |
||
| 16 | use Traits\Builder; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var NodeInterface[] |
||
| 20 | */ |
||
| 21 | protected $nodeStack = []; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param NodeInterface $node |
||
| 25 | */ |
||
| 26 | public function __construct(NodeInterface $node = null) |
||
| 29 | } |
||
| 30 | |||
| 31 | protected function getNodeAt(int $index): NodeInterface |
||
| 32 | { |
||
| 33 | return $this->nodeStack($index); |
||
| 34 | } |
||
| 35 | |||
| 36 | protected function emptyStack() |
||
| 37 | { |
||
| 38 | $this->nodeStack = []; |
||
| 39 | return $this; |
||
| 40 | } |
||
| 41 | |||
| 42 | protected function pushNode(NodeInterface $node) |
||
| 43 | { |
||
| 44 | array_push($this->nodeStack, $node); |
||
| 45 | return $this; |
||
| 46 | } |
||
| 47 | |||
| 48 | protected function popNode() |
||
| 51 | } |
||
| 52 | } |
||
| 53 |