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