Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 6 | public static function parseVerifier(ResponseInterface $response) { |
|
23 | 6 | static $pattern = '@<code>([^<]++)</code>@'; |
|
24 | 6 | if (!preg_match($pattern, $response->getRawContent(), $matches)) { |
|
25 | 3 | throw new HttpException( |
|
26 | 3 | 'Wrong username or password. Otherwise, you may have to verify your email address.', |
|
27 | 3 | -1, |
|
28 | $response |
||
29 | ); |
||
30 | } |
||
31 | 3 | return $matches[1]; |
|
32 | } |
||
33 | } |
||
34 |