Argument::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 7
loc 7
ccs 6
cts 6
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
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 View Code Duplication
class Argument extends Node
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...
9
{
10
    const KIND = Node::KIND_ARGUMENT;
11
12
    /**
13
     * Constructor.
14
     *
15
     * @param \Fubhy\GraphQL\Language\Node\Name $name
16
     * @param \Fubhy\GraphQL\Language\Node\ValueInterface $value
17
     * @param \Fubhy\GraphQL\Language\Location $location
18
     */
19 168
    public function __construct(Name $name, ValueInterface $value, Location $location = NULL)
20
    {
21 168
        parent::__construct($location, [
22 168
            'name' => $name,
23 168
            'value' => $value,
24 168
        ]);
25 168
    }
26
}
27