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