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

Nil   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 25
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 getSubNodeNames() 0 4 1
A __construct() 0 5 1
1
<?php
2
3
namespace PHPSA\Node\Scalar;
4
5
/**
6
 * Null node extension
7
 */
8
class Nil extends \PhpParser\Node\Scalar
9
{
10
    /** @var null */
11
    public $value;
12
13
    /**
14
     * @param null $value
15
     * @param array $attributes Additional attributes
16
     */
17
    public function __construct($value = null, array $attributes = array())
18
    {
19
        parent::__construct($attributes);
20
        $this->value = $value;
21
    }
22
23
    //@codeCoverageIgnoreStart
24
    /**
25
     * @return array
26
     */
27
    public function getSubNodeNames()
28
    {
29
        return ['value'];
30
    }
31
    //@codeCoverageIgnoreEnd
32
}
33