Passed
Push — master ( 1ee6b8...5f1b00 )
by Thomas
15:22
created
app/Http/Controllers/Admin/ResultCrudController.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                             $q->where('firstname', 'like', '%'.$searchTerm.'%')
55 55
                             ->orWhere('lastname', 'like', '%'.$searchTerm.'%')
56 56
                             ->orWhere('email', 'like', '%'.$searchTerm.'%')
57
-                          ->orWhere('idnumber', 'like', '%'.$searchTerm.'%');
57
+                            ->orWhere('idnumber', 'like', '%'.$searchTerm.'%');
58 58
                         });
59 59
                     });
60 60
                 },
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
             'name' => 'noresult',
89 89
             'label'=> __('No Result'),
90 90
         ],
91
-          false,
92
-          function () {
93
-              CRUD::addClause('noResult');
94
-          }
91
+            false,
92
+            function () {
93
+                CRUD::addClause('noResult');
94
+            }
95 95
         );
96 96
 
97 97
         CRUD::addFilter(
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
         ],
103 103
             false,
104 104
             function () {
105
-              CRUD::addClause('real');
106
-          }
105
+                CRUD::addClause('real');
106
+            }
107 107
         );
108 108
 
109 109
         CRUD::addFilter([
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
                 'type' => 'select',
49 49
                 'name' => 'student', // the method that defines the relationship in your Model
50 50
                 'attribute' => 'name', // foreign key attribute that is shown to user
51
-                'searchLogic' => function ($query, $column, $searchTerm) {
52
-                    $query->orWhereHas('student', function ($q) use ($searchTerm) {
53
-                        $q->WhereHas('user', function ($q) use ($searchTerm) {
51
+                'searchLogic' => function($query, $column, $searchTerm) {
52
+                    $query->orWhereHas('student', function($q) use ($searchTerm) {
53
+                        $q->WhereHas('user', function($q) use ($searchTerm) {
54 54
                             $q->where('firstname', 'like', '%'.$searchTerm.'%')
55 55
                             ->orWhere('lastname', 'like', '%'.$searchTerm.'%')
56 56
                             ->orWhere('email', 'like', '%'.$searchTerm.'%')
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             'label'=> __('No Result'),
90 90
         ],
91 91
           false,
92
-          function () {
92
+          function() {
93 93
               CRUD::addClause('noResult');
94 94
           }
95 95
         );
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             'label'=> __('Hide Parents'),
102 102
         ],
103 103
             false,
104
-            function () {
104
+            function() {
105 105
               CRUD::addClause('real');
106 106
           }
107 107
         );
@@ -110,20 +110,20 @@  discard block
 block discarded – undo
110 110
             'name' => 'period_id',
111 111
             'type' => 'select2',
112 112
             'label'=> __('Period'),
113
-        ], function () {
113
+        ], function() {
114 114
             return Period::all()->pluck('name', 'id')->toArray();
115
-        }, function ($value) { // if the filter is active
115
+        }, function($value) { // if the filter is active
116 116
             CRUD::addClause('period', $value);
117 117
         });
118 118
 
119
-        CRUD::addFilter([ // select2_multiple filter
119
+        CRUD::addFilter([// select2_multiple filter
120 120
             'name' => 'result',
121 121
             'type' => 'select2',
122 122
             'label'=> __('Result'),
123
-        ], function () { // the options that show up in the select2
123
+        ], function() { // the options that show up in the select2
124 124
             return ResultType::all()->pluck('name', 'id')->toArray();
125
-        }, function ($value) { // if the filter is active
126
-            $this->crud->query = $this->crud->query->whereHas('result', function ($query) use ($value) {
125
+        }, function($value) { // if the filter is active
126
+            $this->crud->query = $this->crud->query->whereHas('result', function($query) use ($value) {
127 127
                 $query->where('result_type_id', $value);
128 128
             });
129 129
         });
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/ExternalCourseCrudController.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                 'entity' => 'teacher', // the method that defines the relationship in your Model
110 110
                 'attribute' => 'name', // foreign key attribute that is shown to user
111 111
                 'model' => \App\Models\Teacher::class, // foreign key model
112
-		'searchLogic' => false,
112
+        'searchLogic' => false,
113 113
             ],
114 114
 
115 115
             [
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             CRUD::addClause('where', 'rhythm_id', $value);
171 171
         },
172 172
             function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
173
-          }
173
+            }
174 174
         );
175 175
 
176 176
         CRUD::addFilter(
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             CRUD::addClause('where', 'teacher_id', $value);
187 187
         },
188 188
             function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
189
-          }
189
+            }
190 190
         );
191 191
 
192 192
         CRUD::addFilter(
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
             CRUD::addClause('where', 'level_id', $value);
203 203
         },
204 204
             function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
205
-          }
205
+            }
206 206
         );
207 207
 
208 208
         CRUD::addFilter(
@@ -218,10 +218,10 @@  discard block
 block discarded – undo
218 218
             CRUD::addClause('where', 'period_id', $value);
219 219
         },
220 220
             function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
221
-              $period = Period::get_default_period()->id;
222
-              CRUD::addClause('where', 'period_id', $period);
223
-              $this->crud->getRequest()->request->add(['period_id' => $period]); // to make the filter look active
224
-          }
221
+                $period = Period::get_default_period()->id;
222
+                CRUD::addClause('where', 'period_id', $period);
223
+                $this->crud->getRequest()->request->add(['period_id' => $period]); // to make the filter look active
224
+            }
225 225
         );
