| Total Complexity | 9 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 95.24% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class NodeRoot extends Node |
||
| 12 | { |
||
| 13 | /** @var null|YamlObject */ |
||
| 14 | private $_yamlObject; |
||
| 15 | /** @var NodeList */ |
||
| 16 | public $value; |
||
| 17 | |||
| 18 | 7 | public function __construct() |
|
| 19 | { |
||
| 20 | 7 | $this->value = new NodeList(); |
|
| 21 | 7 | } |
|
| 22 | |||
| 23 | 1 | public function getParent(int $indent = null, $type = 0):Node |
|
| 24 | { |
||
| 25 | 1 | if ($this->_parent !== null) { |
|
| 26 | 1 | throw new \ParseError(__CLASS__." can NOT have a parent, something's wrong", 1); |
|
| 27 | } |
||
| 28 | 1 | return $this; |
|
| 29 | } |
||
| 30 | |||
| 31 | 1 | public function getRoot():Node |
|
| 34 | } |
||
| 35 | |||
| 36 | 2 | public function getYamlObject():YamlObject |
|
| 37 | { |
||
| 38 | 2 | if ($this->_yamlObject) { |
|
| 39 | 1 | return $this->_yamlObject; |
|
| 40 | } |
||
| 41 | 1 | throw new \Exception("YamlObject has not been set yet", 1); |
|
| 42 | } |
||
| 43 | |||
| 44 | 1 | public function build(&$parent = null) |
|
| 47 | } |
||
| 48 | |||
| 49 | 3 | private function buildFinal(YamlObject $yamlObject):YamlObject |
|
| 50 | { |
||
| 57 | } |
||
| 58 | } |