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

InterfaceTypeExtensionNode   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 InterfaceTypeExtensionNode extends AbstractNode implements TypeExtensionNodeInterface
8
{
9
10
    use NameTrait;
11
    use DirectivesTrait;
12
    use FieldsTrait;
13
14
    /**
15
     * @var string
16
     */
17
    protected $kind = NodeKindEnum::INTERFACE_TYPE_EXTENSION;
18
19
    /**
20
     * @inheritdoc
21
     */
22
    public function toArray(): array
23
    {
24
        return [
25
            'kind'       => $this->kind,
26
            'name'       => $this->getNameAsArray(),
27
            'directives' => $this->getDirectivesAsArray(),
28
            'fields'     => $this->getFieldsAsArray(),
29
            'loc'        => $this->getLocationAsArray(),
30
        ];
31
    }
32
}
33