| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | 1 | public static function frozenInstanceOverride(string $id): self |
|
| 35 | { |
||
| 36 | 1 | $message = <<<TXT |
|
| 37 | 1 | The instance '{$id}' is frozen and cannot be overridden. |
|
| 38 | Services become frozen after being accessed via get() to ensure consistency. |
||
| 39 | |||
| 40 | 1 | Call remove('{$id}') before setting a new value, or avoid accessing it before replacement. |
|
| 41 | 1 | TXT; |
|
| 42 | 1 | return new self($message); |
|
| 43 | } |
||
| 56 |