Completed
Push — master ( c45521...844759 )
by stéphane
08:22
created

NodeRoot   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 3 1
A __construct() 0 4 1
A getParent() 0 3 1
1
<?php
2
3
namespace Dallgoot\Yaml;
4
5
/**
6
 *
7
 * @author  Stéphane Rebai <[email protected]>
8
 * @license Apache 2.0
9
 * @link    TODO : url to specific online doc
10
 */
11
class NodeRoot extends Node
12
{
13
    public function __construct()
14
    {
15
        $this->value = new NodeList();
16
        $this->value->setIteratorMode(NodeList::IT_MODE_DELETE);
17
    }
18
19
    public function getParent(int $indent = null, $type = 0):Node
20
    {
21
        return $this;
22
    }
23
24
    public function getValue(&$parent = null)
25
    {
26
        return $this->value;
27
    }
28
}