ContainerException::forKeyWithInner()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 5
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Fundic\Exception;
6
7
use Psr\Container\ContainerExceptionInterface;
8
use Throwable;
9
10
final class ContainerException extends \RuntimeException implements ExceptionInterface, ContainerExceptionInterface
11
{
12
    public static function forKeyWithInner(string $id, Throwable $inner)
13
    {
14
        return new self(
15
            sprintf('Error while retrieving the entry with %s identifier', $id),
16
            0,
17
            $inner
18
        );
19
    }
20
}
21