@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | $this->loadMigrationsFrom(module_path('users', 'Database/Migrations', 'app')); |
20 | 20 | $this->loadFactoriesFrom(module_path('users', 'Database/Factories', 'app')); |
21 | - if(!$this->app->configurationIsCached()) { |
|
21 | + if ( ! $this->app->configurationIsCached()) { |
|
22 | 22 | $this->loadConfigsFrom(module_path('users', 'Config', 'app')); |
23 | 23 | } |
24 | 24 | } |
@@ -67,7 +67,7 @@ discard block |
||
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 |
||
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 |
||
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('user.disable_confirm_email') && ! $user->confirmed) { |
|
155 | + } elseif ( ! config('user.disable_confirm_email') && ! $user->confirmed) { |
|
156 | 156 | \Errors::emailNotConfirmed(); |
157 | 157 | } |
158 | 158 | |
@@ -171,11 +171,11 @@ discard block |
||
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 |
||
200 | 200 | 'confirmed' => $skipConfirmEmail |
201 | 201 | ]); |
202 | 202 | |
203 | - if (! $skipConfirmEmail && ! config('user.disable_confirm_email')) { |
|
203 | + if ( ! $skipConfirmEmail && ! config('user.disable_confirm_email')) { |
|
204 | 204 | $this->sendConfirmationEmail($user->email); |
205 | 205 | } |
206 | 206 | |
@@ -241,7 +241,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | $this->loadMigrationsFrom(module_path('push-notification-devices', 'Database/Migrations', 'app')); |
20 | 20 | $this->loadFactoriesFrom(module_path('push-notification-devices', 'Database/Factories', 'app')); |
21 | - if(!$this->app->configurationIsCached()) { |
|
21 | + if ( ! $this->app->configurationIsCached()) { |
|
22 | 22 | $this->loadConfigsFrom(module_path('push-notification-devices', 'Config', 'app')); |
23 | 23 | } |
24 | 24 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | $this->loadMigrationsFrom(module_path('permissions', 'Database/Migrations', 'app')); |
20 | 20 | $this->loadFactoriesFrom(module_path('permissions', 'Database/Factories', 'app')); |
21 | - if(!$this->app->configurationIsCached()) { |
|
21 | + if ( ! $this->app->configurationIsCached()) { |
|
22 | 22 | $this->loadConfigsFrom(module_path('permissions', 'Config', 'app')); |
23 | 23 | } |
24 | 24 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | $this->loadMigrationsFrom(module_path('oauth-clients', 'Database/Migrations', 'app')); |
20 | 20 | $this->loadFactoriesFrom(module_path('oauth-clients', 'Database/Factories', 'app')); |
21 | - if(!$this->app->configurationIsCached()) { |
|
21 | + if ( ! $this->app->configurationIsCached()) { |
|
22 | 22 | $this->loadConfigsFrom(module_path('oauth-clients', 'Config', 'app')); |
23 | 23 | } |
24 | 24 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | $this->loadMigrationsFrom(module_path('notifications', 'Database/Migrations', 'app')); |
20 | 20 | $this->loadFactoriesFrom(module_path('notifications', 'Database/Factories', 'app')); |
21 | - if(!$this->app->configurationIsCached()) { |
|
21 | + if ( ! $this->app->configurationIsCached()) { |
|
22 | 22 | $this->loadConfigsFrom(module_path('notifications', 'Config', 'app')); |
23 | 23 | } |
24 | 24 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | $this->loadMigrationsFrom(module_path('roles', 'Database/Migrations', 'app')); |
20 | 20 | $this->loadFactoriesFrom(module_path('roles', 'Database/Factories', 'app')); |
21 | - if(!$this->app->configurationIsCached()) { |
|
21 | + if ( ! $this->app->configurationIsCached()) { |
|
22 | 22 | $this->loadConfigsFrom(module_path('roles', 'Config', 'app')); |
23 | 23 | } |
24 | 24 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | public function handle(ClientRepository $client) |
32 | 32 | { |
33 | 33 | $this->call('passport:keys', ['--force' => $this->option('force'), '--length' => $this->option('length')]); |
34 | - if( ! \Core::oauthCLients()->first(['password_client' => 1])) { |
|
34 | + if ( ! \Core::oauthCLients()->first(['password_client' => 1])) { |
|
35 | 35 | |
36 | 36 | $client = $client->createPasswordGrantClient( |
37 | 37 | null, config('app.name'), 'http://localhost' |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | $this->loadMigrationsFrom(module_path('DummyModuleSlug', 'Database/Migrations', 'app')); |
20 | 20 | $this->loadFactoriesFrom(module_path('DummyModuleSlug', 'Database/Factories', 'app')); |
21 | - if(!$this->app->configurationIsCached()) { |
|
21 | + if ( ! $this->app->configurationIsCached()) { |
|
22 | 22 | $this->loadConfigsFrom(module_path('DummyModuleSlug', 'Config', 'app')); |
23 | 23 | } |
24 | 24 | } |