Completed
Pull Request — master (#243)
by
unknown
03:31
created

Boolean   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 27
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getSubNodeNames() 0 4 1
1
<?php
2
3
namespace PHPSA\Node\Scalar;
4
5
class Boolean extends \PhpParser\Node\Scalar
6
{
7
    /** @var boolean Number value */
8
    public $value;
9
10
    /**
11
     * Constructs a boolean node.
12
     *
13
     * @param boolean $value      Value of the number
14
     * @param array $attributes Additional attributes
15
     */
16
    public function __construct($value, array $attributes = array())
17
    {
18
        parent::__construct($attributes);
19
        $this->value = $value;
20
    }
21
22
    //@codeCoverageIgnoreStart
23
    /**
24
     * @return array
25
     */
26
    public function getSubNodeNames()
27
    {
28
        return ['value'];
29
    }
30
    //@codeCoverageIgnoreEnd
31
}
32