Passed
Push — master ( f78a01...30a551 )
by Ion
03:10
created
app/Providers/AppServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@
 block discarded – undo
20 20
         /**
21 21
          * Validate alpha spaces
22 22
          */
23
-        Validator::extend('name', function ($attribute, $value) {
23
+        Validator::extend('name', function($attribute, $value) {
24 24
             return preg_match('/^[\pL\s\']+$/u', $value);
25 25
         });
26 26
 
27 27
         /**
28 28
          * Validate phone number
29 29
          */
30
-        Validator::extend('phone', function ($attribute, $value) {
30
+        Validator::extend('phone', function($attribute, $value) {
31 31
             $conditions   = [];
32 32
             $conditions[] = strlen($value) >= 10;
33 33
             $conditions[] = strlen($value) <= 16;
Please login to merge, or discard this patch.
app/Http/Controllers/LoginController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@
 block discarded – undo
230 230
                 DB::beginTransaction();
231 231
 
232 232
                 $userTokens = UserToken::where('user_id', $user->id)
233
-                                       ->where('type', UserToken::TYPE_REMEMBER_ME);
233
+                                        ->where('type', UserToken::TYPE_REMEMBER_ME);
234 234
 
235 235
                 if ($request->has('rememberToken')) {
236 236
                     $userTokens = $userTokens->where('token', $request->get('rememberToken'));
Please login to merge, or discard this patch.
app/Console/Commands/TaskNotificationsCommand.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,8 @@
 block discarded – undo
72 72
     private function checkExpiringTasks()
73 73
     {
74 74
         $expiringUserTasks = UserTask::where('status', UserTask::STATUS_ASSIGNED)
75
-                                     ->where('deadline', Carbon::now()->format('Y-m-d'))
76
-                                     ->get();
75
+                                        ->where('deadline', Carbon::now()->format('Y-m-d'))
76
+                                        ->get();
77 77
 
78 78
         $this->info('[' . Carbon::now()->format('Y-m-d H:i:s') . ']: Found ' . $expiringUserTasks->count() . ' expiring tasks.');
79 79
 
Please login to merge, or discard this patch.
app/Console/Commands/DeleteExpiredTokensCommand.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
     private function removeExpiredTokens()
59 59
     {
60 60
         $userTokens = UserToken::where('expire_on', '<=', Carbon::now()->format('Y-m-d H:i:s'))
61
-                               ->get();
61
+                                ->get();
62 62
 
63 63
         $this->info('[' . Carbon::now()->format('Y-m-d H:i:s') . ']: Found ' . $userTokens->count() . ' tokens to be removed.');
64 64
 
Please login to merge, or discard this patch.
app/Console/Kernel.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
     protected function schedule(Schedule $schedule)
33 33
     {
34 34
         $schedule->command('delete:expiredTokens')
35
-                 ->daily()->at('4:00')
36
-                 ->appendOutputTo(storage_path('logs/cron_delete_expired_tokens.log'));
35
+                    ->daily()->at('4:00')
36
+                    ->appendOutputTo(storage_path('logs/cron_delete_expired_tokens.log'));
37 37
 
38 38
         $schedule->command('send:taskNotifications')
39
-                 ->daily()->at('8:00')
40
-                 ->appendOutputTo(storage_path('logs/cron_send_task_notifications.log'));
39
+                    ->daily()->at('8:00')
40
+                    ->appendOutputTo(storage_path('logs/cron_send_task_notifications.log'));
41 41
     }
42 42
 }
Please login to merge, or discard this patch.
app/Services/TaskService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,16 +29,16 @@
 block discarded – undo
29 29
         $user = Auth::user();
30 30
 
31 31
         $userTasks = UserTask::with([
32
-            'user'         => function ($query) {
32
+            'user'         => function($query) {
33 33
                 $query->select(['id', 'name']);
34 34
             },
35
-            'assignedUser' => function ($query) {
35
+            'assignedUser' => function($query) {
36 36
                 $query->select(['id', 'name']);
37 37
             }
38 38
         ]);
39 39
 
40 40
         if ($canManage === RolePermission::MANAGE_OWN) {
41
-            $userTasks = $userTasks->where(function ($query) use ($user, $onlyOwn) {
41
+            $userTasks = $userTasks->where(function($query) use ($user, $onlyOwn) {
42 42
                 $query->where('user_id', $user->id);
43 43
 
44 44
                 if (!$onlyOwn) {
Please login to merge, or discard this patch.
app/Services/UserService.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         return User::with([
110 110
             'role' => function ($query) {
111 111
                 $query->select(['id', 'name'])
112
-                      ->with(['permissions']);
112
+                        ->with(['permissions']);
113 113
             }
114 114
         ]);
115 115
     }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         /** @var User|null $user */
175 175
         $user = $builder->whereHas('userTokens', function ($query) use ($token) {
176 176
             $query->where('token', $token)
177
-                  ->where('expire_on', '>=', Carbon::now()->format('Y-m-d H:i:s'));
177
+                    ->where('expire_on', '>=', Carbon::now()->format('Y-m-d H:i:s'));
178 178
         })->first();
179 179
 
180 180
         return $user;
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
     public function updateRememberTokenValability($token, $days = 14)
190 190
     {
191 191
         $userToken = UserToken::where('token', $token)
192
-                              ->where('type', UserToken::TYPE_REMEMBER_ME)
193
-                              ->first();
192
+                                ->where('type', UserToken::TYPE_REMEMBER_ME)
193
+                                ->first();
194 194
 
195 195
         if ($userToken) {
196 196
             $userToken->expire_on = Carbon::now()->addDays($days)->format('Y-m-d H:i:s');
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 
259 259
         $user = $builder->where(function ($query) use ($socialUser, $socialId) {
260 260
             $query->where($socialId, $socialUser->getId())
261
-                  ->orWhereEncrypted('email', $socialUser->getEmail());
261
+                    ->orWhereEncrypted('email', $socialUser->getEmail());
262 262
         })->first();
263 263
 
264 264
         if (!$user) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     public static function getUserBuilderForLogin()
108 108
     {
109 109
         return User::with([
110
-            'role' => function ($query) {
110
+            'role' => function($query) {
111 111
                 $query->select(['id', 'name'])
112 112
                       ->with(['permissions']);
113 113
             }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         $builder = self::getUserBuilderForLogin();
173 173
 
174 174
         /** @var User|null $user */
175
-        $user = $builder->whereHas('userTokens', function ($query) use ($token) {
175
+        $user = $builder->whereHas('userTokens', function($query) use ($token) {
176 176
             $query->where('token', $token)
177 177
                   ->where('expire_on', '>=', Carbon::now()->format('Y-m-d H:i:s'));
178 178
         })->first();
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     {
257 257
         $builder = self::getUserBuilderForLogin();
258 258
 
259
-        $user = $builder->where(function ($query) use ($socialUser, $socialId) {
259
+        $user = $builder->where(function($query) use ($socialUser, $socialId) {
260 260
             $query->where($socialId, $socialUser->getId())
261 261
                   ->orWhereEncrypted('email', $socialUser->getEmail());
262 262
         })->first();
Please login to merge, or discard this patch.
app/Services/BaseService.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -209,12 +209,12 @@
 block discarded – undo
209 209
                         env('CACHE_PERIOD'),
210 210
                         function () use ($userId, $permissionId) {
211 211
                             return RolePermission::where('permission_id', $permissionId)
212
-                                                 ->whereHas('role', function ($query) use ($userId) {
213
-                                                     $query->whereHas('users',
214
-                                                         function ($query) use ($userId) {
215
-                                                             $query->where('id', $userId);
216
-                                                         });
217
-                                                 })->first();
212
+                                                    ->whereHas('role', function ($query) use ($userId) {
213
+                                                        $query->whereHas('users',
214
+                                                            function ($query) use ($userId) {
215
+                                                                $query->where('id', $userId);
216
+                                                            });
217
+                                                    })->first();
218 218
                         }
219 219
                     );
220 220
     }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function applySearch(Builder $builder, $term)
33 33
     {
34
-        $builder->where(function ($query) use ($term) {
34
+        $builder->where(function($query) use ($term) {
35 35
             foreach ($query->getModel()->getSearchable() as $searchColumn) {
36 36
                 if (in_array($searchColumn, $query->getModel()->getEncrypted())) {
37 37
                     $query->orWhereEncrypted($searchColumn, '%' . $term . '%');
@@ -207,11 +207,11 @@  discard block
 block discarded – undo
207 207
                     ->remember(
208 208
                         'permission' . $userId . $permissionId,
209 209
                         env('CACHE_PERIOD'),
210
-                        function () use ($userId, $permissionId) {
210
+                        function() use ($userId, $permissionId) {
211 211
                             return RolePermission::where('permission_id', $permissionId)
212
-                                                 ->whereHas('role', function ($query) use ($userId) {
212
+                                                 ->whereHas('role', function($query) use ($userId) {
213 213
                                                      $query->whereHas('users',
214
-                                                         function ($query) use ($userId) {
214
+                                                         function($query) use ($userId) {
215 215
                                                              $query->where('id', $userId);
216 216
                                                          });
217 217
                                                  })->first();
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
         $pictureData = [];
236 236
 
237 237
         if ($generateAvatar) {
238
-            $avatarImage = Image::make($image)->resize(200, 200, function ($constraint) {
238
+            $avatarImage = Image::make($image)->resize(200, 200, function($constraint) {
239 239
                 $constraint->aspectRatio();
240 240
                 $constraint->upsize();
241 241
             });
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
             return json_encode($pictureData);
259 259
         }
260 260
 
261
-        $mediumImage = Image::make($image)->resize(1024, 768, function ($constraint) {
261
+        $mediumImage = Image::make($image)->resize(1024, 768, function($constraint) {
262 262
             $constraint->aspectRatio();
263 263
             $constraint->upsize();
264 264
         });
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         $mediumImage->save($mediumPath . $name, 100);
270 270
         $pictureData['medium'] = $mediumPath . $name;
271 271
 
272
-        $originalMaxImage = Image::make($image)->resize(1920, 1080, function ($constraint) {
272
+        $originalMaxImage = Image::make($image)->resize(1920, 1080, function($constraint) {
273 273
             $constraint->aspectRatio();
274 274
             $constraint->upsize();
275 275
         });
Please login to merge, or discard this patch.
app/Mail/SendMail.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@
 block discarded – undo
26 26
     public function __construct($to, string $subject, string $blade, array $data)
27 27
     {
28 28
         $this->to($to)
29
-             ->from(env('MAIL_FROM_ADDRESS'), env('MAIL_FROM_NAME'))
30
-             ->subject($subject)
31
-             ->view($blade)
32
-             ->with($data);
29
+                ->from(env('MAIL_FROM_ADDRESS'), env('MAIL_FROM_NAME'))
30
+                ->subject($subject)
31
+                ->view($blade)
32
+                ->with($data);
33 33
     }
34 34
 
35 35
     /**
Please login to merge, or discard this patch.