|
@@ -44,13 +44,13 @@ discard block |
|
|
block discarded – undo |
|
44
|
44
|
// Check if we have any exception configuration for this particular HTTP status code. |
|
45
|
45
|
// This confing entry is guaranted to exist (at least 'default'). Enforced by tests. |
|
46
|
46
|
$http_code = $ex->getStatusCode(); |
|
47
|
|
- $ex_cfg = $cfg[ HttpException::class ][ $http_code ] ?? null; |
|
48
|
|
- $ex_cfg = $ex_cfg ?? $cfg[ HttpException::class ]['default']; |
|
|
47
|
+ $ex_cfg = $cfg[HttpException::class][$http_code] ?? null; |
|
|
48
|
+ $ex_cfg = $ex_cfg ?? $cfg[HttpException::class]['default']; |
|
49
|
49
|
$result = self::processException($ex, $ex_cfg, $http_code); |
|
50
|
50
|
} elseif ($ex instanceof ValidationException) { |
|
51
|
51
|
// This entry is guaranted to exist. Enforced by tests. |
|
52
|
52
|
$http_code = HttpResponse::HTTP_UNPROCESSABLE_ENTITY; |
|
53
|
|
- $result = self::processException($ex, $cfg[ HttpException::class ][ $http_code ], $http_code); |
|
|
53
|
+ $result = self::processException($ex, $cfg[HttpException::class][$http_code], $http_code); |
|
54
|
54
|
} |
|
55
|
55
|
|
|
56
|
56
|
if ($result === null) { |
|
@@ -144,7 +144,7 @@ discard block |
|
|
block discarded – undo |
|
144
|
144
|
{ |
|
145
|
145
|
// This entry is guaranted to exist. Enforced by tests. |
|
146
|
146
|
$http_code = HttpResponse::HTTP_UNAUTHORIZED; |
|
147
|
|
- $cfg = static::getExceptionHandlerConfig()['map'][ HttpException::class ][ $http_code ]; |
|
|
147
|
+ $cfg = static::getExceptionHandlerConfig()['map'][HttpException::class][$http_code]; |
|
148
|
148
|
|
|
149
|
149
|
return static::processException($exception, $cfg, $http_code); |
|
150
|
150
|
} |