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

CircularDependencyFoundException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
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