Conditions | 2 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | 12 | public function boot(ExceptionHandler $handler): void |
|
36 | { |
||
37 | 12 | $handler->renderable(function (Throwable $e, Request $request) { |
|
38 | 11 | return $request->expectsJson() ? JsonApiError::from($e)->response() : null; |
|
39 | 12 | }); |
|
40 | |||
41 | 12 | $this->loadTranslationsFrom(self::PATH_LANG, self::NAME); |
|
42 | |||
43 | 12 | $this->publishes([self::PATH_LANG => $this->app->langPath('vendor/json-api-error')], self::NAME); |
|
44 | |||
45 | 12 | TestResponse::mixin(new TestResponseMixin()); |
|
46 | } |
||
48 |