Conditions | 2 |
Paths | 1 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
36 | protected function getErrorBagForStatusCode($statusCode) |
||
37 | { |
||
38 | $errorMap = [ |
||
39 | SymfonyResponse::HTTP_UNPROCESSABLE_ENTITY => 'google2fa.error_messages.wrong_otp', |
||
40 | SymfonyResponse::HTTP_BAD_REQUEST => 'google2fa.error_messages.cannot_be_empty', |
||
41 | ]; |
||
42 | |||
43 | return $this->createErrorBagForMessage( |
||
44 | trans( |
||
45 | config( |
||
46 | array_key_exists($statusCode, $errorMap) ? $errorMap[$statusCode] : 'google2fa.error_messages.unknown' |
||
47 | ) |
||
48 | ) |
||
49 | ); |
||
50 | } |
||
51 | } |
||
52 |