Completed
Push — master ( 8023d3...8b2ccd )
by Sherif
10:04
created
src/Modules/Core/Routes/api.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 |
12 12
 */
13 13
 
14
-Route::group(['prefix' => 'settings'], function () {
14
+Route::group(['prefix' => 'settings'], function() {
15 15
 
16 16
     Route::get('/', 'SettingController@index');
17 17
     Route::get('{id}', 'SettingController@show');
Please login to merge, or discard this patch.
src/Modules/Roles/Routes/api.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 |
14 14
 */
15 15
 
16
-Route::group(['prefix' => 'roles'], function () {
16
+Route::group(['prefix' => 'roles'], function() {
17 17
 
18 18
     Route::get('/', 'RoleController@index');
19 19
     Route::get('{id}', 'RoleController@show');
Please login to merge, or discard this patch.
src/Modules/Users/Routes/api.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 |
14 14
 */
15 15
 
16
-Route::group(['prefix' => 'users'], function () {
16
+Route::group(['prefix' => 'users'], function() {
17 17
     
18 18
     Route::get('/', 'UserController@index');
19 19
     Route::get('{id}', 'UserController@show');
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     Route::patch('{id}/unblock', 'UserController@unblock');
26 26
     Route::patch('{id}/assign/roles', 'UserController@assignRoles');
27 27
 
28
-    Route::group(['prefix' => 'account'], function () {
28
+    Route::group(['prefix' => 'account'], function() {
29 29
 
30 30
         Route::get('my', 'UserController@account');
31 31
         Route::get('logout', 'UserController@logout');
Please login to merge, or discard this patch.
src/Modules/Users/Services/UserService.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $permissions = [];
68 68
         $user        = $this->repo->find(\Auth::id(), $relations);
69 69
         foreach ($user->roles as $role) {
70
-            $role->permissions->each(function ($permission) use (&$permissions) {
70
+            $role->permissions->each(function($permission) use (&$permissions) {
71 71
                 $permissions[$permission->repo][$permission->id] = $permission->name;
72 72
             });
73 73
         }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     public function assignRoles($userId, $roleIds)
131 131
     {
132 132
         $user = false;
133
-        \DB::transaction(function () use ($userId, $roleIds, &$user) {
133
+        \DB::transaction(function() use ($userId, $roleIds, &$user) {
134 134
             $user = $this->repo->find($userId);
135 135
             $this->repo->detachPermissions($userId);
136 136
             $this->repo->attachPermissions($userId, $roleIds);
@@ -148,11 +148,11 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function login($email, $password)
150 150
     {
151
-        if (! $user = $this->repo->first(['email' => $email])) {
151
+        if ( ! $user = $this->repo->first(['email' => $email])) {
152 152
             \Errors::loginFailed();
153 153
         } elseif ($user->blocked) {
154 154
             \Errors::userIsBlocked();
155
-        } elseif (! config('skeleton.disable_confirm_email') && ! $user->confirmed) {
155
+        } elseif ( ! config('skeleton.disable_confirm_email') && ! $user->confirmed) {
156 156
             \Errors::emailNotConfirmed();
157 157
         }
158 158
 
@@ -171,11 +171,11 @@  discard block
 block discarded – undo
171 171
         $access_token = $authCode ? Arr::get(\Socialite::driver($type)->getAccessTokenResponse($authCode), 'access_token') : $accessToken;
172 172
         $user         = \Socialite::driver($type)->userFromToken($access_token);
173 173
 
174
-        if (! $user->email) {
174
+        if ( ! $user->email) {
175 175
             \Errors::noSocialEmail();
176 176
         }
177 177
 
178
-        if (! $this->repo->first(['email' => $user->email])) {
178
+        if ( ! $this->repo->first(['email' => $user->email])) {
179 179
             $this->register($user->email, '', true);
180 180
         }
181 181
 
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
             'confirmed' => $skipConfirmEmail
201 201
         ]);
202 202
 
203
-        if (! $skipConfirmEmail && ! config('skeleton.disable_confirm_email')) {
203
+        if ( ! $skipConfirmEmail && ! config('skeleton.disable_confirm_email')) {
204 204
             $this->sendConfirmationEmail($user->email);
205 205
         }
206 206
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
      */
242 242
     public function sendReset($email)
243 243
     {
244
-        if (! $user = $this->repo->first(['email' => $email])) {
244
+        if ( ! $user = $this->repo->first(['email' => $email])) {
245 245
             \Errors::notFound('email');
246 246
         }
247 247
 
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
             'password'              => $password,
266 266
             'password_confirmation' => $passwordConfirmation,
267 267
             'token'                 => $token
268
-        ], function ($user, $password) {
268
+        ], function($user, $password) {
269 269
             $this->repo->save(['id' => $user->id, 'password' => $password]);
270 270
         });
271 271
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     public function changePassword($password, $oldPassword)
299 299
     {
300 300
         $user = \Auth::user();
301
-        if (! \Hash::check($oldPassword, $user->password)) {
301
+        if ( ! \Hash::check($oldPassword, $user->password)) {
302 302
             \Errors::invalidOldPassword();
303 303
         }
304 304
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
      */
314 314
     public function confirmEmail($confirmationCode)
315 315
     {
316
-        if (! $user = $this->repo->first(['confirmation_code' => $confirmationCode])) {
316
+        if ( ! $user = $this->repo->first(['confirmation_code' => $confirmationCode])) {
317 317
             \Errors::invalidConfirmationCode();
318 318
         }
319 319
 
Please login to merge, or discard this patch.