Passed
Push — master ( 7a07da...52982d )
by Alexander
13:19
created

CycleDynamicFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 2
b 0
f 0
dl 0
loc 11
ccs 0
cts 2
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A make() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Cycle\Factory;
6
7
use Psr\Container\ContainerInterface;
8
use Spiral\Core\FactoryInterface;
9
use Yiisoft\Injector\Injector;
10
11
final class CycleDynamicFactory implements FactoryInterface
12
{
13
    private Injector $injector;
14
    public function __construct(ContainerInterface $container)
15
    {
16
        $this->injector = new Injector($container);
17
    }
18
19
    public function make(string $alias, array $parameters = [])
20
    {
21
        return $this->injector->make($alias, $parameters);
22
    }
23
}
24