Completed
Push — master ( 631929...5231d5 )
by Alexandr
02:39
created

Directive::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 6
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
crap 2
1
<?php
2
/**
3
 * Date: 3/17/17
4
 *
5
 * @author Volodymyr Rashchepkin <[email protected]>
6
 */
7
8
namespace Youshido\GraphQL\Parser\Ast;
9
10
11
use Youshido\GraphQL\Parser\Ast\Interfaces\ValueInterface;
12
use Youshido\GraphQL\Parser\Location;
13
14
class Directive extends AbstractAst
15
{
16
    use AstArgumentsTrait;
17
18
    /** @var string */
19
    private $name;
20
21
22
    /**
23
     * @param string         $name
24
     * @param ValueInterface $value
0 ignored issues
show
Bug introduced by
There is no parameter named $value. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
25
     * @param Location       $location
26
     */
27
    public function __construct($name, array $arguments, Location $location)
28
    {
29
        parent::__construct($location);
30
31
        $this->name = $name;
32
        $this->setArguments($arguments);
33
    }
34
35
    /**
36
     * @return mixed
37
     */
38
    public function getName()
39
    {
40
        return $this->name;
41
    }
42
43
    /**
44
     * @param mixed $name
45
     */
46
    public function setName($name)
47
    {
48
        $this->name = $name;
49
    }
50
51
}
52