Passed
Push — master ( 22d357...2883c4 )
by Christoffer
02:52
created

NullValueNode::toAST()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Digia\GraphQL\Language\Node;
4
5
use Digia\GraphQL\Language\Location;
6
7
class NullValueNode extends AbstractNode implements ValueNodeInterface
8
{
9
    /**
10
     * NullValueNode constructor.
11
     *
12
     * @param Location|null $location
13
     */
14
    public function __construct(?Location $location)
15
    {
16
        parent::__construct(NodeKindEnum::NULL, $location);
17
    }
18
19
    /**
20
     * @inheritdoc
21
     */
22
    public function toAST(): array
23
    {
24
        return [
25
            'kind' => $this->kind,
26
            'loc'  => $this->getLocationAST(),
27
        ];
28
    }
29
}
30