Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
37 | public function __construct(ResponseInterface $response) |
||
38 | { |
||
39 | $headers = $response->getHeaders(); |
||
40 | // What better to get the mime type than what the Telegram servers already send us? |
||
41 | $this->mime_type = $headers['Content-Type'][0]; |
||
42 | // Same with file length |
||
43 | $this->file_size = $headers['Content-Length'][0]; |
||
44 | $this->contents = (string)$response->getBody(); |
||
45 | } |
||
46 | |||
56 |