Completed
Pull Request — master (#70)
by Christoffer
02:06
created

ArgumentNode   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 7 1
1
<?php
2
3
namespace Digia\GraphQL\Language\Node;
4
5
use Digia\GraphQL\Language\Node\NodeKindEnum;
6
7
class ArgumentNode extends AbstractNode implements NodeInterface
8
{
9
10
    use NameTrait;
11
    use ValueLiteralTrait;
12
13
    /**
14
     * @var string
15
     */
16
    protected $kind = NodeKindEnum::ARGUMENT;
17
18
    /**
19
     * @return array
20
     */
21
    public function toArray(): array
22
    {
23
        return [
24
            'kind'  => $this->kind,
25
            'name'  => $this->getNameAsArray(),
26
            'value' => $this->getValueAsArray(),
27
            'loc'   => $this->getLocationAsArray(),
28
        ];
29
    }
30
}
31