Completed
Push — master ( 530c00...13d490 )
by Дмитрий
02:40
created

Fake::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1
Metric Value
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
crap 1
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 30
    public function __construct($value, $type, array $attributes = array())
21
    {
22 30
        parent::__construct($attributes);
23
24 30
        $this->value = $value;
25 30
        $this->type = $type;
26 30
    }
27
28
    //@codeCoverageIgnoreStart
29
    public function getSubNodeNames()
30
    {
31
        return array('value', 'type');
32
    }
33
    //@codeCoverageIgnoreEnd
34
}
35