Completed
Pull Request — master (#354)
by Strahinja
04:13
created

Boolean::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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