Total Complexity | 13 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class NodeTag extends NodeActions |
||
13 | { |
||
14 | public function isAwaitingChild(Node $node):bool |
||
15 | { |
||
16 | return is_null($this->value); |
||
17 | } |
||
18 | |||
19 | public function getTargetOnEqualIndent(Node &$node):Node |
||
20 | { |
||
21 | if (is_null($this->value)) { |
||
22 | return $this; |
||
23 | } else { |
||
24 | return $this->getParent(); |
||
25 | } |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * Builds a tag and its value (also built) and encapsulates them in a Tag object. |
||
30 | * |
||
31 | * @param array|object|null $parent The parent |
||
32 | * |
||
33 | * @return Tag|mixed The tag object of class Dallgoot\Yaml\Tag. |
||
34 | */ |
||
35 | public function build(&$parent = null) |
||
56 | } |
||
57 | } |
||
58 | } |