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

Directive   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 38
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getName() 0 4 1
A setName() 0 4 1
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