| 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 |
||
| 12 | 6 | public function __construct( |
|
| 13 | string $interface, |
||
| 14 | bool $singleton = false, |
||
| 15 | private readonly string|\BackedEnum|null $scope = null, |
||
| 16 | private readonly ?string $version = null, |
||
| 17 | private readonly ?string $message = null, |
||
| 18 | ) { |
||
| 19 | 6 | if (($scope === null || $version === null) && $message === null) { |
|
| 20 | 3 | throw new \InvalidArgumentException('Scope and version or custom message must be provided.'); |
|
| 21 | } |
||
| 22 | |||
| 23 | 3 | parent::__construct($interface, $singleton); |
|
| 24 | } |
||
| 43 |