| Conditions | 6 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function doValidation(Response $response) |
||
| 23 | { |
||
| 24 | if (strpos($response->getContentType(), 'image') === false |
||
| 25 | && strpos($response->getContentType(), 'pdf') === false |
||
| 26 | && strlen((string)$response->getBody()) >= $this->minFileSize |
||
| 27 | ) { |
||
| 28 | if (!$response->hasHeader('Content-Encoding') || $response->getHeader('Content-Encoding')[0] !== 'gzip') { |
||
| 29 | throw new ValidationFailedException('gzip compression not active'); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | } |
||
| 33 | } |
||
| 34 |