Completed
Push — master ( ab2185...c08f71 )
by Sherif
01:55
created
src/Modules/Core/Console/Commands/GenerateDocCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
                     $prefix = $route['prefix'];
57 57
                     $module = \Str::camel(str_replace('/', '_', str_replace('api', '', $prefix)));
58
-                    if($prefix === 'telescope') {
58
+                    if ($prefix === 'telescope') {
59 59
                         continue;
60 60
                     }
61 61
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     protected function getRoutes()
96 96
     {
97
-        return collect(\Route::getRoutes())->map(function ($route) {
97
+        return collect(\Route::getRoutes())->map(function($route) {
98 98
             if (strpos($route->uri(), 'api/') !== false) {
99 99
                 return [
100 100
                     'method' => $route->methods()[0],
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         ];
126 126
 
127 127
 
128
-        if (! $skipLoginCheck || ! in_array($method, $skipLoginCheck)) {
128
+        if ( ! $skipLoginCheck || ! in_array($method, $skipLoginCheck)) {
129 129
             $route['headers']['Authorization'] = 'Bearer {token}';
130 130
         }
131 131
     }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         if (count($parameters)) {
175 175
             $className = optional($reflectionMethod->getParameters()[0]->getType())->getName();
176 176
             if ($className) {
177
-                $reflectionClass  = new \ReflectionClass($className);
177
+                $reflectionClass = new \ReflectionClass($className);
178 178
     
179 179
                 if ($reflectionClass->hasMethod('rules')) {
180 180
                     $reflectionMethod = $reflectionClass->getMethod('rules');
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
     {
202 202
         $errors = [];
203 203
         foreach (\Module::all() as $module) {
204
-            $nameSpace = 'App\\Modules\\' . $module['basename'] ;
205
-            $class = $nameSpace . '\\Errors\\'  . $module['basename'] . 'Errors';
204
+            $nameSpace = 'App\\Modules\\'.$module['basename'];
205
+            $class = $nameSpace.'\\Errors\\'.$module['basename'].'Errors';
206 206
             $reflectionClass = new \ReflectionClass($class);
207 207
             foreach ($reflectionClass->getMethods() as $method) {
208 208
                 $methodName       = $method->name;
Please login to merge, or discard this patch.
src/Modules/Users/Providers/ModuleServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
     }
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('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
 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('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
 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.
src/Modules/PushNotificationDevices/Providers/ModuleServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Modules/Permissions/Providers/ModuleServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Modules/OauthClients/Providers/ModuleServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Modules/Notifications/Providers/ModuleServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Modules/Roles/Providers/ModuleServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Modules/Core/Console/Commands/PassportInstallCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
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'
Please login to merge, or discard this patch.