ExtensionManager   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getExtensions() 0 3 1
A __construct() 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\Extension;
12
13
/**
14
 * ExtensionManager
15
 */
16
class ExtensionManager
17
{
18
    /**
19
     * @var ExtensionInterface[]
20
     */
21
    protected $extensions;
22
23
    /**
24
     * @param iterable $extensions
25
     */
26
    public function __construct(iterable $extensions)
27
    {
28
        $this->extensions = $extensions;
0 ignored issues
show
Documentation Bug introduced by
It seems like $extensions of type iterable is incompatible with the declared type Ynlo\GraphQLBundle\Extension\ExtensionInterface[] of property $extensions.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
29
    }
30
31
    /**
32
     * @return iterable|ExtensionInterface[]
33
     */
34
    public function getExtensions(): iterable
35
    {
36
        return $this->extensions;
37
    }
38
}
39