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

InterfacesAwareTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 21
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A addInterface() 0 3 1
A getInterfaces() 0 3 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\Traits;
12
13
/**
14
 * InterfacesAwareTrait
15
 */
16
trait InterfacesAwareTrait
17
{
18
    /**
19
     * @var string[]
20
     */
21
    protected $interfaces = [];
22
23
    /**
24
     * @return string[]
25
     */
26 1
    public function getInterfaces(): array
27
    {
28 1
        return $this->interfaces;
29
    }
30
31
    /**
32
     * @param string $name
33
     */
34 1
    public function addInterface(string $name)
35
    {
36 1
        $this->interfaces[] = $name;
37 1
    }
38
}
39