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

InterfaceExtensionDefinition::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 2
crap 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
}