Completed
Pull Request — master (#7)
by Yonel Ceruto
17:50
created

ExecutableDefinitionTrait::getRoles()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
/*******************************************************************************
3
 *  This file is part of the GraphQL Bundle package.
4
 *
5
 *  (c) YnloUltratech <[email protected]>
6
 *
7
 *  For the full copyright and license information, please view the LICENSE
8
 *  file that was distributed with this source code.
9
 ******************************************************************************/
10
11
namespace Ynlo\GraphQLBundle\Definition\Traits;
12
13
/**
14
 * Trait ExecutableDefinitionTrait
15
 */
16
trait ExecutableDefinitionTrait
17
{
18
    use DefinitionTrait;
19
    use ArgumentAwareTrait;
20
    use DeprecateTrait;
21
    use TypeAwareDefinitionTrait;
22
    use NodeAwareDefinitionTrait;
23
24
    /**
25
     * @var string
26
     */
27
    protected $resolver;
28
29
    /**
30
     * @var string
31
     */
32
    protected $complexity;
33
34
    /**
35
     * @var array
36
     */
37 22
    protected $roles = [];
38
39 22
    /**
40
     * @return null|string
41
     */
42
    public function getResolver(): ?string
43
    {
44
        return $this->resolver;
45
    }
46
47 22
    /**
48
     * @param null|string $resolver
49 22
     *
50
     * @return $this
51 22
     */
52
    public function setResolver(?string $resolver)
53
    {
54 1
        $this->resolver = $resolver;
55
56 1
        return $this;
57
    }
58
59 22
    public function getComplexity(): ?string
60
    {
61 22
        return $this->complexity;
62
    }
63 22
64
    public function setComplexity(?string $complexity): self
65
    {
66
        $this->complexity = $complexity;
67
68
        return $this;
69
    }
70
71
    public function getRoles(): array
72
    {
73
        return $this->roles;
74
    }
75
76
    public function setRoles(array $roles): self
77
    {
78
        $this->roles = $roles;
79
80
        return $this;
81
    }
82
}
83