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

ArgumentNode::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
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