Completed
Pull Request — master (#251)
by
unknown
05:24
created

Fake::getSubNodeNames()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 0
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace PHPSA\Node\Scalar;
4
5
class Fake extends \PhpParser\Node\Scalar
6
{
7
    /** @var mixed */
8
    public $value;
9
10
    /** @var mixed */
11
    public $type;
12
13
    /**
14
     * Constructs a fake node.
15
     *
16
     * @param mixed $value      Value of the Node
17
     * @param mixed $type      Type of the node
18
     * @param array $attributes Additional attributes
19
     */
20
    public function __construct($value, $type, array $attributes = array())
21
    {
22
        parent::__construct($attributes);
23
24
        $this->value = $value;
25
        $this->type = $type;
26
    }
27
28
    //@codeCoverageIgnoreStart
29
    /**
30
     * @return array
31
     */
32
    public function getSubNodeNames()
33
    {
34
        return ['value', 'type'];
35
    }
36
    //@codeCoverageIgnoreEnd
37
}
38