Total Complexity | 6 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php namespace Mbh\Tree; |
||
15 | class Builder |
||
16 | { |
||
17 | use \Mbh\Tree\Traits\Builder; |
||
18 | |||
19 | /** |
||
20 | * @var Stack |
||
21 | */ |
||
22 | protected $nodeStack = null; |
||
23 | |||
24 | /** |
||
25 | * @param NodeInterface $node |
||
26 | */ |
||
27 | public function __construct(NodeInterface $node = null) |
||
31 | } |
||
32 | |||
33 | protected function peekStack(): NodeInterface |
||
36 | } |
||
37 | |||
38 | protected function emptyStack() |
||
39 | { |
||
40 | $this->nodeStack->clear(); |
||
41 | return $this; |
||
42 | } |
||
43 | |||
44 | protected function pushNode(NodeInterface $node) |
||
45 | { |
||
46 | $this->nodeStack->push($node); |
||
47 | return $this; |
||
48 | } |
||
49 | |||
50 | protected function popNode() |
||
53 | } |
||
54 | } |
||
55 |