@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | 110 | * @param Request $request |
| 111 | - * @param $user |
|
| 111 | + * @param \Illuminate\Contracts\Auth\Authenticatable|null $user |
|
| 112 | 112 | * @param string $token |
| 113 | 113 | * |
| 114 | 114 | * @return JsonResponse |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | * @SWG\Response(response="200", description="Return token or error message") |
| 139 | 139 | * ) |
| 140 | 140 | * |
| 141 | - * @return Response |
|
| 141 | + * @return JsonResponse |
|
| 142 | 142 | */ |
| 143 | 143 | public function logout() |
| 144 | 144 | { |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | */ |
| 39 | 39 | public function __construct() |
| 40 | 40 | { |
| 41 | - $this->middleware('guest', ['except' => 'logout']); |
|
| 41 | + $this->middleware('guest', [ 'except' => 'logout' ]); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | * |
| 103 | 103 | * @param Request $request |
| 104 | 104 | * |
| 105 | - * @return Response |
|
| 105 | + * @return \Illuminate\Http\JsonResponse |
|
| 106 | 106 | */ |
| 107 | 107 | public function register(Request $request) |
| 108 | 108 | { |
@@ -69,9 +69,9 @@ |
||
| 69 | 69 | protected function create(array $data) |
| 70 | 70 | { |
| 71 | 71 | return User::create([ |
| 72 | - 'name' => $data['name'], |
|
| 73 | - 'email' => $data['email'], |
|
| 74 | - 'password' => bcrypt($data['password']) |
|
| 72 | + 'name' => $data[ 'name' ], |
|
| 73 | + 'email' => $data[ 'email' ], |
|
| 74 | + 'password' => bcrypt($data[ 'password' ]) |
|
| 75 | 75 | ]); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | */ |
| 45 | 45 | public function getJWTIdentifier() |
| 46 | 46 | { |
| 47 | - return $this->getKey(); // Eloquent model method |
|
| 47 | + return $this->getKey(); // Eloquent model method |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | protected function unauthenticated($request, AuthenticationException $exception) |
| 68 | 68 | { |
| 69 | 69 | if ($request->expectsJson()) { |
| 70 | - return response()->json(['errors' => [[Error::STATUS => 401, Error::TITLE => 'Unauthenticated']]], 401); |
|
| 70 | + return response()->json([ 'errors' => [ [ Error::STATUS => 401, Error::TITLE => 'Unauthenticated' ] ] ], 401); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | return redirect()->guest('login'); |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | 'throttle:60,1', |
| 38 | 38 | 'bindings', |
| 39 | 39 | ], |
| 40 | - 'json-api' => [] |
|
| 40 | + 'json-api' => [ ] |
|
| 41 | 41 | ]; |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -67,9 +67,9 @@ |
||
| 67 | 67 | protected function create(array $data) |
| 68 | 68 | { |
| 69 | 69 | return User::create([ |
| 70 | - 'name' => $data['name'], |
|
| 71 | - 'email' => $data['email'], |
|
| 72 | - 'password' => bcrypt($data['password']), |
|
| 70 | + 'name' => $data[ 'name' ], |
|
| 71 | + 'email' => $data[ 'email' ], |
|
| 72 | + 'password' => bcrypt($data[ 'password' ]), |
|
| 73 | 73 | ]); |
| 74 | 74 | } |
| 75 | 75 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function __construct() |
| 38 | 38 | { |
| 39 | - $this->middleware('guest', ['except' => 'logout']); |
|
| 39 | + $this->middleware('guest', [ 'except' => 'logout' ]); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | Route::group([ |
| 55 | 55 | 'middleware' => 'web', |
| 56 | 56 | 'namespace' => $this->namespace, |
| 57 | - ], function ($router) { |
|
| 57 | + ], function($router) { |
|
| 58 | 58 | require base_path('routes/web.php'); |
| 59 | 59 | }); |
| 60 | 60 | } |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | 'middleware' => 'api', |
| 73 | 73 | 'namespace' => $this->namespace, |
| 74 | 74 | 'prefix' => 'api', |
| 75 | - ], function ($router) { |
|
| 75 | + ], function($router) { |
|
| 76 | 76 | require base_path('routes/api.php'); |
| 77 | 77 | }); |
| 78 | 78 | } |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | 'middleware' => 'json-api:v1', |
| 91 | 91 | 'namespace' => $this->namespace, |
| 92 | 92 | 'prefix' => 'api/v1' |
| 93 | - ], function ($router) { |
|
| 93 | + ], function($router) { |
|
| 94 | 94 | require base_path('routes/json-api-v1.php'); |
| 95 | 95 | }); |
| 96 | 96 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | /* |
| 20 | 20 | * Authenticate the user's personal channel... |
| 21 | 21 | */ |
| 22 | - Broadcast::channel('App.User.*', function ($user, $userId) { |
|
| 22 | + Broadcast::channel('App.User.*', function($user, $userId) { |
|
| 23 | 23 | return (int) $user->id === (int) $userId; |
| 24 | 24 | }); |
| 25 | 25 | } |