Passed
Push — master ( 6bd029...1cf270 )
by Thomas
11:14 queued 01:09
created
app/Http/Controllers/Admin/CommentCrudController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -85,17 +85,17 @@  discard block
 block discarded – undo
85 85
             ],
86 86
         ]);
87 87
 
88
-        CRUD::addFilter([ // simple filter
88
+        CRUD::addFilter([// simple filter
89 89
             'type' => 'simple',
90 90
             'name' => 'action',
91 91
             'label'=> 'Action',
92 92
         ],
93 93
               false,
94
-              function () { // if the filter is active
94
+              function() { // if the filter is active
95 95
                   CRUD::addClause('where', 'action', true);
96 96
               });
97 97
 
98
-        CRUD::addFilter([ // dropdown filter
98
+        CRUD::addFilter([// dropdown filter
99 99
             'name' => 'type',
100 100
             'type' => 'dropdown',
101 101
             'label'=> 'Type',
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
                 Invoice::class => 'Invoice',
107 107
                 Result::class => 'Result',
108 108
 
109
-            ], function ($value) { // if the filter is active
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
112
+              function() { // if the filter is not active
113 113
                   CRUD::addClause('where', 'commentable_type', '=', Student::class);
114 114
                   $this->crud->getRequest()->request->add(['commentable_type' => Student::class]); // to make the filter look active
115 115
               });
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/InvoiceCrudController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         CRUD::setModel(Invoice::class);
30 30
         CRUD::setRoute(config('backpack.base.route_prefix').'/invoice');
31 31
         CRUD::setEntityNameStrings('invoice', 'invoices');
32
-        if (! config('invoicing.price_categories_enabled')) {
32
+        if (!config('invoicing.price_categories_enabled')) {
33 33
             $this->crud->addButtonFromView('top', 'createInvoice', 'createInvoice', 'start');
34 34
         }
35 35
     }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     {
95 95
         $invoice = Invoice::findOrFail($id)->load('payments');
96 96
 
97
-        if (! backpack_user()->can('enrollments.edit')) {
97
+        if (!backpack_user()->can('enrollments.edit')) {
98 98
             abort(403);
99 99
         }
100 100
 
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
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
                 'type' => 'relationship',
73 73
                 'name' => 'category', // the method on your model that defines the relationship
74 74
                 'ajax' => true,
75
-                'inline_create' => [ // specify the entity in singular
75
+                'inline_create' => [// specify the entity in singular
76 76
                     'entity' => 'gradetypecategory', // the entity in singular
77 77
                     // OPTIONALS
78 78
                     'force_select' => true, // should the inline-created entry be immediately selected?
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/LevelCrudController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,14 +28,14 @@
 block discarded – undo
28 28
     protected function setupListOperation()
29 29
     {
30 30
         CRUD::addColumn(['name' => 'name', 'label' => 'Name']);
31
-        CRUD::addColumn(['name' => 'lms_id', 'label' => 'LMS code', 'type' => 'text'], );
31
+        CRUD::addColumn(['name' => 'lms_id', 'label' => 'LMS code', 'type' => 'text'],);
32 32
     }
33 33
 
34 34
     protected function setupCreateOperation()
35 35
     {
36 36
         CRUD::setValidation(StoreRequest::class);
37 37
         CRUD::addField(['name' => 'name', 'label' => 'Name', 'type' => 'text']);
38
-        CRUD::addField(['name' => 'lms_id', 'label' => 'LMS code', 'type' => 'text'], );
38
+        CRUD::addField(['name' => 'lms_id', 'label' => 'LMS code', 'type' => 'text'],);
39 39
     }
40 40
 
41 41
     protected function setupUpdateOperation()
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/PartnerCrudController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
             'type' => 'date',
98 98
         ]);
99 99
 
100
-        CRUD::addField([   // Checkbox
100
+        CRUD::addField([// Checkbox
101 101
             'name'  => 'auto_renewal',
102 102
             'label' => __('Tacit renewal'),
103 103
             'type'  => 'checkbox',
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/LeaveCrudController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -67,23 +67,23 @@  discard block
 block discarded – undo
67 67
             ],
68 68
         ]);
69 69
 
70
-        CRUD::addFilter([ // select2 filter
70
+        CRUD::addFilter([// select2 filter
71 71
             'name' => 'teacher_id',
72 72
             'type' => 'select2',
73 73
             'label'=> __('Teacher'),
74
-        ], fn () => Teacher::all()->pluck('name', 'id')->toArray(), function ($value) { // if the filter is active
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)
77
+          function() { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
78 78
           });
79 79
 
80
-        CRUD::addFilter([ // daterange filter
80
+        CRUD::addFilter([// daterange filter
81 81
             'type' => 'date_range',
82 82
             'name' => 'from_to',
83 83
             'label'=> __('Date range'),
84 84
         ],
85 85
           false,
86
-          function ($value) { // if the filter is active, apply these constraints
86
+          function($value) { // if the filter is active, apply these constraints
87 87
               $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR);
88 88
               CRUD::addClause('where', 'date', '>=', $dates->from);
89 89
               CRUD::addClause('where', 'date', '<=', $dates->to.' 23:59:59');
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                 'model' => LeaveType::class, // foreign key model
116 116
             ],
117 117
 
118
-            [   // date_range
118
+            [// date_range
119 119
                 'name' => ['start_date', 'end_date'], // db columns for start_date & end_date
120 120
                 'label' => 'Event Date Range',
121 121
                 'type' => 'date_range',
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                 'model' => LeaveType::class, // foreign key model
160 160
             ],
161 161
 
162
-            [   // datepicker
162
+            [// datepicker
163 163
                 'name' => 'date',
164 164
                 'label' => 'Event Date',
165 165
                 'type' => 'date',
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/EventCrudController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
 
112 112
         ]);
113 113
 
114
-        CRUD::addFilter([ // daterange filter
114
+        CRUD::addFilter([// daterange filter
115 115
             'type' => 'date_range',
116 116
             'name' => 'from_to',
117 117
             'label'=> __('Date range'),
118 118
         ],
119 119
           false,
120
-          function ($value) { // if the filter is active, apply these constraints
120
+          function($value) { // if the filter is active, apply these constraints
121 121
               $dates = json_decode($value, null, 512, JSON_THROW_ON_ERROR);
122 122
 
123 123
               if ($dates->from) {
@@ -134,10 +134,10 @@  discard block
 block discarded – undo
134 134
             'label'=> __('Events with no course'),
135 135
         ],
136 136
           false,
137
-          function ($value) { // if the filter is active, apply these constraints
137
+          function($value) { // if the filter is active, apply these constraints
138 138
               $this->crud->query->where('course_id', null);
139 139
           },
140
-          function () { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
140
+          function() { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
141 141
           });
142 142
 
143 143
         CRUD::addFilter([
@@ -146,18 +146,18 @@  discard block
 block discarded – undo
146 146
             'label'=> __('Events with no teacher'),
147 147
         ],
148 148
           false,
149
-          function ($value) { // if the filter is active, apply these constraints
149
+          function($value) { // if the filter is active, apply these constraints
150 150
               CRUD::addClause('unassigned');
151 151
           });
152 152
 
153
-        CRUD::addFilter([ // select2 filter
153
+        CRUD::addFilter([// select2 filter
154 154
             'name' => 'teacher_id',
155 155
             'type' => 'select2',
156 156
             'label'=> __('Teacher'),
157
-        ], fn () => Teacher::all()->pluck('name', 'id')->toArray(), function ($value) { // if the filter is active
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)
160
+          function() { // if the filter is NOT active (the GET parameter "checkbox" does not exit)
161 161
           });
162 162
     }
163 163
 
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/ResultCrudController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
                 'type' => 'select',
53 53
                 'name' => 'student', // the method that defines the relationship in your Model
54 54
                 'attribute' => 'name', // foreign key attribute that is shown to user
55
-                'searchLogic' => function ($query, $column, $searchTerm) {
56
-                    $query->orWhereHas('student', function ($q) use ($searchTerm) {
57
-                        $q->WhereHas('user', function ($q) use ($searchTerm) {
55
+                'searchLogic' => function($query, $column, $searchTerm) {
56
+                    $query->orWhereHas('student', function($q) use ($searchTerm) {
57
+                        $q->WhereHas('user', function($q) use ($searchTerm) {
58 58
                             $q->where('firstname', 'like', '%'.$searchTerm.'%')
59 59
                             ->orWhere('lastname', 'like', '%'.$searchTerm.'%')
60 60
                             ->orWhere('email', 'like', '%'.$searchTerm.'%')
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             'label'=> __('No Result'),
94 94
         ],
95 95
           false,
96
-          function () {
96
+          function() {
97 97
               CRUD::addClause('noResult');
98 98
           }
99 99
         );
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                 'label'=> __('Hide Parents'),
106 106
             ],
107 107
             false,
108
-            function () {
108
+            function() {
109 109
                 CRUD::addClause('real');
110 110
             }
111 111
         );
@@ -114,16 +114,16 @@  discard block
 block discarded – undo
114 114
             'name' => 'period_id',
115 115
             'type' => 'select2',
116 116
             'label'=> __('Period'),
117
-        ], fn () => Period::all()->pluck('name', 'id')->toArray(), function ($value) { // if the filter is active
117
+        ], fn() => Period::all()->pluck('name', 'id')->toArray(), function($value) { // if the filter is active
118 118
             CRUD::addClause('period', $value);
119 119
         });
120 120
 
121
-        CRUD::addFilter([ // select2_multiple filter
121
+        CRUD::addFilter([// select2_multiple filter
122 122
             'name' => 'result',
123 123
             'type' => 'select2',
124 124
             'label'=> __('Result'),
125
-        ], fn () => ResultType::all()->pluck('name', 'id')->toArray(), function ($value) { // if the filter is active
126
-            $this->crud->query = $this->crud->query->whereHas('result', function ($query) use ($value) {
125
+        ], fn() => ResultType::all()->pluck('name', 'id')->toArray(), 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/PaymentCrudController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             'label' => __('Due Date'),
50 50
         ],
51 51
             false,
52
-            function ($value) { // if the filter is active, apply these constraints
52
+            function($value) { // if the filter is active, apply these constraints
53 53
                 $this->crud->addClause('where', 'date', '>=', Carbon::parse($value)->firstOfMonth());
54 54
                 $this->crud->addClause('where', 'date', '<=', Carbon::parse($value)->lastOfMonth());
55 55
             });
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $payment = Payment::findOrFail($id);
92 92
 
93
-        if (! backpack_user()->can('enrollments.edit')) {
93
+        if (!backpack_user()->can('enrollments.edit')) {
94 94
             abort(403);
95 95
         }
96 96
 
97
-        if (! $payment->invoice) {
97
+        if (!$payment->invoice) {
98 98
             abort(404, 'No enrollment found for this payment');
99 99
         }
100 100
 
Please login to merge, or discard this patch.