Completed
Push — master ( 15c856...4ce16e )
by Rafael
05:47
created

ExtensionManager   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
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

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 2
    public function __construct(iterable $extensions)
27
    {
28 2
        $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 2
    }
30
31
    /**
32
     * @return iterable|ExtensionInterface[]
33
     */
34 22
    public function getExtensions(): iterable
35
    {
36 22
        return $this->extensions;
37
    }
38
}
39