Conditions | 4 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | 6 | public function __construct( |
|
16 | string $interface, |
||
17 | bool $singleton = false, |
||
18 | private readonly string|\BackedEnum|null $scope = null, |
||
19 | private readonly ?string $version = null, |
||
20 | private readonly ?string $message = null, |
||
21 | ) { |
||
22 | 6 | if (($scope === null || $version === null) && $message === null) { |
|
23 | 3 | throw new \InvalidArgumentException('Scope and version or custom message must be provided.'); |
|
24 | } |
||
25 | |||
26 | 3 | parent::__construct($interface, $singleton); |
|
27 | } |
||
46 |