| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class Exiter |
||
| 22 | { |
||
| 23 | protected static bool $exit = true; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Freeze the exiter. |
||
| 27 | */ |
||
| 28 | public static function freeze(): void |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Unfreeze the exiter. |
||
| 35 | */ |
||
| 36 | public static function unfreeze(): void |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Exit, or don't. Up to you :). |
||
| 43 | */ |
||
| 44 | public static function exit(int $code = 0): void |
||
| 49 |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.