Passed
Pull Request — master (#74)
by Rustam
02:43
created

ContainerProxy::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 2
dl 0
loc 8
ccs 5
cts 5
cp 1
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Debug\Proxy;
6
7
use Psr\Container\ContainerInterface;
8
use Yiisoft\Di\Container;
9
10
final class ContainerProxy extends ContainerInterfaceProxy
11
{
12 2
    public function __construct(ContainerInterface $container, ContainerProxyConfig $config)
13
    {
14 2
        if ($container instanceof Container) {
15 2
            $delegator = new ContainerDelegator($container);
16 2
            $delegator->delegateLookup($this);
17
        }
18
19 2
        parent::__construct($container, $config);
20 2
    }
21
}
22