Passed
Pull Request — master (#86)
by Sergei
04:32 queued 01:52
created

ContainerNotSetException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Injector;
6
7
use Exception;
8
use Psr\Container\NotFoundExceptionInterface;
9
10
final class ContainerNotSetException extends Exception implements NotFoundExceptionInterface
11
{
12 1
    public function __construct(string $class)
13
    {
14 1
        parent::__construct(
15 1
            sprintf(
16 1
                'Container is not set in injector, so impossible resolve "%s".',
17 1
                $class
18 1
            )
19 1
        );
20
    }
21
}
22