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