| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 7 | 
| Code Lines | 5 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 22 | private function generateBinaryResponse(string $path, array $extraHeaders = []): ResponseInterface | ||
| 23 |     { | ||
| 24 | $body = new Stream($path); | ||
| 25 | return new Response($body, StatusCode::STATUS_OK, ArrayUtils::merge([ | ||
| 26 | 'Content-Type' => (new finfo(FILEINFO_MIME))->file($path), | ||
| 27 | 'Content-Length' => (string) $body->getSize(), | ||
| 28 | ], $extraHeaders)); | ||
| 29 | } | ||
| 31 |