Passed
Push — master ( e52344...df819b )
by Rafael
09:21
created

InterfaceExtensionDefinition   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 35
c 0
b 0
f 0
ccs 6
cts 8
cp 0.75
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setPriority() 0 3 1
A getPriority() 0 3 1
A __construct() 0 4 1
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;
12
13
use Ynlo\GraphQLBundle\Definition\Traits\ClassAwareDefinitionTrait;
14
15
/**
16
 * InterfaceExtensionDefinition
17
 */
18
class InterfaceExtensionDefinition implements ClassAwareDefinitionInterface
19
{
20
    use ClassAwareDefinitionTrait;
21
22
    /**
23
     * @var int
24
     */
25
    protected $priority;
26
27
    /**
28
     * InterfaceExtensionDefinition constructor.
29
     *
30
     * @param string $class
31
     * @param int    $priority
32
     */
33 1
    public function __construct($class, $priority = 0)
34
    {
35 1
        $this->class = $class;
36 1
        $this->priority = $priority;
37 1
    }
38
39
    /**
40
     * @return int
41
     */
42 8
    public function getPriority(): int
43
    {
44 8
        return $this->priority;
45
    }
46
47
    /**
48
     * @param int $priority
49
     */
50
    public function setPriority(int $priority)
51
    {
52
        $this->priority = $priority;
53
    }
54
}