Commit 0cba1168 authored by Viral Solani's avatar Viral Solani Committed by StyleCI Bot

Apply fixes from StyleCI

parent 23b20325
......@@ -80,8 +80,8 @@ class Handler extends ExceptionHandler
* Redirect if token mismatch error
* Usually because user stayed on the same screen too long and their session expired
*/
if ($exception instanceof \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException) {
switch (get_class($exception->getPrevious())) {
if ($exception instanceof \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException) {
switch (get_class($exception->getPrevious())) {
case \App\Exceptions\Handler::class:
return $this->setStatusCode($exception->getStatusCode())->respondWithError('Token has not been provided.');
case \Tymon\JWTAuth\Exceptions\TokenExpiredException::class:
......@@ -90,7 +90,7 @@ class Handler extends ExceptionHandler
case \Tymon\JWTAuth\Exceptions\TokenBlacklistedException::class:
return $this->setStatusCode($exception->getStatusCode())->respondWithError('Token is invalid.');
}
}
}
/*
* Redirect if token mismatch error
......
......@@ -125,8 +125,7 @@ class UsersController extends APIController
$result = $this->repository->deleteAll($ids);
}
if($result)
{
if ($result) {
return $this->respond([
'message' => trans('alerts.backend.users.deleted'),
]);
......
......@@ -189,7 +189,7 @@ class UserRepository extends BaseRepository
}
/**
* Delete User
* Delete User.
*
* @param Model $user
*
......@@ -213,7 +213,7 @@ class UserRepository extends BaseRepository
}
/**
* Delete All Users
* Delete All Users.
*
* @param Model $user
*
......@@ -233,8 +233,7 @@ class UserRepository extends BaseRepository
$result = DB::table('users')->whereIn('id', $ids)->delete();
if($result)
{
if ($result) {
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment