| Conditions | 5 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function doValidation(Response $response) |
||
| 16 | { |
||
| 17 | if (strpos($response->getContentType(), 'image') === false |
||
| 18 | && strpos($response->getContentType(), 'pdf') === false |
||
| 19 | ) { |
||
| 20 | if (!$response->hasHeader('Content-Encoding') || $response->getHeader('Content-Encoding')[0] !== 'gzip') { |
||
| 21 | throw new ValidationFailedException('gzip compression not active'); |
||
| 22 | } |
||
| 23 | } |
||
| 24 | } |
||
| 25 | } |
||
| 26 |