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