Completed
Pull Request — master (#6)
by Shawn
03:12
created
app/Visit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     public function scopeActiveUsers($query)
40 40
     {
41
-        return $query->whereHas('user', function ($q) {
41
+        return $query->whereHas('user', function($q) {
42 42
             $q->where('status', 'active');
43 43
         });
44 44
     }
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     public function boot()
18 18
     {
19 19
         // If the save() function is used on the User model, we will generate a new log note.
20
-        User::updating(function ($user) {
20
+        User::updating(function($user) {
21 21
             $this->createUserLog($user);
22 22
         });
23 23
     }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         foreach ($user->getDirty() as $key => $value) {
72 72
             $original = $user->getOriginal($key);
73 73
             if (!in_array($key, $ignoreList) && !$this->nullToEmptyString($original, $value)) {
74
-                $log['comment'] .= ucfirst($key)." changed from '".$original."' to '".$value."'.\n";
74
+                $log['comment'] .= ucfirst($key) . " changed from '" . $original . "' to '" . $value . "'.\n";
75 75
             }
76 76
         }
77 77
 
Please login to merge, or discard this patch.
app/Mail/SendNewsEmail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 
36 36
         //ATTACH FILES
37 37
         foreach ($this->news->attachments as $file) {
38
-            $path = 'app/news_'.$file->imageable_id.'/'.$file->filename;
38
+            $path = 'app/news_' . $file->imageable_id . '/' . $file->filename;
39 39
             $mailer->attach(storage_path($path), ['as' => $file->filename, 'mime' => $file->mime]);
40 40
         }
41 41
 
Please login to merge, or discard this patch.
app/Http/ViewComposers/ActionItemsComposer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
      */
34 34
     private function getDueTraining()
35 35
     {
36
-        return Training::with(['users', 'assignedUsers' => function ($query) {
36
+        return Training::with(['users', 'assignedUsers' => function($query) {
37 37
             //filter the assignedusers we get back
38 38
             $query->ActiveUsers()
39 39
                 ->whereNull('completed_date')
40 40
                 ->where('due_date', '<=', Carbon::now());
41 41
         }])
42
-            ->whereHas('assignedUsers', function ($q) {
42
+            ->whereHas('assignedUsers', function($q) {
43 43
                 //filter the training we get.
44 44
                 $q->ActiveUsers()
45 45
                     ->whereNull('completed_date')
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
      */
54 54
     private function getExpiringVisits()
55 55
     {
56
-        return User::with(['visits' => function ($query) {
56
+        return User::with(['visits' => function($query) {
57 57
             $query->whereBetween('expiration_date', [Carbon::now(), Carbon::now()->addWeek()]);
58
-        }])->whereHas('visits', function ($q) {
58
+        }])->whereHas('visits', function($q) {
59 59
             $q->whereBetween('expiration_date', [Carbon::now(), Carbon::now()->addWeek()]);
60 60
         })->Active()->get();
61 61
     }
Please login to merge, or discard this patch.
app/Http/Controllers/TrainingController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     {
194 194
         $trainingUser = TrainingUser::with('user')->find($trainingUserId);
195 195
         Event::fire(new TrainingAssigned($trainingUser));
196
-        Notification::container()->success('Reminder sent to '.$trainingUser->user->userFullName);
196
+        Notification::container()->success('Reminder sent to ' . $trainingUser->user->userFullName);
197 197
 
198 198
         return redirect()->back();
199 199
     }
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
         //If we have groups, let's get the user ids.
217 217
         if (isset($data['groups'])) {
218
-            $groupUsers = User::whereHas('groups', function ($q) use ($data) {
218
+            $groupUsers = User::whereHas('groups', function($q) use ($data) {
219 219
                 $q->where('id', $data['groups']);
220 220
             })->get();
221 221
 
Please login to merge, or discard this patch.
app/Http/Controllers/TrainingUserController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
     public function destroy($userID, $trainingUserID)
91 91
     {
92 92
         TrainingUser::findOrFail($trainingUserID)->delete();
93
-        Storage::deleteDirectory('traininguser_'.$trainingUserID);
93
+        Storage::deleteDirectory('traininguser_' . $trainingUserID);
94 94
 
95 95
         return Redirect::back();
96 96
     }
Please login to merge, or discard this patch.
app/Http/Controllers/UserController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         $this->authorize('view');
28 28
 
29 29
         $users = User::with([
30
-            'assignedTrainings' => function ($q) {
30
+            'assignedTrainings' => function($q) {
31 31
                 $q->whereNull('completed_date')
32 32
                     ->whereBetween('due_date', [Carbon::now()->subYear(), Carbon::now()->addWeeks(4)]);
33 33
             },
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function show($userId)
78 78
     {
79
-        $user = User::with(['subordinates' => function ($query) {
79
+        $user = User::with(['subordinates' => function($query) {
80 80
             $query->active();
81 81
         }, 'supervisor', 'groups', 'duties', 'attachments'])
82 82
             ->findOrFail($userId);
@@ -100,9 +100,9 @@  discard block
 block discarded – undo
100 100
         $this->previousAndNextUsers($user, $previous, $next);
101 101
 
102 102
         //This mess is just so that we can output the Security Check list or show none. Mainly just to show none.
103
-        $duties = Duty::whereHas('users', function ($q) use ($userId) {
103
+        $duties = Duty::whereHas('users', function($q) use ($userId) {
104 104
             $q->where('id', $userId);
105
-        })->orWhereHas('groups.users', function ($q) use ($userId) {
105
+        })->orWhereHas('groups.users', function($q) use ($userId) {
106 106
             $q->where('id', $userId);
107 107
         })->get();
108 108
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      */
160 160
     public function destroy($userId)
161 161
     {
162
-        Storage::deleteDirectory('user_'.$userId);
162
+        Storage::deleteDirectory('user_' . $userId);
163 163
         User::findOrFail($userId)->delete();
164 164
 
165 165
         return 'success';
Please login to merge, or discard this patch.
app/Http/Controllers/HomeController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,12 +42,12 @@
 block discarded – undo
42 42
         $calendar = (new Calendar())->getCalendar();
43 43
 
44 44
         $duties = Duty::with([
45
-            'users' => function ($query) {
45
+            'users' => function($query) {
46 46
                 $query->orderBy('duty_user.last_worked', 'desc');
47 47
             },
48
-            'groups' => function ($query) {
48
+            'groups' => function($query) {
49 49
                 $query->orderBy('duty_group.last_worked', 'desc');
50
-            }, ])->get();
50
+            },])->get();
51 51
 
52 52
         return view('home.index', compact('trainingUser', 'log', 'calendar', 'duties'));
53 53
     }
Please login to merge, or discard this patch.
app/Http/Controllers/AttachmentController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $type = explode('\\', $entry->imageable_type);
61 61
         $modelName = strtolower($type[1]);
62 62
 
63
-        $file = $modelName.'_'.$entry->imageable_id.'/'.$entry->filename;
63
+        $file = $modelName . '_' . $entry->imageable_id . '/' . $entry->filename;
64 64
 
65 65
         if ($entry->encrypted) {
66 66
             try {
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         return response()->make($fileContent, 200, [
76 76
             'Content-Type'        => $entry->mime,
77
-            'Content-Disposition' => 'attachment; filename="'.$entry->filename.'"',
77
+            'Content-Disposition' => 'attachment; filename="' . $entry->filename . '"',
78 78
         ]);
79 79
     }
80 80
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $type = explode('\\', $file->imageable_type);
94 94
         $modelName = strtolower($type[1]);
95 95
 
96
-        $fileLocation = 'app/'.$modelName.'_'.$file->imageable_id.'/'.$file->filename;
96
+        $fileLocation = 'app/' . $modelName . '_' . $file->imageable_id . '/' . $file->filename;
97 97
         Storage::delete($fileLocation);
98 98
 
99 99
         return back();
Please login to merge, or discard this patch.