Passed
Push — master ( 5ee55a...802101 )
by Christoffer
02:39
created

Directive::addLocation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Digia\GraphQL\Type\Definition;
4
5
use Digia\GraphQL\Config\ConfigObject;
6
use Digia\GraphQL\Language\Node\NodeAwareInterface;
7
use Digia\GraphQL\Language\Node\NodeTrait;
8
9
class Directive extends ConfigObject implements DirectiveInterface, NodeAwareInterface
10
{
11
    use NodeTrait;
12
    use NameTrait;
13
    use DescriptionTrait;
14
    use ArgumentsTrait;
15
16
    /**
17
     * @var string[]
18
     */
19
    protected $locations;
20
21
    /**
22
     * @return string[]
23
     */
24
    public function getLocations(): array
25
    {
26
        return $this->locations;
27
    }
28
29
    /**
30
     * @param string[] $locations
31
     * @return $this
32
     */
33
    protected function setLocations(array $locations)
34
    {
35
        $this->locations = $locations;
36
        return $this;
37
    }
38
}
39