Conditions | 7 |
Paths | 7 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 56 |
Changes | 0 |
1 | <?php |
||
15 | public static function error(array $error) |
||
16 | { |
||
17 | switch($error['error']) { |
||
18 | case 'invalid_request': throw new InvalidRequestException($error['message']); |
||
19 | case 'account_banned': throw new AccountBannedException($error['message']); |
||
20 | case 'account_deleted': throw new AccountDeletedException($error['message']); |
||
21 | case 'account_invalid': throw new AccountInvalidException($error['message']); |
||
22 | case 'email_not_confirmed': throw new EmailNotConfirmedException($error['message']); |
||
23 | case 'invalid_client': throw new InvalidClientException($error['message']); |
||
24 | } |
||
25 | throw new UnknownException(); |
||
26 | } |
||
27 | } |
||
28 |
According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.