Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | class CircularReferenceException extends \InvalidArgumentException implements ContainerExceptionInterface |
||
23 | { |
||
24 | private string $serviceId; |
||
25 | |||
26 | /** @var array<int,string> */ |
||
27 | private array $path; |
||
28 | |||
29 | /** |
||
30 | * @param array<int,string> $path |
||
31 | */ |
||
32 | 9 | public function __construct(string $serviceId, array $path, \Throwable $previous = null) |
|
33 | { |
||
34 | 9 | parent::__construct(\sprintf('Circular reference detected for service "%s", path: "%s".', $serviceId, \implode(' -> ', $path)), 0, $previous); |
|
35 | |||
36 | 9 | $this->serviceId = $serviceId; |
|
37 | 9 | $this->path = $path; |
|
38 | 9 | } |
|
39 | |||
40 | 1 | public function getServiceId(): string |
|
43 | } |
||
44 | |||
45 | /** |
||
46 | * @return array<int,string> |
||
47 | */ |
||
48 | 1 | public function getPath(): array |
|
53 |