| Conditions | 6 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function validate(Response $response) |
||
| 22 | { |
||
| 23 | if ($response->getStatus() <= $this->maxStatusCode) { |
||
| 24 | if ($response->hasHeader('Pragma') && 'no-cache' === $response->getHeader('Pragma')[0]) { |
||
| 25 | throw new ValidationFailedException('pragma:no-cache was found'); |
||
| 26 | } |
||
| 27 | |||
| 28 | if ($response->hasHeader('Cache-Control') && false !== strpos($response->getHeader('Cache-Control')[0], 'no-cache')) { |
||
| 29 | throw new ValidationFailedException('cache-control:no-cache was found'); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | } |
||
| 33 | } |
||
| 34 |