Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
39 | public static function compileHeaders(array $headers = []): array |
||
40 | { |
||
41 | if (empty($headers)) { |
||
42 | return []; |
||
43 | } |
||
44 | |||
45 | $headers = Collection::make($headers)->map(function ($value, $key) { |
||
46 | return "{$key}: {$value}"; |
||
47 | })->filter()->push("")->implode("\r\n"); |
||
48 | |||
49 | return ['-headers', $headers]; |
||
50 | } |
||
52 |