| Total Complexity | 4 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class ContainerException extends Exception implements ContainerExceptionInterface |
||
| 11 | { |
||
| 12 | 1 | public static function instanceNotExtendable(): self |
|
| 21 | } |
||
| 22 | |||
| 23 | 4 | public static function frozenInstanceExtend(string $id): self |
|
| 24 | { |
||
| 25 | 4 | $message = <<<TXT |
|
| 26 | 4 | The instance '{$id}' is frozen and cannot be extended. |
|
| 27 | Services become frozen after being accessed via get() to ensure consistency. |
||
| 28 | |||
| 29 | Extend the service before accessing it, or use remove() to unfreeze it first. |
||
| 30 | 4 | TXT; |
|
| 31 | 4 | return new self($message); |
|
| 32 | } |
||
| 33 | |||
| 34 | 1 | public static function frozenInstanceOverride(string $id): self |
|
| 43 | } |
||
| 44 | |||
| 45 | 1 | public static function instanceProtected(string $id): self |
|
| 54 | } |
||
| 55 | } |
||
| 56 |