Completed
Push — master ( c56c43...dca9cd )
by Hans
02:19
created

Argument::getChildren()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace HansOtt\GraphQL\Schema;
4
5 View Code Duplication
final class Argument extends NodeBase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
6
{
7
    public $name;
8
    public $type;
9
    public $defaultValue;
10
11
    /**
12
     * @param string $name
13
     * @param Type $type
14
     * @param Value|null $defaultValue
15
     * @param Location|null $location
16
     */
17 6
    public function __construct($name, Type $type, Value $defaultValue = null, Location $location = null)
18
    {
19 6
        parent::__construct($location);
20 6
        $this->name = (string) $name;
21 6
        $this->type = $type;
22 6
        $this->defaultValue = $defaultValue;
23 6
    }
24
25
    public function getChildren()
26
    {
27
        return array($this->type, $this->defaultValue);
28
    }
29
}
30