Total Complexity | 10 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class ChainResolver implements ResolverInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var array $chain |
||
14 | */ |
||
15 | protected $chain; |
||
16 | |||
17 | /** |
||
18 | * @var array $resolvers |
||
19 | */ |
||
20 | protected $resolvers; |
||
21 | |||
22 | 5 | public function __construct(array $chain) |
|
23 | { |
||
24 | 5 | $this->chain = $chain; |
|
25 | 5 | } |
|
26 | |||
27 | /** |
||
28 | * @inheritDoc |
||
29 | */ |
||
30 | 5 | public function resolve(string $className): RepositoryInterface |
|
46 | } |
||
47 | |||
48 | /** |
||
49 | * Create resolver if needed and return it |
||
50 | * |
||
51 | * @access protected |
||
52 | * @param string|ResolverInterface $code |
||
53 | * @return ResolverInterface |
||
54 | */ |
||
55 | 5 | protected function getResolver($resolver): ResolverInterface |
|
71 | } |
||
72 | } |
||
73 |