Completed
Push — master ( d7fcc6...aeb790 )
by Christoffer
02:03
created

EnumValueDefinitionNode   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

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

1 Method

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