StringValue::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 4
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 2
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 StringValue extends Node implements ValueInterface
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_STRING_VALUE;
11
12
    /**
13
     * Constructor.
14
     *
15
     * @param string $value
16
     * @param \Fubhy\GraphQL\Language\Location $location
17
     */
18 75
    public function __construct($value, Location $location = NULL)
19
    {
20 75
        parent::__construct($location, ['value' => $value]);
21 75
    }
22
}
23