InlineFragment::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
ccs 7
cts 7
cp 1
rs 9.4285
cc 1
eloc 9
nc 1
nop 4
crap 1
1
<?php
2
3
namespace Fubhy\GraphQL\Language\Node;
4
5
use Fubhy\GraphQL\Language\Location;
6
use Fubhy\GraphQL\Language\Node;
7
8
class InlineFragment extends Node implements SelectionInterface
9
{
10
    const KIND = Node::KIND_INLINE_FRAGMENT;
11
12
    /**
13
     * Constructor.
14
     *
15
     * @param \Fubhy\GraphQL\Language\Node\NamedType $typeCondition
16
     * @param \Fubhy\GraphQL\Language\Node\Directive[] $directives
17
     * @param \Fubhy\GraphQL\Language\Node\SelectionSet $selectionSet
18
     * @param \Fubhy\GraphQL\Language\Location $location
19
     */
20 18
    public function __construct(
21
        NamedType $typeCondition,
22
        array $directives = [],
23
        SelectionSet $selectionSet,
24
        Location $location = NULL
25
    ) {
26 18
        parent::__construct($location, [
27 18
            'typeCondition' => $typeCondition,
28 18
            'directives' => $directives,
29 18
            'selectionSet' => $selectionSet,
30 18
        ]);
31 18
    }
32
}
33