diff --git a/src/Exceptions/RestifyHandler.php b/src/Exceptions/RestifyHandler.php index 5e0a3820f..98d759073 100644 --- a/src/Exceptions/RestifyHandler.php +++ b/src/Exceptions/RestifyHandler.php @@ -114,7 +114,6 @@ public function render($request, Exception $exception) $response->error(); } - return $response->toResponse($request); } diff --git a/src/Traits/AuthorizableModels.php b/src/Traits/AuthorizableModels.php index 1f5e19afc..7b0b9753f 100644 --- a/src/Traits/AuthorizableModels.php +++ b/src/Traits/AuthorizableModels.php @@ -43,7 +43,7 @@ public static function authorizable() */ public function authorizeToShowAny(Request $request) { - if ( ! static::authorizable()) { + if (! static::authorizable()) { return; } @@ -60,7 +60,7 @@ public function authorizeToShowAny(Request $request) */ public static function authorizedToShowAny(Request $request) { - if ( ! static::authorizable()) { + if (! static::authorizable()) { return true; } @@ -81,7 +81,7 @@ public function authorizeToShow(Request $request) } /** - * Determine if the current user can view the given resource + * Determine if the current user can view the given resource. * * @param Request $request * @return bool @@ -101,7 +101,7 @@ public function authorizedToShow(Request $request) */ public static function authorizeToCreate(Request $request) { - if ( ! static::authorizedToCreate($request)) { + if (! static::authorizedToCreate($request)) { throw new AuthorizationException('Unauthorized to create.'); } } @@ -199,7 +199,7 @@ public function authorizedTo(Request $request, $ability) /** * Since this trait could be used by a repository or by a model, we have to - * detect the model from either class + * detect the model from either class. * * @return AuthorizableModels|Model|mixed|null * @throws ModelNotFoundException