| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4.0218 |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | 4 | public function getHeaders() |
|
| 10 | { |
||
| 11 | 4 | $headers = []; |
|
| 12 | 4 | $contentHeaders = ['CONTENT_LENGTH' => true, 'CONTENT_MD5' => true, 'CONTENT_TYPE' => true]; |
|
| 13 | |||
| 14 | 4 | foreach ($this->parameters as $key => $value) { |
|
| 15 | 1 | if (0 === stripos($key, 'HTTP_')) { |
|
| 16 | $headers[substr($key, 5)] = $value; |
||
| 17 | 1 | } elseif (isset($contentHeaders[$key])) { |
|
| 18 | 1 | $headers[$key] = $value; |
|
| 19 | } |
||
| 20 | } |
||
| 21 | |||
| 22 | 4 | return $headers; |
|
| 23 | } |
||
| 25 |