| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function validate(ResponseInterface $response): ValidationResultInterface |
||
| 13 | { |
||
| 14 | if (!$response instanceof RedirectResponse) { |
||
| 15 | return new ValidationResult(ValidationResult::STATUS_ERROR); |
||
| 16 | } |
||
| 17 | if ($this->code !== $response->getCode()) { |
||
| 18 | return new ValidationResult(ValidationResult::STATUS_ERROR, ['Response code doesn\'t match']); |
||
| 19 | } |
||
| 20 | return new ValidationResult(ValidationResult::STATUS_OK); |
||
| 21 | } |
||
| 22 | } |
||
| 23 |