Passed
Push — master ( 6e44a2...3e59ed )
by Thomas
08:38
created
app/Models/Period.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -208,8 +208,8 @@
 block discarded – undo
208 208
                 foreach ($course->enrollments as $enrollment) {
209 209
                     // if a student has no attendance record for the class (event)
210 210
                     $hasNotAttended = $course->attendance->where('student_id', $enrollment->student_id)
211
-                     ->where('event_id', $event->id)
212
-                     ->isEmpty();
211
+                        ->where('event_id', $event->id)
212
+                        ->isEmpty();
213 213
 
214 214
                     // count one and break loop
215 215
                     if ($hasNotAttended) {
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     protected function mapWebRoutes()
53 53
     {
54 54
         Route::middleware('web')
55
-             ->namespace($this->namespace)
56
-             ->group(base_path('routes/web.php'));
55
+                ->namespace($this->namespace)
56
+                ->group(base_path('routes/web.php'));
57 57
     }
58 58
 
59 59
     /**
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
     protected function mapApiRoutes()
67 67
     {
68 68
         Route::prefix('api')
69
-             ->middleware('api')
70
-             ->namespace($this->namespace)
71
-             ->group(base_path('routes/api.php'));
69
+                ->middleware('api')
70
+                ->namespace($this->namespace)
71
+                ->group(base_path('routes/api.php'));
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/MyAccountController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -228,8 +228,8 @@
 block discarded – undo
228 228
             $user = Student::where('id', $this->guard()->user()->id)->first();
229 229
 
230 230
             $user
231
-               ->addMedia($request->fileToUpload)
232
-               ->toMediaCollection('profile-picture');
231
+                ->addMedia($request->fileToUpload)
232
+                ->toMediaCollection('profile-picture');
233 233
         }
234 234
 
235 235
         // if the user has been selected for a forced update, move to the next step
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/CommentCrudController.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
             'name' => 'action',
91 91
             'label'=> 'Action',
92 92
         ],
93
-              false,
94
-              function () { // if the filter is active
95
-                  CRUD::addClause('where', 'action', true);
96
-              });
93
+                false,
94
+                function () { // if the filter is active
95
+                    CRUD::addClause('where', 'action', true);
96
+                });
97 97
 
98 98
         CRUD::addFilter([ // dropdown filter
99 99
             'name' => 'type',
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
             ], function ($value) { // if the filter is active
110 110
                 CRUD::addClause('where', 'commentable_type', '=', $value);
111 111
             },
112
-              function () { // if the filter is not active
113
-                  CRUD::addClause('where', 'commentable_type', '=', Student::class);
114
-                  $this->crud->getRequest()->request->add(['commentable_type' => Student::class]); // to make the filter look active
115
-              });
112
+                function () { // if the filter is not active
113
+                    CRUD::addClause('where', 'commentable_type', '=', Student::class);
114
+                    $this->crud->getRequest()->request->add(['commentable_type' => Student::class]); // to make the filter look active
115
+                });
116 116
     }
117 117
 
118 118
     public function setupUpdateOperation()
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/LeaveCrudController.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -74,20 +74,20 @@
 block discarded – undo
74 74
         ], fn () => Teacher::all()->pluck('name', 'id')->toArray(), function ($value) { // if the filter is active
75 75
             CRUD::addClause('where', 'teacher_id', $value);
76 76
         },
77
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
78
-          });
77
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
78
+            });
79 79
 
80 80
         CRUD::addFilter([ // daterange filter
81 81
             'type' => 'date_range',
82 82
             'name' => 'from_to',
83 83
             'label'=> __('Date range'),
84 84
         ],
85
-          false,
86
-          function ($value) { // if the filter is active, apply these constraints
87
-              $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR);
88
-              CRUD::addClause('where', 'date', '>=', $dates->from);
89
-              CRUD::addClause('where', 'date', '<=', $dates->to.' 23:59:59');
90
-          });
85
+            false,
86
+            function ($value) { // if the filter is active, apply these constraints
87
+                $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR);
88
+                CRUD::addClause('where', 'date', '>=', $dates->from);
89
+                CRUD::addClause('where', 'date', '<=', $dates->to.' 23:59:59');
90
+            });
91 91
     }
92 92
 
93 93
     protected function setupCreateOperation()
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/EventCrudController.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -116,39 +116,39 @@  discard block
 block discarded – undo
116 116
             'name' => 'from_to',
117 117
             'label'=> __('Date range'),
118 118
         ],
119
-          false,
120
-          function ($value) { // if the filter is active, apply these constraints
121
-              $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR);
122
-
123
-              if ($dates->from) {
124
-                  CRUD::addClause('where', 'start', '>=', $dates->from);
125
-              }
126
-              if ($dates->to) {
127
-                  CRUD::addClause('where', 'start', '<=', $dates->to.' 23:59:59');
128
-              }
129
-          });
119
+            false,
120
+            function ($value) { // if the filter is active, apply these constraints
121
+                $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR);
122
+
123
+                if ($dates->from) {
124
+                    CRUD::addClause('where', 'start', '>=', $dates->from);
125
+                }
126
+                if ($dates->to) {
127
+                    CRUD::addClause('where', 'start', '<=', $dates->to.' 23:59:59');
128
+                }
129
+            });
130 130
 
131 131
         CRUD::addFilter([
132 132
             'type' => 'simple',
133 133
             'name' => 'orphan',
134 134
             'label'=> __('Events with no course'),
135 135
         ],
136
-          false,
137
-          function ($value) { // if the filter is active, apply these constraints
138
-              $this->crud->query->where('course_id', null);
139
-          },
140
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
141
-          });
136
+            false,
137
+            function ($value) { // if the filter is active, apply these constraints
138
+                $this->crud->query->where('course_id', null);
139
+            },
140
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
141
+            });
142 142
 
143 143
         CRUD::addFilter([
144 144
             'type' => 'simple',
145 145
             'name' => 'unassigned',
146 146
             'label'=> __('Events with no teacher'),
147 147
         ],
148
-          false,
149
-          function ($value) { // if the filter is active, apply these constraints
150
-              CRUD::addClause('unassigned');
151
-          });
148
+            false,
149
+            function ($value) { // if the filter is active, apply these constraints
150
+                CRUD::addClause('unassigned');
151
+            });
152 152
 
153 153
         CRUD::addFilter([ // select2 filter
154 154
             'name' => 'teacher_id',
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
         ], fn () => Teacher::all()->pluck('name', 'id')->toArray(), function ($value) { // if the filter is active
158 158
             CRUD::addClause('where', 'teacher_id', $value);
159 159
         },
160
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
161
-          });
160
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
161
+            });
162 162
     }
163 163
 
164 164
     public function store(Request $request)
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/ResultCrudController.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                             $q->where('firstname', 'like', '%'.$searchTerm.'%')
59 59
                             ->orWhere('lastname', 'like', '%'.$searchTerm.'%')
60 60
                             ->orWhere('email', 'like', '%'.$searchTerm.'%')
61
-                          ->orWhere('idnumber', 'like', '%'.$searchTerm.'%');
61
+                            ->orWhere('idnumber', 'like', '%'.$searchTerm.'%');
62 62
                         });
63 63
                     });
64 64
                 },
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
             'name' => 'noresult',
93 93
             'label'=> __('No Result'),
94 94
         ],
95
-          false,
96
-          function () {
97
-              CRUD::addClause('noResult');
98
-          }
95
+            false,
96
+            function () {
97
+                CRUD::addClause('noResult');
98
+            }
99 99
         );
100 100
 
101 101
         CRUD::addFilter(
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/StudentCrudController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -184,8 +184,8 @@
 block discarded – undo
184 184
                 $q->where('period_id', $value);
185 185
             }));
186 186
         },
187
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
188
-          });
187
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
188
+            });
189 189
 
190 190
         CRUD::addFilter([ // select2_multiple filter
191 191
             'name' => 'notenrolled',
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/RegisterController.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -166,9 +166,9 @@
 block discarded – undo
166 166
         // add photo
167 167
         if ($request->data['userPicture']) {
168 168
             $student
169
-               ->addMediaFromBase64($request->data['userPicture'])
170
-               ->usingFileName('profilePicture.jpg')
171
-               ->toMediaCollection('profile-picture');
169
+                ->addMediaFromBase64($request->data['userPicture'])
170
+                ->usingFileName('profilePicture.jpg')
171
+                ->toMediaCollection('profile-picture');
172 172
 
173 173
             Log::info('Profile picture added to the student profile');
174 174
         }
Please login to merge, or discard this patch.