Completed
Push — master ( c48c92...63f4dd )
by Miloš
01:23
created

CircularDependencyFoundException::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Laganica\Di\Exception;
4
5
use Psr\Container\NotFoundExceptionInterface;
6
7
/**
8
 * Class CircularDependencyFoundException
9
 *
10
 * @package Laganica\Di\Exception
11
 */
12
class CircularDependencyFoundException extends ContainerException implements NotFoundExceptionInterface
13
{
14
    /**
15
     * @param string $id
16
     *
17
     * @return self
18
     */
19 1
    public static function create(string $id): self
20
    {
21 1
        return new self("Circular dependency found for entry or class $id");
22
    }
23
}
24