Directive::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
crap 1
1
<?php
2
3
namespace HansOtt\GraphQL\Query;
4
5
final class Directive extends NodeBase
6
{
7
    public $name;
8
    public $arguments;
9
10
    /**
11
     * @param string $name
12
     * @param Argument[] $arguments
13
     * @param Location|null $location
14
     */
15 9
    public function __construct($name, array $arguments = array(), Location $location = null)
16
    {
17 9
        parent::__construct($location);
18 9
        $this->name = (string) $name;
19 9
        $this->arguments = $arguments;
20 9
    }
21
22 3
    public function getChildren()
23
    {
24 3
        return $this->arguments;
25
    }
26
}
27