Passed
Push — master ( 8bc982...4b4510 )
by Thomas
05:57
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/Http/Controllers/Auth/MyAccountController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -226,8 +226,8 @@
 block discarded – undo
226 226
             $user = Student::where('user_id', $this->guard()->user()->id)->first();
227 227
 
228 228
             $user
229
-               ->addMedia($request->fileToUpload)
230
-               ->toMediaCollection('profile-picture');
229
+                ->addMedia($request->fileToUpload)
230
+                ->toMediaCollection('profile-picture');
231 231
         }
232 232
 
233 233
         // 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/Auth/RegisterController.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -163,9 +163,9 @@
 block discarded – undo
163 163
         // add photo
164 164
 
165 165
         $student
166
-           ->addMediaFromBase64($request->data['userPicture'])
167
-           ->usingFileName('profilePicture.jpg')
168
-           ->toMediaCollection('profile-picture');
166
+            ->addMediaFromBase64($request->data['userPicture'])
167
+            ->usingFileName('profilePicture.jpg')
168
+            ->toMediaCollection('profile-picture');
169 169
 
170 170
         Log::info('Profile picture added to the student profile');
171 171
 
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/CourseEvaluationCrudController.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
         }, function ($value) { // if the filter is active
88 88
             CRUD::addClause('where', 'rhythm_id', $value);
89 89
         },
90
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
91
-          });
90
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
91
+            });
92 92
 
93 93
         CRUD::addFilter([ // select2 filter
94 94
             'name' => 'teacher_id',
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
         }, function ($value) { // if the filter is active
100 100
             CRUD::addClause('where', 'teacher_id', $value);
101 101
         },
102
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
103
-          });
102
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
103
+            });
104 104
 
105 105
         CRUD::addFilter([ // select2 filter
106 106
             'name' => 'level_id',
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
         }, function ($value) { // if the filter is active
112 112
             CRUD::addClause('where', 'level_id', $value);
113 113
         },
114
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
115
-          });
114
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
115
+            });
116 116
 
117 117
         CRUD::addFilter([ // select2 filter
118 118
             'name' => 'period_id',
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
         }, function ($value) { // if the filter is active
124 124
             CRUD::addClause('where', 'period_id', $value);
125 125
         },
126
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
127
-              $period = \App\Models\Period::get_default_period()->id;
128
-              CRUD::addClause('where', 'period_id', $period);
129
-              $this->crud->getRequest()->request->add(['period_id' => $period]); // to make the filter look active
130
-          });
126
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
127
+                $period = \App\Models\Period::get_default_period()->id;
128
+                CRUD::addClause('where', 'period_id', $period);
129
+                $this->crud->getRequest()->request->add(['period_id' => $period]); // to make the filter look active
130
+            });
131 131
     }
132 132
 
133 133
     protected function setupCreateOperation()
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
@@ -136,8 +136,8 @@
 block discarded – undo
136 136
                 });
137 137
             });
138 138
         },
139
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
140
-          });
139
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
140
+            });
141 141
 
142 142
         CRUD::addFilter([ // select2_multiple filter
143 143
             'name' => 'notenrolled',
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
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
             'name' => 'action',
87 87
             'label'=> 'Action',
88 88
         ],
89
-              false,
90
-              function () { // if the filter is active
91
-                  CRUD::addClause('where', 'action', true);
92
-              });
89
+                false,
90
+                function () { // if the filter is active
91
+                    CRUD::addClause('where', 'action', true);
92
+                });
93 93
 
94 94
         CRUD::addFilter([ // dropdown filter
95 95
             'name' => 'type',
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
         ], function ($value) { // if the filter is active
104 104
             CRUD::addClause('where', 'commentable_type', '=', $value);
105 105
         },
106
-              function () { // if the filter is not active
107
-                  CRUD::addClause('where', 'commentable_type', '=', \App\Models\Student::class);
108
-                  $this->crud->getRequest()->request->add(['commentable_type' => \App\Models\Student::class]); // to make the filter look active
109
-              });
106
+                function () { // if the filter is not active
107
+                    CRUD::addClause('where', 'commentable_type', '=', \App\Models\Student::class);
108
+                    $this->crud->getRequest()->request->add(['commentable_type' => \App\Models\Student::class]); // to make the filter look active
109
+                });
110 110
     }
111 111
 
112 112
     public function setupUpdateOperation()
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/ResultCrudController.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                             $q->where('firstname', 'like', '%'.$searchTerm.'%')
53 53
                             ->orWhere('lastname', 'like', '%'.$searchTerm.'%')
54 54
                             ->orWhere('email', 'like', '%'.$searchTerm.'%')
