Conditions | 7 |
Paths | 7 |
Total Lines | 18 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 56 |
Changes | 0 |
1 | <?php |
||
15 | public function __invoke(array $error) |
||
16 | { |
||
17 | switch ($error['error']) { |
||
18 | case 'invalid_request': |
||
19 | throw new InvalidRequestException($error['message']); |
||
20 | case 'account_banned': |
||
21 | throw new AccountBannedException($error['message']); |
||
22 | case 'account_deleted': |
||
23 | throw new AccountDeletedException($error['message']); |
||
24 | case 'account_invalid': |
||
25 | throw new AccountInvalidException($error['message']); |
||
26 | case 'email_not_confirmed': |
||
27 | throw new EmailNotConfirmedException($error['message']); |
||
28 | case 'invalid_client': |
||
29 | throw new InvalidClientException($error['message']); |
||
30 | } |
||
31 | throw new UnknownException(); |
||
32 | } |
||
33 | } |
||
34 |