226 226
     }
227 227
 
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -158,66 +158,66 @@  discard block
 block discarded – undo
158 158
         ]);
159 159
 
160 160
         CRUD::addFilter(
161
-            [ // select2 filter
161
+            [// select2 filter
162 162
             'name' => 'rhythm_id',
163 163
             'type' => 'select2',
164 164
             'label'=> __('Rhythm'),
165 165
         ],
166
-            function () {
166
+            function() {
167 167
             return \App\Models\Rhythm::all()->pluck('name', 'id')->toArray();
168 168
         },
169
-            function ($value) { // if the filter is active
169
+            function($value) { // if the filter is active
170 170
             CRUD::addClause('where', 'rhythm_id', $value);
171 171
         },
172
-            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
172
+            function() { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
173 173
           }
174 174
         );
175 175
 
176 176
         CRUD::addFilter(
177
-            [ // select2 filter
177
+            [// select2 filter
178 178
             'name' => 'teacher_id',
179 179
             'type' => 'select2',
180 180
             'label'=> __('Teacher'),
181 181
         ],
182
-            function () {
182
+            function() {
183 183
             return \App\Models\Teacher::all()->pluck('name', 'id')->toArray();
184 184
         },
185
-            function ($value) { // if the filter is active
185
+            function($value) { // if the filter is active
186 186
             CRUD::addClause('where', 'teacher_id', $value);
187 187
         },
188
-            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
188
+            function() { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
189 189
           }
190 190
         );
191 191
 
192 192
         CRUD::addFilter(
193
-            [ // select2 filter
193
+            [// select2 filter
194 194
             'name' => 'level_id',
195 195
             'type' => 'select2',
196 196
             'label'=> __('Level'),
197 197
         ],
198
-            function () {
198
+            function() {
199 199
             return \App\Models\Level::all()->pluck('name', 'id')->toArray();
200 200
         },
201
-            function ($value) { // if the filter is active
201
+            function($value) { // if the filter is active
202 202
             CRUD::addClause('where', 'level_id', $value);
203 203
         },
204
-            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
204
+            function() { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
205 205
           }
206 206
         );
207 207
 
208 208
         CRUD::addFilter(
209
-            [ // select2 filter
209
+            [// select2 filter
210 210
             'name' => 'period_id',
211 211
             'type' => 'select2',
212 212
             'label'=> __('Period'),
213 213
         ],
214
-            function () {
214
+            function() {
215 215
             return Period::all()->pluck('name', 'id')->toArray();
216 216
         },
217
-            function ($value) { // if the filter is active
217
+            function($value) { // if the filter is active
218 218
             CRUD::addClause('where', 'period_id', $value);
219 219
         },
220
-            function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
220
+            function() { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
221 221
               $period = Period::get_default_period()->id;
222 222
               CRUD::addClause('where', 'period_id', $period);
223 223
               $this->crud->getRequest()->request->add(['period_id' => $period]); // to make the filter look active
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
                 'tab' => __('Course info'),
364 364
             ],
365 365
 
366
-            [   // repeatable
366
+            [// repeatable
367 367
                 'name'  => 'times',
368 368
                 'label' => __('Course Schedule'),
369 369
                 'type'  => 'repeatable',
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
                 'tab' => __('Schedule'),
403 403
             ],
404 404
 
405
-            [   // view
405
+            [// view
406 406
                 'name' => 'custom-ajax-button',
407 407
                 'type' => 'view',
408 408
                 'view' => 'courses/schedule-preset-alert',
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
                 'tab' => __('Course info'),
557 557
             ],
558 558
 
559
-            [   // repeatable
559
+            [// repeatable
560 560
                 'name'  => 'times',
561 561
                 'label' => __('Course Schedule'),
562 562
                 'type'  => 'repeatable',
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/EvaluationTypeCrudController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         CRUD::addField(['name' => 'name', 'label' => 'Name', 'type' => 'text']);
37 37
 
38
-        CRUD::addField([    // Select2Multiple = n-n relationship (with pivot table)
38
+        CRUD::addField([// Select2Multiple = n-n relationship (with pivot table)
39 39
             'label'     => __('Grade Types'),
40 40
             'type'      => 'select2_multiple',
41 41
             'name'      => 'gradeTypes', // the method that defines the relationship in your Model
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
             'select_all' => true, // show Select All and Clear buttons?
49 49
         ]);
50 50
 
51
-        CRUD::addField([    // Select2Multiple = n-n relationship (with pivot table)
51
+        CRUD::addField([// Select2Multiple = n-n relationship (with pivot table)
52 52
             'label'     => __('Skills'),
53 53
             'type'      => 'select2_multiple',
54 54
             'name'      => 'skills', // the method that defines the relationship in your Model
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/PaymentCrudController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function setup()
36 36
     {
37 37
         CRUD::setModel(\App\Models\Payment::class);
38
-        CRUD::setRoute(config('backpack.base.route_prefix') . '/payment');
38
+        CRUD::setRoute(config('backpack.base.route_prefix').'/payment');
39 39
         CRUD::setEntityNameStrings('payment', 'payments');
40 40
 
41 41
         $this->crud->enableExportButtons();
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             'label' => __('Due Date'),
55 55
         ],
56 56
             false,
57
-            function ($value) { // if the filter is active, apply these constraints
57
+            function($value) { // if the filter is active, apply these constraints
58 58
                 $this->crud->addClause('where', 'date', '>=', Carbon::parse($value)->firstOfMonth());
59 59
                 $this->crud->addClause('where', 'date', '<=', Carbon::parse($value)->lastOfMonth());
60 60
             });
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $payment = Payment::findOrFail($id);
97 97
 
98
-        if (! backpack_user()->can('enrollments.edit')) {
98
+        if (!backpack_user()->can('enrollments.edit')) {
99 99
             abort(403);
100 100
         }
101 101
 
102
-        if (! $payment->invoice)
102
+        if (!$payment->invoice)
103 103
         {
104 104
             abort(404, 'No enrollment found for this payment');
105 105
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/GradeTypeCrudController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
                 'type' => "relationship",
76 76
                 'name' => 'category', // the method on your model that defines the relationship
77 77
                 'ajax' => true,
78
-                'inline_create' => [ // specify the entity in singular
78
+                'inline_create' => [// specify the entity in singular
79 79
                     'entity' => 'gradetypecategory', // the entity in singular
80 80
                     // OPTIONALS
81 81
                     'force_select' => true, // should the inline-created entry be immediately selected?
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/SchedulePresetCrudController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
 
57 57
         CRUD::field('name')->type('text');
58 58
 
59
-         CRUD::addfield([
59
+            CRUD::addfield([
60 60
             'name'  => 'presets',
61 61
             'label' => __('Course Schedule'),
62 62
             'type'  => 'repeatable',
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     public function setup()
28 28
     {
29 29
         CRUD::setModel(\App\Models\SchedulePreset::class);
30
-        CRUD::setRoute(config('backpack.base.route_prefix') . '/schedulepreset');
30
+        CRUD::setRoute(config('backpack.base.route_prefix').'/schedulepreset');
31 31
         CRUD::setEntityNameStrings('Schedule Preset', 'Schedule Presets');
32 32
     }
33 33
 
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/ProfessionCrudController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function setup()
27 27
     {
28 28
         CRUD::setModel(\App\Models\Profession::class);
29
-        CRUD::setRoute(config('backpack.base.route_prefix') . '/profession');
29
+        CRUD::setRoute(config('backpack.base.route_prefix').'/profession');
30 30
         CRUD::setEntityNameStrings('profession', 'professions');
31 31
     }
32 32
 
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/UserCrudController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 'label' => trans('backpack::permissionmanager.email'),
48 48
                 'type'  => 'email',
49 49
             ],
50
-            [ // n-n relationship (with pivot table)
50
+            [// n-n relationship (with pivot table)
51 51
                 'label'     => trans('backpack::permissionmanager.roles'), // Table column heading
52 52
                 'type'      => 'select_multiple',
53 53
                 'name'      => 'roles', // the method that defines the relationship in your Model
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
                 'label' => trans('backpack::permissionmanager.role'),
67 67
             ],
68 68
             config('permission.models.role')::all()->pluck(['name', 'id'])->toArray(),
69
-            function ($value) {
69
+            function($value) {
70 70
                 // if the filter is active
71
-                $this->crud->addClause('whereHas', 'roles', function ($query) use ($value) {
71
+                $this->crud->addClause('whereHas', 'roles', function($query) use ($value) {
72 72
                     $query->where('role_id', '=', $value);
73 73
                 });
74 74
             }
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
     protected function addFields()
120 120
     {
121 121
         $this->crud->addFields([
122
-            [  // Select2
122
+            [// Select2
123 123
                 'label' => trans('firstname'),
124 124
                 'type' => 'text',
125 125
                 'name' => 'firstname',
126 126
             ],
127
-            [  // Select2
127
+            [// Select2
128 128
                 'label' => trans('lastname'),
129 129
                 'type' => 'text',
130 130
                 'name' => 'lastname',
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/TaxCrudController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     public function setup()
28 28
     {
29 29
         CRUD::setModel(\App\Models\Tax::class);
30
-        CRUD::setRoute(config('backpack.base.route_prefix') . '/tax');
30
+        CRUD::setRoute(config('backpack.base.route_prefix').'/tax');
31 31
         CRUD::setEntityNameStrings('tax', 'taxes');
32 32
     }
33 33
 
Please login to merge, or discard this patch.