| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | 2 | private function translateHeaders(HeadersInterface $headers): array |
|
| 47 | { |
||
| 48 | 2 | $raw = []; |
|
| 49 | |||
| 50 | 2 | foreach ($headers as $header) { |
|
| 51 | 2 | $raw[$header->name()] = $header |
|
| 52 | 2 | ->values() |
|
| 53 | 2 | ->reduce( |
|
| 54 | 2 | [], |
|
| 55 | 2 | function(array $carry, HeaderValueInterface $value) { |
|
| 56 | 2 | $carry[] = (string) $value; |
|
| 57 | |||
| 58 | 2 | return $carry; |
|
| 59 | 2 | } |
|
| 60 | ); |
||
| 61 | } |
||
| 62 | |||
| 63 | 2 | return $raw; |
|
| 64 | } |
||
| 65 | } |
||
| 66 |