| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 2 |
| CRAP Score | 11.5287 |
| Changes | 0 | ||
| 1 | <?php namespace Comodojo\Dispatcher\Request; |
||
| 37 | 7 | private static function getHeaders() { |
|
| 38 | |||
| 39 | 7 | if (function_exists('getallheaders')) return getallheaders(); |
|
| 40 | |||
| 41 | $headers = array(); |
||
| 42 | |||
| 43 | foreach ($_SERVER as $name => $value) { |
||
| 44 | |||
| 45 | if (substr($name, 0, 5) == 'HTTP_') { |
||
|
|
|||
| 46 | |||
| 47 | $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; |
||
| 48 | |||
| 49 | } |
||
| 50 | |||
| 51 | } |
||
| 52 | |||
| 53 | return $headers; |
||
| 54 | |||
| 58 |