| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0116 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 17 | public function header(string $string, $replace = true, $http_response_code = null) |
|
| 31 | { |
||
| 32 | 17 | if (!defined('OPENPSA2_UNITTEST_RUN')) { |
|
| 33 | header($string, $replace, $http_response_code); |
||
| 34 | } else { |
||
| 35 | 17 | self::$_headers[] = [ |
|
| 36 | 17 | 'value' => $string, |
|
| 37 | 17 | 'replace' => $replace, |
|
| 38 | 17 | 'http_response_code' => $http_response_code |
|
| 39 | ]; |
||
| 57 |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.