Total Complexity | 4 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Coverage | 57.14% |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
7 | class Proxy extends Binding |
||
8 | { |
||
9 | /** |
||
10 | * @param class-string $interface |
||
|
|||
11 | */ |
||
12 | 5 | public function __construct( |
|
13 | protected readonly string $interface, |
||
14 | public readonly bool $singleton = false, |
||
15 | ) { |
||
16 | 5 | if (!\interface_exists($interface)) { |
|
17 | throw new \InvalidArgumentException(\sprintf('Interface `%s` does not exist.', $interface)); |
||
18 | } |
||
19 | } |
||
20 | |||
21 | public function __toString(): string |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @return class-string |
||
28 | */ |
||
29 | 4 | public function getInterface(): string |
|
32 | } |
||
33 | } |
||
34 |