VariableDefinition   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 19
ccs 8
cts 8
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getChildren() 0 4 1
1
<?php
2
3
namespace HansOtt\GraphQL\Query;
4
5
final class VariableDefinition extends NodeBase
6
{
7
    public $variable;
8
    public $type;
9
    public $defaultValue;
10
11 15
    public function __construct(ValueVariable $variable, Type $type, Value $defaultValue = null, Location $location = null)
12
    {
13 15
        parent::__construct($location);
14 15
        $this->variable = $variable;
15 15
        $this->type = $type;
16 15
        $this->defaultValue = $defaultValue;
17 15
    }
18
19 3
    public function getChildren()
20
    {
21 3
        return array($this->variable, $this->type, $this->defaultValue);
22
    }
23
}
24