| Conditions | 3 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 40 | } |
||
| 41 | 17 | } |
|
| 42 | |||
| 43 | public function stop_request(string $message = '') |
||
| 44 | { |
||
| 45 | if (!defined('OPENPSA2_UNITTEST_RUN')) { |
||
| 46 | exit($message); |
||
|
|
|||
| 47 | } |
||
| 48 | } |
||
| 49 | |||
| 50 | 730 | public static function flush_registered_headers() : array |
|
| 51 | { |
||
| 52 | 730 | $headers = self::$_headers; |
|
| 53 | 730 | self::$_headers = []; |
|
| 54 | 730 | return $headers; |
|
| 57 |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.