Conditions | 5 |
Paths | 9 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public function validate(Response $response) |
||
12 | { |
||
13 | if (count($this->contentTypes) > 0) { |
||
14 | $valid = false; |
||
15 | foreach ($this->contentTypes as $validContentType) { |
||
16 | if (strpos($response->getContentType(), $validContentType) !== false) { |
||
17 | $valid = true; |
||
18 | break; |
||
19 | } |
||
20 | } |
||
21 | if (!$valid) { |
||
22 | return; |
||
23 | } |
||
24 | } |
||
25 | $this->doValidation($response); |
||
26 | } |
||
27 | |||
37 |