Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Test Setup Failed
Pull Request — master (#192)
by Cristian
07:23
created
app/PageTemplates.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     private function services()
24 24
     {
25
-        $this->crud->addField([   // CustomHTML
25
+        $this->crud->addField([// CustomHTML
26 26
             'name'  => 'metas_separator',
27 27
             'type'  => 'custom_html',
28 28
             'value' => '<br><h2>Metas</h2><hr>',
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             'fake'     => true,
47 47
             'store_in' => 'extras',
48 48
         ]);
49
-        $this->crud->addField([   // CustomHTML
49
+        $this->crud->addField([// CustomHTML
50 50
             'name'  => 'content_separator',
51 51
             'type'  => 'custom_html',
52 52
             'value' => '<br><h2>Content</h2><hr>',
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/FluentMonsterCrudController.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
                 ->options([0 => 'Yes', 1 => 'No'])
45 45
                 ->wrapper([
46 46
                     'element' => 'span',
47
-                    'class'   => static function ($crud, $column, $entry) {
47
+                    'class'   => static function($crud, $column, $entry) {
48 48
                         return 'badge badge-'.($entry->{$column['name']} ? 'default' : 'success');
49 49
                     },
50 50
                 ]);
51 51
         CRUD::column('checkbox')->key('check')->label('Agreed')->type('check');
52
-        CRUD::column('created_at')->type('closure')->label('Created At')->function(function ($entry) {
52
+        CRUD::column('created_at')->type('closure')->label('Created At')->function(function($entry) {
53 53
             return 'Created on '.$entry->created_at;
54 54
         });
55 55
         CRUD::column('date')->type('date');
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                 ->type('model_function')
62 62
                 ->label('Text and Email')
63 63
                 ->function_name('getTextAndEmailAttribute')
64
-                ->searchLogic(function ($query, $column, $searchTerm) {
64
+                ->searchLogic(function($query, $column, $searchTerm) {
65 65
                     $query->orWhere('email', 'like', '%'.$searchTerm.'%');
66 66
                     $query->orWhere('text', 'like', '%'.$searchTerm.'%');
67 67
                 });
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                 ->attribute('name')
76 76
                 ->model("Backpack\NewsCRUD\app\Models\Category")
77 77
                 ->wrapper([
78
-                    'href' => function ($crud, $column, $entry, $related_key) {
78
+                    'href' => function($crud, $column, $entry, $related_key) {
79 79
                         return backpack_url('category/'.$related_key.'/show');
80 80
                     },
81 81
                 ]);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 ->attribute('name')
91 91
                 ->model('Backpack\NewsCRUD\app\Models\Tag')
92 92
                 ->wrapper([
93
-                    'href' => function ($crud, $column, $entry, $related_key) {
93
+                    'href' => function($crud, $column, $entry, $related_key) {
94 94
                         return backpack_url('tag/'.$related_key.'/show');
95 95
                     },
96 96
                 ]);
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
         CRUD::filter('checkbox')
538 538
                 ->type('simple')
539 539
                 ->label('Simple')
540
-                ->whenActive(function () {
540
+                ->whenActive(function() {
541 541
                     CRUD::addClause('where', 'checkbox', '1');
542 542
                 });
543 543
 
@@ -545,14 +545,14 @@  discard block
 block discarded – undo
545 545
                 ->type('dropdown')
546 546
                 ->label('Dropdown')
547 547
                 ->values(['one' => 'One', 'two' => 'Two', 'three' => 'Three'])
548
-                ->whenActive(function ($value) {
548
+                ->whenActive(function($value) {
549 549
                     CRUD::addClause('where', 'select_from_array', $value);
550 550
                 });
551 551
 
552 552
         CRUD::filter('text')
553 553
                 ->type('text')
554 554
                 ->label('Text')
555
-                ->whenActive(function ($value) {
555
+                ->whenActive(function($value) {
556 556
                     CRUD::addClause('where', 'text', 'LIKE', "%$value%");
557 557
                 });
558 558
 
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
                 ->label('Range')
562 562
                 ->label_from('min value')
563 563
                 ->label_to('max value')
564
-                ->whenActive(function ($value) {
564
+                ->whenActive(function($value) {
565 565
                     $range = json_decode($value);
566 566
                     if ($range->from && $range->to) {
567 567
                         CRUD::addClause('where', 'number', '>=', (float) $range->from);
@@ -572,14 +572,14 @@  discard block
 block discarded – undo
572 572
         CRUD::filter('date')
573 573
                 ->type('date')
574 574
                 ->label('Date')
575
-                ->whenActive(function ($value) {
575
+                ->whenActive(function($value) {
576 576
                     CRUD::addClause('where', 'date', '=', $value);
577 577
                 });
578 578
 
579 579
         CRUD::filter('date_range')
580 580
                 ->type('date_range')
581 581
                 ->label('Date range')
582
-                ->whenActive(function ($value) {
582
+                ->whenActive(function($value) {
583 583
                     $dates = json_decode($value);
584 584
                     CRUD::addClause('where', 'date', '>=', $dates->from);
585 585
                     CRUD::addClause('where', 'date', '<=', $dates->to);
@@ -588,18 +588,18 @@  discard block
 block discarded – undo
588 588
         CRUD::filter('select2')
589 589
                 ->type('select2')
590 590
                 ->label('Select2')
591
-                ->values(function () {
591
+                ->values(function() {
592 592
                     return \Backpack\NewsCRUD\app\Models\Category::all()->keyBy('id')->pluck('name', 'id')->toArray();
593
-                })->whenActive(function ($value) {
593
+                })->whenActive(function($value) {
594 594
                     CRUD::addClause('where', 'select2', $value);
595 595
                 });
596 596
 
597 597
         CRUD::filter('select2_multiple')
598 598
                 ->type('select2_multiple')
599 599
                 ->label('S2 multiple')
600
-                ->values(function () {
600
+                ->values(function() {
601 601
                     return \Backpack\NewsCRUD\app\Models\Category::all()->keyBy('id')->pluck('name', 'id')->toArray();
602
-                })->whenActive(function ($values) {
602
+                })->whenActive(function($values) {
603 603
                     foreach (json_decode($values) as $key => $value) {
604 604
                         CRUD::addClause('orWhere', 'select2', $value);
605 605
                     }
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
                 ->label('S2 Ajax')
611 611
                 ->placeholder('Pick an article')
612 612
                 ->values(url('api/article-search'))
613
-                ->whenActive(function ($value) {
613
+                ->whenActive(function($value) {
614 614
                     CRUD::addClause('where', 'select2_from_ajax', $value);
615 615
                 });
616 616
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/ProductCrudController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     {
52 52
         CRUD::setValidation(StoreRequest::class);
53 53
 
54
-        CRUD::addField([ // Text
54
+        CRUD::addField([// Text
55 55
             'name'  => 'name',
56 56
             'label' => 'Name',
57 57
             'type'  => 'text',
@@ -72,21 +72,21 @@  discard block
 block discarded – undo
72 72
             //'readonly'=>'readonly',
73 73
         ]);
74 74
 
75
-        CRUD::addField([   // Textarea
75
+        CRUD::addField([// Textarea
76 76
             'name'  => 'description',
77 77
             'label' => 'Description',
78 78
             'type'  => 'textarea',
79 79
             'tab'   => 'Texts',
80 80
         ]);
81 81
 
82
-        CRUD::addField([   // Wysiwyg
82
+        CRUD::addField([// Wysiwyg
83 83
             'name'  => 'details',
84 84
             'label' => 'Details',
85 85
             'type'  => 'wysiwyg',
86 86
             'tab'   => 'Texts',
87 87
         ]);
88 88
 
89
-        CRUD::addField([ // Table
89
+        CRUD::addField([// Table
90 90
             'name'            => 'features',
91 91
             'label'           => 'Features',
92 92
             'type'            => 'table',
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             'tab' => 'Texts',
101 101
         ]);
102 102
 
103
-        CRUD::addField([ // Table
103
+        CRUD::addField([// Table
104 104
             'name'            => 'extra_features',
105 105
             'label'           => 'Extra Features',
106 106
             'type'            => 'table',
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             'tab'  => 'Texts',
116 116
         ]);
117 117
 
118
-        CRUD::addField([  // Select2
118
+        CRUD::addField([// Select2
119 119
             'label'     => 'Category',
120 120
             'type'      => 'select2',
121 121
             'name'      => 'category_id', // the db column for the foreign key
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             'tab' => 'Basic Info',
128 128
         ]);
129 129
 
130
-        CRUD::addField([   // Number
130
+        CRUD::addField([// Number
131 131
             'name'  => 'price',
132 132
             'label' => 'Price',
133 133
             'type'  => 'number',
@@ -142,21 +142,21 @@  discard block
 block discarded – undo
142 142
         ]);
143 143
 
144 144
         CRUD::addFields([
145
-            [ // Text
145
+            [// Text
146 146
                 'name'  => 'meta_title',
147 147
                 'label' => 'Meta Title',
148 148
                 'type'  => 'text',
149 149
                 'fake'  => true,
150 150
                 'tab'   => 'Metas',
151 151
             ],
152
-            [ // Text
152
+            [// Text
153 153
                 'name'  => 'meta_description',
154 154
                 'label' => 'Meta Description',
155 155
                 'type'  => 'text',
156 156
                 'fake'  => true,
157 157
                 'tab'   => 'Metas',
158 158
             ],
159
-            [ // Text
159
+            [// Text
160 160
                 'name'  => 'meta_keywords',
161 161
                 'label' => 'Meta Keywords',
162 162
                 'type'  => 'text',
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/DummyCrudController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
             // only consider fields that have both name and label (needed for table column)
109 109
             // reject custom_html fields (since they have no value)
110
-            $validFields = collect($groupFields)->reject(function ($value, $key) {
110
+            $validFields = collect($groupFields)->reject(function($value, $key) {
111 111
                 $is_custom_html_field = $value['type'] == 'custom_html';
112 112
                 $does_not_have_label = !isset($value['label']);
113 113
                 $does_not_have_name = !isset($value['name']);
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
             'enum', // doesn't make sense inside repeatable
159 159
             'page_or_link', // only available in PageManager package
160 160
             'upload', // currently impossible to make it work inside repeatable;
161
-            'upload_multiple',  // currently impossible to make it work inside repeatable;
161
+            'upload_multiple', // currently impossible to make it work inside repeatable;
162 162
         ];
163 163
 
164 164
         foreach ($groups as $groupKey => $fields) {
165
-            $groups[$groupKey] = Arr::where($fields, function ($field) use ($excludedFieldTypes) {
165
+            $groups[$groupKey] = Arr::where($fields, function($field) use ($excludedFieldTypes) {
166 166
                 // eliminate fields that have 1-1 relationships
167 167
                 // (determined by the fact that their names use dot notation)
168 168
                 if (is_string($field['name']) && strpos($field['name'], '.') != 0) {
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/MonsterCrudController.php 1 patch
Spacing   +88 added lines, -88 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                 'options' => [0 => 'Yes', 1 => 'No'],
62 62
                 'wrapper' => [
63 63
                     'element' => 'span',
64
-                    'class'   => function ($crud, $column, $entry, $related_key) {
64
+                    'class'   => function($crud, $column, $entry, $related_key) {
65 65
                         if ($column['text'] == 'Yes') {
66 66
                             return 'badge badge-success';
67 67
                         }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                 'name'     => 'created_at',
81 81
                 'label'    => 'Created At',
82 82
                 'type'     => 'closure',
83
-                'function' => function ($entry) {
83
+                'function' => function($entry) {
84 84
                     return 'Created on '.$entry->created_at;
85 85
                 },
86 86
             ],
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                 'label'         => 'Text and Email', // Table column heading
107 107
                 'type'          => 'model_function',
108 108
                 'function_name' => 'getTextAndEmailAttribute', // the method in your Model
109
-                'searchLogic'   => function ($query, $column, $searchTerm) {
109
+                'searchLogic'   => function($query, $column, $searchTerm) {
110 110
                     $query->orWhere('email', 'like', '%'.$searchTerm.'%');
111 111
                     $query->orWhere('text', 'like', '%'.$searchTerm.'%');
112 112
                 },
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 'type'        => 'radio',
123 123
                 'options'     => [0 => 'Draft', 1 => 'Published', 2 => 'Other'],
124 124
             ],
125
-            [   // 1-n relationship
125
+            [// 1-n relationship
126 126
                 'label'     => 'Select', // Table column heading
127 127
                 'type'      => 'select',
128 128
                 'name'      => 'select', // the column that contains the ID of that connected entity;
@@ -130,18 +130,18 @@  discard block
 block discarded – undo
130 130
                 'attribute' => 'name', // foreign key attribute that is shown to user
131 131
                 'model'     => "Backpack\NewsCRUD\app\Models\Category", // foreign key model
132 132
                 'wrapper'   => [
133
-                    'href' => function ($crud, $column, $entry, $related_key) {
133
+                    'href' => function($crud, $column, $entry, $related_key) {
134 134
                         return backpack_url('category/'.$related_key.'/show');
135 135
                     },
136 136
                 ],
137 137
             ],
138
-            [   // select_from_array
138
+            [// select_from_array
139 139
                 'name'    => 'select_from_array',
140 140
                 'label'   => 'Select_from_array',
141 141
                 'type'    => 'select_from_array',
142 142
                 'options' => ['one' => 'One', 'two' => 'Two', 'three' => 'Three'],
143 143
             ],
144
-            [   // select_multiple: n-n relationship (with pivot table)
144
+            [// select_multiple: n-n relationship (with pivot table)
145 145
                 'label'     => 'Select_multiple', // Table column heading
146 146
                 'type'      => 'select_multiple',
147 147
                 'name'      => 'tags', // the method that defines the relationship in your Model
@@ -149,18 +149,18 @@  discard block
 block discarded – undo
149 149
                 'attribute' => 'name', // foreign key attribute that is shown to user
150 150
                 'model'     => "Backpack\NewsCRUD\app\Models\Tag", // foreign key model
151 151
                 'wrapper'   => [
152
-                    'href' => function ($crud, $column, $entry, $related_key) {
152
+                    'href' => function($crud, $column, $entry, $related_key) {
153 153
                         return backpack_url('tag/'.$related_key.'/show');
154 154
                     },
155 155
                 ],
156 156
             ],
157
-            [   // select_multiple: n-n relationship (with pivot table)
157
+            [// select_multiple: n-n relationship (with pivot table)
158 158
                 'label'     => 'Relationship_count', // Table column heading
159 159
                 'type'      => 'relationship_count',
160 160
                 'name'      => 'categories', // the method that defines the relationship in your Model
161 161
                 'entity'    => 'categories', // the method that defines the relationship in your Model
162 162
                 'wrapper'   => [
163
-                    'href' => function ($crud, $column, $entry, $related_key) {
163
+                    'href' => function($crud, $column, $entry, $related_key) {
164 164
                         return backpack_url('category');
165 165
                     },
166 166
                 ],
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
         $this->crud->set('show.contentClass', 'col-md-12');
188 188
 
189
-        $this->crud->addColumn([   // SimpleMDE
189
+        $this->crud->addColumn([// SimpleMDE
190 190
             'name'  => 'simplemde',
191 191
             'label' => 'Markdown (SimpleMDE)',
192 192
             'type'  => 'markdown',
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
             'type'  => 'phone',
242 242
         ]);
243 243
 
244
-        $this->crud->addColumn([   // Upload
244
+        $this->crud->addColumn([// Upload
245 245
             'name'   => 'upload_multiple',
246 246
             'label'  => 'Upload Multiple',
247 247
             'type'   => 'upload_multiple',
@@ -273,34 +273,34 @@  discard block
 block discarded – undo
273 273
     protected function addCustomCrudFilters()
274 274
     {
275 275
         $this->crud->addFilter(
276
-            [ // add a "simple" filter called Draft
276
+            [// add a "simple" filter called Draft
277 277
                 'type'  => 'simple',
278 278
                 'name'  => 'checkbox',
279 279
                 'label' => 'Simple',
280 280
             ],
281 281
             false, // the simple filter has no values, just the "Draft" label specified above
282
-        function () { // if the filter is active (the GET parameter "draft" exits)
282
+        function() { // if the filter is active (the GET parameter "draft" exits)
283 283
             $this->crud->addClause('where', 'checkbox', '1');
284 284
         }
285 285
         );
286 286
 
287
-        $this->crud->addFilter([ // dropdown filter
287
+        $this->crud->addFilter([// dropdown filter
288 288
             'name' => 'select_from_array',
289 289
             'type' => 'dropdown',
290 290
             'label'=> 'Dropdown',
291
-        ], ['one' => 'One', 'two' => 'Two', 'three' => 'Three'], function ($value) {
291
+        ], ['one' => 'One', 'two' => 'Two', 'three' => 'Three'], function($value) {
292 292
             // if the filter is active
293 293
             $this->crud->addClause('where', 'select_from_array', $value);
294 294
         });
295 295
 
296 296
         $this->crud->addFilter(
297
-            [ // text filter
297
+            [// text filter
298 298
                 'type'  => 'text',
299 299
                 'name'  => 'text',
300 300
                 'label' => 'Text',
301 301
             ],
302 302
             false,
303
-            function ($value) { // if the filter is active
303
+            function($value) { // if the filter is active
304 304
                 $this->crud->addClause('where', 'text', 'LIKE', "%$value%");
305 305
             }
306 306
         );
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
                 'label_to'   => 'max value',
315 315
             ],
316 316
             false,
317
-            function ($value) { // if the filter is active
317
+            function($value) { // if the filter is active
318 318
                 $range = json_decode($value);
319 319
                 if ($range->from && $range->to) {
320 320
                     $this->crud->addClause('where', 'number', '>=', (float) $range->from);
@@ -324,19 +324,19 @@  discard block
 block discarded – undo
324 324
         );
325 325
 
326 326
         $this->crud->addFilter(
327
-            [ // date filter
327
+            [// date filter
328 328
                 'type'  => 'date',
329 329
                 'name'  => 'date',
330 330
                 'label' => 'Date',
331 331
             ],
332 332
             false,
333
-            function ($value) { // if the filter is active, apply these constraints
333
+            function($value) { // if the filter is active, apply these constraints
334 334
                 $this->crud->addClause('where', 'date', '=', $value);
335 335
             }
336 336
         );
337 337
 
338 338
         $this->crud->addFilter(
339
-            [ // daterange filter
339
+            [// daterange filter
340 340
                 'type' => 'date_range',
341 341
                 'name' => 'date_range',
342 342
                 'label'=> 'Date range',
@@ -348,44 +348,44 @@  discard block
 block discarded – undo
348 348
                 // ]
349 349
             ],
350 350
             false,
351
-            function ($value) { // if the filter is active, apply these constraints
351
+            function($value) { // if the filter is active, apply these constraints
352 352
                 $dates = json_decode($value);
353 353
                 $this->crud->addClause('where', 'date', '>=', $dates->from);
354 354
                 $this->crud->addClause('where', 'date', '<=', $dates->to);
355 355
             }
356 356
         );
357 357
 
358
-        $this->crud->addFilter([ // select2 filter
358
+        $this->crud->addFilter([// select2 filter
359 359
             'name' => 'select2',
360 360
             'type' => 'select2',
361 361
             'label'=> 'Select2',
362
-        ], function () {
362
+        ], function() {
363 363
             return \Backpack\NewsCRUD\app\Models\Category::all()->keyBy('id')->pluck('name', 'id')->toArray();
364
-        }, function ($value) { // if the filter is active
364
+        }, function($value) { // if the filter is active
365 365
             $this->crud->addClause('where', 'select2', $value);
366 366
         });
367 367
 
368
-        $this->crud->addFilter([ // select2_multiple filter
368
+        $this->crud->addFilter([// select2_multiple filter
369 369
             'name' => 'select2_multiple',
370 370
             'type' => 'select2_multiple',
371 371
             'label'=> 'S2 multiple',
372
-        ], function () {
372
+        ], function() {
373 373
             return \Backpack\NewsCRUD\app\Models\Category::all()->keyBy('id')->pluck('name', 'id')->toArray();
374
-        }, function ($values) { // if the filter is active
374
+        }, function($values) { // if the filter is active
375 375
             foreach (json_decode($values) as $key => $value) {
376 376
                 $this->crud->addClause('orWhere', 'select2', $value);
377 377
             }
378 378
         });
379 379
 
380 380
         $this->crud->addFilter(
381
-            [ // select2_ajax filter
381
+            [// select2_ajax filter
382 382
                 'name'        => 'select2_from_ajax',
383 383
                 'type'        => 'select2_ajax',
384 384
                 'label'       => 'S2 Ajax',
385 385
                 'placeholder' => 'Pick an article',
386 386
             ],
387 387
             url('api/article-search'), // the ajax route
388
-            function ($value) { // if the filter is active
388
+            function($value) { // if the filter is active
389 389
                 $this->crud->addClause('where', 'select2_from_ajax', $value);
390 390
             }
391 391
         );
@@ -412,20 +412,20 @@  discard block
 block discarded – undo
412 412
                     'class' => 'form-group col-md-6',
413 413
                 ],
414 414
             ],
415
-            [   // Textarea
415
+            [// Textarea
416 416
                 'name'  => 'textarea',
417 417
                 'label' => 'Textarea',
418 418
                 'type'  => 'textarea',
419 419
                 'tab'   => 'Simple',
420 420
             ],
421
-            [   // Number
421
+            [// Number
422 422
                 'name'              => 'number',
423 423
                 'label'             => 'Number',
424 424
                 'type'              => 'number',
425 425
                 'tab'               => 'Simple',
426 426
                 'wrapperAttributes' => ['class' => 'form-group col-md-3'],
427 427
             ],
428
-            [   // Number
428
+            [// Number
429 429
                 'name'              => 'float',
430 430
                 'label'             => 'Float',
431 431
                 'type'              => 'number',
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
                 'tab'               => 'Simple',
434 434
                 'wrapperAttributes' => ['class' => 'form-group col-md-3'],
435 435
             ],
436
-            [   // Number
436
+            [// Number
437 437
                 'name'              => 'number_with_prefix',
438 438
                 'label'             => 'Number with prefix',
439 439
                 'type'              => 'number',
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
                 'tab'               => 'Simple',
444 444
                 'wrapperAttributes' => ['class' => 'form-group col-md-3'],
445 445
             ],
446
-            [   // Number
446
+            [// Number
447 447
                 'name'              => 'number_with_suffix',
448 448
                 'label'             => 'Number with suffix',
449 449
                 'type'              => 'number',
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
                 'tab'               => 'Simple',
454 454
                 'wrapperAttributes' => ['class' => 'form-group col-md-3'],
455 455
             ],
456
-            [   // Number
456
+            [// Number
457 457
                 'name'              => 'text_with_both_prefix_and_suffix',
458 458
                 'label'             => 'Text with both prefix and suffix',
459 459
                 'type'              => 'number',
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
                 'tab'               => 'Simple',
465 465
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
466 466
             ],
467
-            [   // Password
467
+            [// Password
468 468
                 'name'              => 'password',
469 469
                 'label'             => 'Password',
470 470
                 'type'              => 'password',
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
                 'name'    => 'radio', // the name of the db column
476 476
                 'label'   => 'Status (radio)', // the input label
477 477
                 'type'    => 'radio',
478
-                'options' => [ // the key will be stored in the db, the value will be shown as label;
478
+                'options' => [// the key will be stored in the db, the value will be shown as label;
479 479
                     0 => 'Draft',
480 480
                     1 => 'Published',
481 481
                     2 => 'Other',
@@ -484,13 +484,13 @@  discard block
 block discarded – undo
484 484
                 'inline' => true, // show the radios all on the same line?
485 485
                 'tab'    => 'Simple',
486 486
             ],
487
-            [   // Checkbox
487
+            [// Checkbox
488 488
                 'name'  => 'checkbox',
489 489
                 'label' => 'I have not read the terms and conditions and I never will (checkbox)',
490 490
                 'type'  => 'checkbox',
491 491
                 'tab'   => 'Simple',
492 492
             ],
493
-            [   // Hidden
493
+            [// Hidden
494 494
                 'name'    => 'hidden',
495 495
                 'type'    => 'hidden',
496 496
                 'default' => '6318',
@@ -506,21 +506,21 @@  discard block
 block discarded – undo
506 506
         // -----------------
507 507
 
508 508
         return [
509
-            [   // Month
509
+            [// Month
510 510
                 'name'              => 'week',
511 511
                 'label'             => 'Week',
512 512
                 'type'              => 'week',
513 513
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
514 514
                 'tab'               => 'Time and space',
515 515
             ],
516
-            [   // Month
516
+            [// Month
517 517
                 'name'              => 'month',
518 518
                 'label'             => 'Month',
519 519
                 'type'              => 'month',
520 520
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
521 521
                 'tab'               => 'Time and space',
522 522
             ],
523
-            [   // Date
523
+            [// Date
524 524
                 'name'       => 'date',
525 525
                 'label'      => 'Date (HTML5 spec)',
526 526
                 'type'       => 'date',
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
532 532
                 'tab'               => 'Time and space',
533 533
             ],
534
-            [   // Date
534
+            [// Date
535 535
                 'name'  => 'date_picker',
536 536
                 'label' => 'Date picker (jQuery plugin)',
537 537
                 'type'  => 'date_picker',
@@ -544,14 +544,14 @@  discard block
 block discarded – undo
544 544
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
545 545
                 'tab'               => 'Time and space',
546 546
             ],
547
-            [   // DateTime
547
+            [// DateTime
548 548
                 'name'              => 'datetime',
549 549
                 'label'             => 'Datetime (HTML5 spec)',
550 550
                 'type'              => 'datetime',
551 551
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
552 552
                 'tab'               => 'Time and space',
553 553
             ],
554
-            [   // DateTime
554
+            [// DateTime
555 555
                 'name'  => 'datetime_picker',
556 556
                 'label' => 'Datetime picker (jQuery plugin)',
557 557
                 'type'  => 'datetime_picker',
@@ -563,19 +563,19 @@  discard block
 block discarded – undo
563 563
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
564 564
                 'tab'               => 'Time and space',
565 565
             ],
566
-            [ // Date_range
566
+            [// Date_range
567 567
                 'name'       => ['start_date', 'end_date'], // a unique name for this field
568 568
                 'label'      => 'Date Range',
569 569
                 'type'       => 'date_range',
570 570
                 'default'    => ['2020-03-28 01:01', '2020-04-05 02:00'],
571 571
                 // OPTIONALS
572
-                'date_range_options' => [ // options sent to daterangepicker.js
572
+                'date_range_options' => [// options sent to daterangepicker.js
573 573
                     'timePicker' => true,
574 574
                     'locale'     => ['format' => 'DD/MM/YYYY HH:mm'],
575 575
                 ],
576 576
                 'tab' => 'Time and space',
577 577
             ],
578
-            [   // Address
578
+            [// Address
579 579
                 'name'  => 'address_algolia_string',
580 580
                 'label' => 'Address_algolia (saved in db as string)',
581 581
                 'type'  => 'address_algolia',
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
                 // 'store_as_json' => true,
585 585
                 'tab'           => 'Time and space',
586 586
             ],
587
-            [   // Address
587
+            [// Address
588 588
                 'name'  => 'address_algolia',
589 589
                 'label' => 'Address_algolia (stored in db as json)',
590 590
                 'type'  => 'address_algolia',
@@ -605,13 +605,13 @@  discard block
 block discarded – undo
605 605
             // -----------------
606 606
             // n-n relationships
607 607
             // -----------------
608
-            [   // CustomHTML
608
+            [// CustomHTML
609 609
                 'name'  => 'select_n_n_heading',
610 610
                 'type'  => 'custom_html',
611 611
                 'value' => '<h5 class="mb-0 mt-3 text-primary">n-n Relationship with Pivot Table (HasMany, BelongsToMany)</h5>',
612 612
                 'tab'   => 'Relationships',
613 613
             ],
614
-            [       // Select_Multiple = n-n relationship
614
+            [// Select_Multiple = n-n relationship
615 615
                 'label'     => 'Select_multiple',
616 616
                 'type'      => 'select_multiple',
617 617
                 'name'      => 'tags', // the method that defines the relationship in your Model
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
                 'tab'       => 'Relationships',
623 623
                 // 'wrapperAttributes' => ['class' => 'form-group col-md-12'],
624 624
             ],
625
-            [       // Select2Multiple = n-n relationship (with pivot table)
625
+            [// Select2Multiple = n-n relationship (with pivot table)
626 626
                 'label'             => 'Select2_multiple',
627 627
                 'type'              => 'select2_multiple',
628 628
                 'name'              => 'categories', // the method that defines the relationship in your Model
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
                 'tab'               => 'Relationships',
635 635
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
636 636
             ],
637
-            [ // Select2_from_ajax_multiple: n-n relationship with pivot table
637
+            [// Select2_from_ajax_multiple: n-n relationship with pivot table
638 638
                 'label'                => 'Select2_from_ajax_multiple', // Table column heading
639 639
                 'type'                 => 'select2_from_ajax_multiple',
640 640
                 'name'                 => 'articles', // the column that contains the ID of that connected entity;
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
                 'tab'                  => 'Relationships',
649 649
                 'wrapperAttributes'    => ['class' => 'form-group col-md-6'],
650 650
             ],
651
-            [    // Relationship
651
+            [// Relationship
652 652
                 'label'     => 'Relationship (also uses InlineCreate; Fetch using AJAX) <span class="badge badge-warning">New in 4.1</span>',
653 653
                 'type'      => 'relationship',
654 654
                 'name'      => 'products',
@@ -678,13 +678,13 @@  discard block
 block discarded – undo
678 678
             // -----------------
679 679
             // 1-n relationships
680 680
             // -----------------
681
-            [   // CustomHTML
681
+            [// CustomHTML
682 682
                 'name'  => 'select_1_n_heading',
683 683
                 'type'  => 'custom_html',
684 684
                 'value' => '<h5 class="mb-0 text-primary">1-n Relationships (HasOne, BelongsTo)</h5>',
685 685
                 'tab'   => 'Relationships',
686 686
             ],
687
-            [    // SELECT
687
+            [// SELECT
688 688
                 'label'             => 'Select',
689 689
                 'type'              => 'select',
690 690
                 'name'              => 'select',
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
                 'tab'               => 'Relationships',
695 695
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
696 696
             ],
697
-            [   // select_grouped
697
+            [// select_grouped
698 698
                 'label'                      => 'Select_grouped',
699 699
                 'type'                       => 'select_grouped', //https://github.com/Laravel-Backpack/CRUD/issues/502
700 700
                 'name'                       => 'select_grouped_id',
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
                 'tab'                        => 'Relationships',
709 709
                 'wrapperAttributes'          => ['class' => 'form-group col-md-6'],
710 710
             ],
711
-            [    // SELECT2
711
+            [// SELECT2
712 712
                 'label'             => 'Select2',
713 713
                 'type'              => 'select2',
714 714
                 'name'              => 'select2',
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
                 'tab'               => 'Relationships',
719 719
                 'wrapperAttributes' => ['class' => 'form-group col-md-4'],
720 720
             ],
721
-            [   // select2_grouped
721
+            [// select2_grouped
722 722
                 'label'                      => 'Select2_grouped',
723 723
                 'type'                       => 'select2_grouped', //https://github.com/Laravel-Backpack/CRUD/issues/502
724 724
                 'name'                       => 'select2_grouped_id',
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
                 'tab'                        => 'Relationships',
733 733
                 'wrapperAttributes'          => ['class' => 'form-group col-md-4'],
734 734
             ],
735
-            [   // select2_nested
735
+            [// select2_nested
736 736
                 'name'                       => 'select2_nested_id',
737 737
                 'label'                      => 'Select2_nested',
738 738
                 'type'                       => 'select2_nested',
@@ -743,7 +743,7 @@  discard block
 block discarded – undo
743 743
                 'tab'                        => 'Relationships',
744 744
                 'wrapperAttributes'          => ['class' => 'form-group col-md-4'],
745 745
             ],
746
-            [ // select2_from_ajax: 1-n relationship
746
+            [// select2_from_ajax: 1-n relationship
747 747
                 'label'                => 'Select2_from_ajax', // Table column heading
748 748
                 'type'                 => 'select2_from_ajax',
749 749
                 'name'                 => 'select2_from_ajax', // the column that contains the ID of that connected entity;
@@ -756,14 +756,14 @@  discard block
 block discarded – undo
756 756
                 'tab'                  => 'Relationships',
757 757
                 'wrapperAttributes'    => ['class' => 'form-group col-md-12'],
758 758
             ],
759
-            [    // Relationship - nothing is explicitly defined, not even the field type
759
+            [// Relationship - nothing is explicitly defined, not even the field type
760 760
                 'label'         => 'Relationship (no AJAX, inferred attributes) <span class="badge badge-warning">New in 4.1</span>',
761 761
                 'name'          => 'icon',
762 762
                 'tab'           => 'Relationships',
763 763
                 // 'data_source' => backpack_url('monster/fetch/icon'),
764 764
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
765 765
             ],
766
-            [    // Relationship - everything is explicitly defined
766
+            [// Relationship - everything is explicitly defined
767 767
                 'label'         => 'Relationship (no AJAX; also uses InlineCreate) <span class="badge badge-warning">New in 4.1</span>',
768 768
                 'type'          => 'relationship',
769 769
                 'name'          => 'fallback_icon',
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
             // -----------------
779 779
             // 1-1 relationships
780 780
             // -----------------
781
-            [   // CustomHTML
781
+            [// CustomHTML
782 782
                 'name'  => 'select_1_1_heading',
783 783
                 'type'  => 'custom_html',
784 784
                 'value' => '<h5 class="mb-0 text-primary">1-1 Relationships (HasOne)</h5> ',
@@ -819,13 +819,13 @@  discard block
 block discarded – undo
819 819
         // -----------------
820 820
 
821 821
         return [
822
-            [ // CustomHTML
822
+            [// CustomHTML
823 823
                 'name'  => 'select_heading',
824 824
                 'type'  => 'custom_html',
825 825
                 'value' => '<h5 class="mb-0 text-primary">No Relationship</h5>',
826 826
                 'tab'   => 'Selects',
827 827
             ],
828
-            [ // select_from_array
828
+            [// select_from_array
829 829
                 'name'              => 'select_from_array',
830 830
                 'label'             => 'Select_from_array (no relationship, 1-1 or 1-n)',
831 831
                 'type'              => 'select_from_array',
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
                 'allows_multiple'   => false, // OPTIONAL; needs you to cast this to array in your model;
836 836
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
837 837
             ],
838
-            [ // select2_from_array
838
+            [// select2_from_array
839 839
                 'name'              => 'select2_from_array',
840 840
                 'label'             => 'Select2_from_array (no relationship, 1-1 or 1-n)',
841 841
                 'type'              => 'select2_from_array',
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
                 'allows_multiple'   => false, // OPTIONAL; needs you to cast this to array in your model;
846 846
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
847 847
             ],
848
-            [ // select_and_order
848
+            [// select_and_order
849 849
                 'name'    => 'select_and_order',
850 850
                 'label'   => 'Select_and_order',
851 851
                 'type'    => 'select_and_order',
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
         $fields = [];
876 876
 
877 877
         if (app('env') == 'production') {
878
-            $fields[] = [   // CustomHTML
878
+            $fields[] = [// CustomHTML
879 879
                 'name'      => 'separator',
880 880
                 'type'      => 'custom_html',
881 881
                 'value'     => '<p><small><strong>Note: </strong>In the online demo we\'ve restricted the upload and media library fields a lot, or hidden them entirely. To test them out, you can <a target="_blank" href="https://backpackforlaravel.com/docs/demo">download and install this demo admin panel</a> in your local environment.</small></p>',
@@ -883,14 +883,14 @@  discard block
 block discarded – undo
883 883
             ];
884 884
         }
885 885
 
886
-        $fields[] = [   // Browse
886
+        $fields[] = [// Browse
887 887
             'name'  => 'browse',
888 888
             'label' => 'Browse (using elFinder)',
889 889
             'type'  => 'browse',
890 890
             'tab'   => 'Uploads',
891 891
         ];
892 892
 
893
-        $fields[] = [   // Browse multiple
893
+        $fields[] = [// Browse multiple
894 894
             'name'     => 'browse_multiple',
895 895
             'label'    => 'Browse multiple',
896 896
             'type'     => 'browse_multiple',
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
             // 'mime_types' => null, // visible mime prefixes; ex. ['image'] or ['application/pdf']
901 901
         ];
902 902
 
903
-        $fields[] = [   // Upload
903
+        $fields[] = [// Upload
904 904
             'name'   => 'upload',
905 905
             'label'  => 'Upload',
906 906
             'type'   => 'upload',
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
             'tab' => 'Uploads',
912 912
         ];
913 913
 
914
-        $fields[] = [   // Upload
914
+        $fields[] = [// Upload
915 915
             'name'   => 'upload_multiple',
916 916
             'label'  => 'Upload Multiple',
917 917
             'type'   => 'upload_multiple',
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
             'tab' => 'Uploads',
923 923
         ];
924 924
 
925
-        $fields[] = [ // base64_image
925
+        $fields[] = [// base64_image
926 926
             'label'        => 'Base64 Image - includes cropping',
927 927
             'name'         => 'base64_image',
928 928
             'filename'     => null, // set to null if not needed
@@ -933,7 +933,7 @@  discard block
 block discarded – undo
933 933
             'tab'          => 'Uploads',
934 934
         ];
935 935
 
936
-        $fields[] = [ // image
936
+        $fields[] = [// image
937 937
             'label'        => 'Image - includes cropping',
938 938
             'name'         => 'image',
939 939
             'type'         => 'image',
@@ -955,32 +955,32 @@  discard block
 block discarded – undo
955 955
         // -----------------
956 956
 
957 957
         return [
958
-            [   // SimpleMDE
958
+            [// SimpleMDE
959 959
                 'name'  => 'easymde',
960 960
                 'label' => 'EasyMDE - markdown editor (well-maintained fork of SimpleMDE)',
961 961
                 'type'  => 'easymde',
962 962
                 'tab'   => 'Big texts',
963 963
                 'fake'  => true,
964 964
             ],
965
-            [   // Summernote
965
+            [// Summernote
966 966
                 'name'  => 'summernote',
967 967
                 'label' => 'Summernote editor',
968 968
                 'type'  => 'summernote',
969 969
                 'tab'   => 'Big texts',
970 970
             ],
971
-            [   // CKEditor
971
+            [// CKEditor
972 972
                 'name'  => 'wysiwyg',
973 973
                 'label' => 'CKEditor - also called the WYSIWYG field',
974 974
                 'type'  => 'ckeditor',
975 975
                 'tab'   => 'Big texts',
976 976
             ],
977
-            [   // TinyMCE
977
+            [// TinyMCE
978 978
                 'name'  => 'tinymce',
979 979
                 'label' => 'TinyMCE',
980 980
                 'type'  => 'tinymce',
981 981
                 'tab'   => 'Big texts',
982 982
             ],
983
-            [   // SimpleMDE
983
+            [// SimpleMDE
984 984
                 'name'  => 'simplemde',
985 985
                 'label' => 'SimpleMDE',
986 986
                 'type'  => 'easymde',
@@ -996,7 +996,7 @@  discard block
 block discarded – undo
996 996
         // -----------------
997 997
 
998 998
         return [
999
-            [   // Color
999
+            [// Color
1000 1000
                 'name'  => 'color',
1001 1001
                 'label' => 'Color picker (HTML5 spec)',
1002 1002
                 'type'  => 'color',
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
                 'tab'               => 'Miscellaneous',
1005 1005
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
1006 1006
             ],
1007
-            [   // Color
1007
+            [// Color
1008 1008
                 'name'  => 'color_picker',
1009 1009
                 'label' => 'Color picker (jQuery plugin)',
1010 1010
                 'type'  => 'color_picker',
@@ -1012,14 +1012,14 @@  discard block
 block discarded – undo
1012 1012
                 'tab'               => 'Miscellaneous',
1013 1013
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
1014 1014
             ],
1015
-            [   // URL
1015
+            [// URL
1016 1016
                 'name'              => 'video',
1017 1017
                 'label'             => 'Video - link to video file on Youtube or Vimeo',
1018 1018
                 'type'              => 'video',
1019 1019
                 'tab'               => 'Miscellaneous',
1020 1020
                 'wrapperAttributes' => ['class' => 'form-group col-md-5'],
1021 1021
             ],
1022
-            [   // Range
1022
+            [// Range
1023 1023
                 'name'  => 'range',
1024 1024
                 'label' => 'Range',
1025 1025
                 'type'  => 'range',
@@ -1039,7 +1039,7 @@  discard block
 block discarded – undo
1039 1039
                 'tab'               => 'Miscellaneous',
1040 1040
                 'wrapperAttributes' => ['class' => 'form-group col-md-2'],
1041 1041
             ],
1042
-            [ // Table
1042
+            [// Table
1043 1043
                 'name'            => 'table',
1044 1044
                 'label'           => 'Table',
1045 1045
                 'type'            => 'table',
@@ -1053,7 +1053,7 @@  discard block
 block discarded – undo
1053 1053
                 'min' => 0, // minimum rows allowed in the table
1054 1054
                 'tab' => 'Miscellaneous',
1055 1055
             ],
1056
-            [ // Table
1056
+            [// Table
1057 1057
                 'name'            => 'fake_table',
1058 1058
                 'label'           => 'Fake Table',
1059 1059
                 'type'            => 'table',
Please login to merge, or discard this patch.
app/Http/Requests/DummyRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         return [
29 29
             'name'        => 'required|min:5|max:255',
30 30
             'description' => 'required',
31
-            'simple'      => function ($attribute, $value, $fail) {
31
+            'simple'      => function($attribute, $value, $fail) {
32 32
                 $fieldGroups = json_decode($value);
33 33
 
34 34
                 // do not allow repeatable field to be empty
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         Route::group([
55 55
             'middleware' => 'web',
56 56
             'namespace'  => $this->namespace,
57
-        ], function ($router) {
57
+        ], function($router) {
58 58
             require base_path('routes/web.php');
59 59
         });
60 60
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             'middleware' => 'api',
73 73
             'namespace'  => $this->namespace,
74 74
             'prefix'     => 'api',
75
-        ], function ($router) {
75
+        ], function($router) {
76 76
             require base_path('routes/api.php');
77 77
         });
78 78
     }
Please login to merge, or discard this patch.
app/Providers/BroadcastServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         /*
20 20
          * Authenticate the user's personal channel...
21 21
          */
22
-        Broadcast::channel('App.User.*', function ($user, $userId) {
22
+        Broadcast::channel('App.User.*', function($user, $userId) {
23 23
             return (int) $user->id === (int) $userId;
24 24
         });
25 25
     }
Please login to merge, or discard this patch.