55
-                          ->orWhere('idnumber', 'like', '%'.$searchTerm.'%');
55
+                            ->orWhere('idnumber', 'like', '%'.$searchTerm.'%');
56 56
                         });
57 57
                     });
58 58
                 },
@@ -86,20 +86,20 @@  discard block
 block discarded – undo
86 86
             'name' => 'noresult',
87 87
             'label'=> __('No Result'),
88 88
         ],
89
-          false,
90
-          function () {
91
-              CRUD::addClause('noResult');
92
-          });
89
+            false,
90
+            function () {
91
+                CRUD::addClause('noResult');
92
+            });
93 93
 
94 94
         CRUD::addFilter([
95 95
             'type' => 'simple',
96 96
             'name' => 'hideparents',
97 97
             'label'=> __('Hide Parents'),
98 98
         ],
99
-          false,
100
-          function () {
101
-              CRUD::addClause('real');
102
-          });
99
+            false,
100
+            function () {
101
+                CRUD::addClause('real');
102
+            });
103 103
 
104 104
         CRUD::addFilter([
105 105
             'name' => 'period_id',
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
@@ -75,20 +75,20 @@
 block discarded – undo
75 75
         }, function ($value) { // if the filter is active
76 76
             CRUD::addClause('where', 'teacher_id', $value);
77 77
         },
78
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
79
-          });
78
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
79
+            });
80 80
 
81 81
         CRUD::addFilter([ // daterange filter
82 82
             'type' => 'date_range',
83 83
             'name' => 'from_to',
84 84
             'label'=> __('Date range'),
85 85
         ],
86
-          false,
87
-          function ($value) { // if the filter is active, apply these constraints
88
-              $dates = json_decode($value);
89
-              CRUD::addClause('where', 'date', '>=', $dates->from);
90
-              CRUD::addClause('where', 'date', '<=', $dates->to.' 23:59:59');
91
-          });
86
+            false,
87
+            function ($value) { // if the filter is active, apply these constraints
88
+                $dates = json_decode($value);
89
+                CRUD::addClause('where', 'date', '>=', $dates->from);
90
+                CRUD::addClause('where', 'date', '<=', $dates->to.' 23:59:59');
91
+            });
92 92
     }
93 93
 
94 94
     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
@@ -110,39 +110,39 @@  discard block
 block discarded – undo
110 110
             'name' => 'from_to',
111 111
             'label'=> __('Date range'),
112 112
         ],
113
-          false,
114
-          function ($value) { // if the filter is active, apply these constraints
115
-              $dates = json_decode($value);
116
-
117
-              if ($dates->from) {
118
-                  CRUD::addClause('where', 'start', '>=', $dates->from);
119
-              }
120
-              if ($dates->to) {
121
-                  CRUD::addClause('where', 'start', '<=', $dates->to.' 23:59:59');
122
-              }
123
-          });
113
+            false,
114
+            function ($value) { // if the filter is active, apply these constraints
115
+                $dates = json_decode($value);
116
+
117
+                if ($dates->from) {
118
+                    CRUD::addClause('where', 'start', '>=', $dates->from);
119
+                }
120
+                if ($dates->to) {
121
+                    CRUD::addClause('where', 'start', '<=', $dates->to.' 23:59:59');
122
+                }
123
+            });
124 124
 
125 125
         CRUD::addFilter([
126 126
             'type' => 'simple',
127 127
             'name' => 'orphan',
128 128
             'label'=> __('Events with no course'),
129 129
         ],
130
-          false,
131
-          function ($value) { // if the filter is active, apply these constraints
132
-              $this->crud->query->where('course_id', null);
133
-          },
134
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
135
-          });
130
+            false,
131
+            function ($value) { // if the filter is active, apply these constraints
132
+                $this->crud->query->where('course_id', null);
133
+            },
134
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
135
+            });
136 136
 
137 137
         CRUD::addFilter([
138 138
             'type' => 'simple',
139 139
             'name' => 'unassigned',
140 140
             'label'=> __('Events with no teacher'),
141 141
         ],
142
-          false,
143
-          function ($value) { // if the filter is active, apply these constraints
144
-              $this->crud->query->where('teacher_id', null);
145
-          });
142
+            false,
143
+            function ($value) { // if the filter is active, apply these constraints
144
+                $this->crud->query->where('teacher_id', null);
145
+            });
146 146
 
147 147
         CRUD::addFilter([ // select2 filter
148 148
             'name' => 'teacher_id',
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
         }, function ($value) { // if the filter is active
154 154
             CRUD::addClause('where', 'teacher_id', $value);
155 155
         },
156
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
157
-          });
156
+            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
157
+            });
158 158
     }
159 159
 
160 160
     public function store(Request $request)
Please login to merge, or discard this patch.