Conditions | 4 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
45 | function getallheaders(): array |
||
46 | { |
||
47 | $server = new Server(); |
||
48 | |||
49 | $data = $server->all(); |
||
50 | |||
51 | if (empty($data)) { |
||
52 | return []; |
||
53 | } |
||
54 | |||
55 | $headers = []; |
||
56 | |||
57 | foreach ($data as $key => $value) { |
||
58 | if (substr($key, 0, 5) == 'HTTP_') { |
||
59 | $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($key, 5)))))] = $value; |
||
60 | } |
||
61 | } |
||
62 | |||
63 | return $headers; |
||
64 | } |
||
67 |