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

InterfaceTypeExtensionNode::toArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

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