Passed
Push — master ( 419cde...d38a64 )
by stéphane
02:51
created

NodeList::__debugInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Dallgoot\Yaml;
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
4
use Dallgoot\Yaml as Y;
5
6
/**
7
 * TODO
8
 * @category tag in class comment
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
Coding Style introduced by
Category name "tag in class comment" is not valid; consider "Tag_In_Class_Comment" instead
Loading history...
9
 * @package tag in class comment
1 ignored issue
show
Coding Style introduced by
Package name "tag in class comment" is not valid; consider "Tag_In_Class_Comment" instead
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
10
 * @author tag in class comment
1 ignored issue
show
Coding Style introduced by
Content of the @author tag must be in the form "Display Name <[email protected]>"
Loading history...
Coding Style introduced by
Tag value indented incorrectly; expected 3 spaces but found 1
Loading history...
11
 * @license tag in class comment
1 ignored issue
show
Coding Style introduced by
Tag value indented incorrectly; expected 2 spaces but found 1
Loading history...
12
 */
0 ignored issues
show
Coding Style introduced by
Missing @link tag in class comment
Loading history...
13
class NodeList extends \SplDoublyLinkedList
14
{
15
    /* @var null|int */
16
    public $type = null;//Y\LITT_FOLDED;
17
18
    public function __construct()
0 ignored issues
show
Coding Style introduced by
Missing function doc comment
Loading history...
19
    {
20
        $this->setIteratorMode(NodeList::IT_MODE_KEEP);
21
    }
22
23
    // public function __debugInfo():array
24
    // {
25
    //     return ['type' => Y::getName($this->type), "dllist" => $this->dllist];
26
    // }
27
28
    // public static function __set_state($an_array)
29
    // {
30
    //     $o = new stdClass;
31
    //     $o->type = Y::getName($this->type);
32
    //     return $o;
33
    // }
34
35
    public function getTypes():int
0 ignored issues
show
Coding Style introduced by
You must use "/**" style comments for a function comment
Loading history...
36
    {
37
        $types = 0;
38
        foreach ($this as $child) {
39
            $types &= $child->type;
40
        }
41
        return $types;
42
    }
43
}
44