InfiniteRecursion::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 1
b 1
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cekta\DI\Exception;
6
7
use Psr\Container\ContainerExceptionInterface;
8
use RuntimeException;
9
10
class InfiniteRecursion extends RuntimeException implements ContainerExceptionInterface
11
{
12
    /**
13
     * @param string $id
14
     * @param array<string> $calls
15
     */
16 6
    public function __construct(string $id, array $calls)
17
    {
18 6
        $callsString = implode(', ', $calls);
19 6
        parent::__construct("Infinite recursion for `${id}`, calls: `${callsString}`");
20 6
    }
21
}
22