Test Setup Failed
Branch master (86f4a4)
by Shawn
04:57
created
app/Handlers/Excel/JpasImportHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                 foreach ($userGroup as $userId => $changesGroup) {
87 87
                     $user = User::find($userId);
88 88
                     foreach ($changesGroup as $field => $newValue) {
89
-                        if ($newValue != "0"){
89
+                        if ($newValue != "0") {
90 90
                             $user[$field] = $newValue;
91 91
                         }
92 92
                     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     private function getUserChanges($user)
114 114
     {
115
-        if($user->isDirty()) {
115
+        if ($user->isDirty()) {
116 116
             foreach ($user->getDirty() as $attribute => $newValue) {
117 117
                 $this->changes->push([
118 118
                     'user' => $user,
Please login to merge, or discard this patch.
app/Attachment.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@
 block discarded – undo
40 40
 
41 41
     private static function encryptFileContents($file, $encrypt)
42 42
     {
43
-        if ($encrypt)
44
-            return encrypt(File::get($file));
43
+        if ($encrypt) {
44
+                    return encrypt(File::get($file));
45
+        }
45 46
         return File::get($file);
46 47
     }
47 48
 }
Please login to merge, or discard this patch.
app/Console/Commands/SendNews.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         foreach ($newsToPublish as $news) {
49 49
             $allUsers = User::skipSystem()->active()->get();
50 50
             foreach ($allUsers as $user) {
51
-                 Mail::to($user->email)->send(new SendNewsEmail($news));        
51
+                    Mail::to($user->email)->send(new SendNewsEmail($news));        
52 52
             }        
53 53
         }
54 54
     }
Please login to merge, or discard this patch.
app/Console/Commands/ProcessMonday.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 
67 67
         //update end of day list for both building and lab. Retrieve list
68 68
         $duties = Duty::all();
69
-        $this->dutyLists = $duties->map(function ($item, $key) {
69
+        $this->dutyLists = $duties->map(function($item, $key) {
70 70
             $userDateArray = (new DutyList($item))->emailOutput();
71
-            $userDateArray->put('duty',$item);
71
+            $userDateArray->put('duty', $item);
72 72
             return $userDateArray;
73 73
         });
74 74
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             'monday'    => Carbon::now()->startOfWeek(),
94 94
             'dutyLists' => $this->dutyLists,
95 95
             'destroyed' => $this->destroyed,
96
-        ], function ($m) use ($reportAddress) {
96
+        ], function($m) use ($reportAddress) {
97 97
             $m->to($reportAddress->secondary, $reportAddress->primary)
98 98
                 ->subject('Weekly Report');
99 99
         });
Please login to merge, or discard this patch.
app/Http/Controllers/GroupController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $this->authorize('view');
31 31
 
32 32
         $groups = Group::with([
33
-            'users' => function ($q) {
33
+            'users' => function($q) {
34 34
                 $q->orderBy('last_name');
35 35
             },
36 36
             'trainings'
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             return "nothing sent.";
123 123
         }
124 124
 
125
-        return User::whereHas('groups', function ($query) use ($request) {
125
+        return User::whereHas('groups', function($query) use ($request) {
126 126
             $query->whereIn('id', $request['groups']);
127 127
         })->pluck('id');
128 128
     }
Please login to merge, or discard this patch.
app/Http/Controllers/NewsController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
         if ($news->send_email && $publishDate->eq(Carbon::now())) {            
131 131
             $allUsers = User::skipSystem()->active()->get();
132 132
             foreach ($allUsers as $user) {
133
-                 Mail::to($user->email)->send(new SendNewsEmail($news));                      
133
+                    Mail::to($user->email)->send(new SendNewsEmail($news));                      
134 134
             }
135 135
         }        
136 136
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
     {
116 116
         $this->authorize('edit');
117 117
         
118
-        Storage::deleteDirectory('news_'.$news->id);
118
+        Storage::deleteDirectory('news_' . $news->id);
119 119
         $news->delete();
120 120
     }
121 121
     
Please login to merge, or discard this patch.
app/Http/Controllers/DutyController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@
 block discarded – undo
30 30
         $data = $request->all();
31 31
         $duty = Duty::create($data);
32 32
         
33
-        if ( isset($data['has_groups']) && isset($data['groups'])) {
33
+        if (isset($data['has_groups']) && isset($data['groups'])) {
34 34
             $duty->groups()->attach($data['groups']);
35
-        } else if( isset($data['users'])) {
35
+        } else if (isset($data['users'])) {
36 36
             $duty->users()->attach($data['users']);
37 37
         }
38 38
         
Please login to merge, or discard this patch.
app/Http/Controllers/NoteController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
     {
63 63
         
64 64
         Note::find($noteId)->delete();
65
-        Storage::deleteDirectory('note_'.$noteId);
65
+        Storage::deleteDirectory('note_' . $noteId);
66 66
 
67 67
         return back();
68 68
     }
Please login to merge, or discard this patch.
app/Http/Controllers/TrainingUserController.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 
30 30
     public function store(TrainingUserRequest $request, User $user)
31 31
     {
32
-		$data = $request->all();
32
+        $data = $request->all();
33 33
         $data['author_id'] = Auth::user()->id;
34 34
         $data['user_id'] = $user->id;
35 35
         
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $trainingUser = TrainingUser::findOrFail($trainingUserID);
63 63
 
64 64
         //disable the due by field unless admin.
65
-        if(Gate::denies('edit')) {
65
+        if (Gate::denies('edit')) {
66 66
             $disabled = 'disabled';
67 67
         } else {
68 68
             $disabled = '';
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     public function destroy($userID, $trainingUserID)
90 90
     {
91 91
         TrainingUser::findOrFail($trainingUserID)->delete();
92
-        Storage::deleteDirectory('traininguser_'.$trainingUserID);
92
+        Storage::deleteDirectory('traininguser_' . $trainingUserID);
93 93
 
94 94
         return Redirect::back();
95 95
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,9 @@
 block discarded – undo
51 51
         $trainingUser = TrainingUser::with('training')->findOrFail($trainingID);
52 52
         $this->authorize('show_user', $user);
53 53
 
54
-        if (isset($trainingUser->completed_date)) return redirect()->action('UserController@show', $user->id);
54
+        if (isset($trainingUser->completed_date)) {
55
+            return redirect()->action('UserController@show', $user->id);
56
+        }
55 57
         return view('traininguser.show', compact('trainingUser', 'user'));
56 58
     }
57 59
 
Please login to merge, or discard this patch.