Completed
Push — master ( 768836...f2fcb0 )
by Song
02:47 queued 11s
created
src/Console/GenerateMenuCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function handle()
50 50
     {
51
-        $routes = collect($this->router->getRoutes())->filter(function (Route $route) {
51
+        $routes = collect($this->router->getRoutes())->filter(function(Route $route) {
52 52
             $uri = $route->uri();
53 53
             // built-in, parameterized and no-GET are ignored
54 54
             return Str::startsWith($uri, 'admin/')
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                 && !Str::contains($uri, '{')
58 58
                 && in_array('GET', $route->methods());
59 59
         })
60
-            ->map(function (Route $route) {
60
+            ->map(function(Route $route) {
61 61
                 $uri = substr($route->uri(), strlen('admin/'));
62 62
 
63 63
                 return [
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         $menus = Menu::all()->pluck('title', 'uri');
73 73
         // exclude exist ones
74
-        $news = $routes->diffKeys($menus)->map(function ($item, $key) {
74
+        $news = $routes->diffKeys($menus)->map(function($item, $key) {
75 75
             return [
76 76
                 'title' => $item,
77 77
                 'uri'   => $key,
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         } else {
86 86
             if ($this->hasOption('dry-run') && $this->option('dry-run')) {
87 87
                 $this->line('<info>The following menu items will be created</info>: ');
88
-                $this->table(['Title', 'Uri'], array_map(function ($item) {
88
+                $this->table(['Title', 'Uri'], array_map(function($item) {
89 89
                     return [
90 90
                         $item['title'],
91 91
                         $item['uri'],
Please login to merge, or discard this patch.
src/Form/Field/MultipleFile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
         // for create or update
156 156
         if ($this->pathColumn) {
157
-            $targets = array_map(function ($target) {
157
+            $targets = array_map(function($target) {
158 158
                 return [$this->pathColumn => $target];
159 159
             }, $targets);
160 160
         }
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     {
186 186
         $this->name = $this->getStoreName($file);
187 187
 
188
-        return tap($this->upload($file), function () {
188
+        return tap($this->upload($file), function() {
189 189
             $this->name = null;
190 190
         });
191 191
     }
Please login to merge, or discard this patch.
src/Grid/Actions/Delete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         ];
30 30
 
31 31
         try {
32
-            DB::transaction(function () use ($model) {
32
+            DB::transaction(function() use ($model) {
33 33
                 $model->delete();
34 34
             });
35 35
         } catch (\Exception $exception) {
Please login to merge, or discard this patch.
src/Grid/Exporters/CsvExporter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -139,16 +139,16 @@  discard block
 block discarded – undo
139 139
             call_user_func($this->callback, $this);
140 140
         }
141 141
 
142
-        $response = function () {
142
+        $response = function() {
143 143
             $handle = fopen('php://output', 'w');
144 144
             $titles = [];
145 145
 
146
-            $this->chunk(function ($collection) use ($handle, &$titles) {
146
+            $this->chunk(function($collection) use ($handle, &$titles) {
147 147
                 Column::setOriginalGridModels($collection);
148 148
 
149 149
                 $original = $current = $collection->toArray();
150 150
 
151
-                $this->grid->getColumns()->map(function (Column $column) use (&$current) {
151
+                $this->grid->getColumns()->map(function(Column $column) use (&$current) {
152 152
                     $current = $column->fill($current);
153 153
                     $this->grid->columnNames[] = $column->getName();
154 154
                 });
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     protected function getVisiableTitles()
178 178
     {
179 179
         $titles = $this->grid->visibleColumns()
180
-            ->mapWithKeys(function (Column $column) {
180
+            ->mapWithKeys(function(Column $column) {
181 181
                 return [$column->getName() => $column->getLabel()];
182 182
             });
183 183
 
Please login to merge, or discard this patch.
src/Show.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 
227 227
         $this->overwriteExistingField($name);
228 228
 
229
-        return tap($field, function ($field) {
229
+        return tap($field, function($field) {
230 230
             $this->fields->push($field);
231 231
         });
232 232
     }
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
         $this->overwriteExistingRelation($name);
250 250
 
251
-        return tap($relation, function ($relation) {
251
+        return tap($relation, function($relation) {
252 252
             $this->relations->push($relation);
253 253
         });
254 254
     }
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
         }
266 266
 
267 267
         $this->fields = $this->fields->filter(
268
-            function (Field $field) use ($name) {
268
+            function(Field $field) use ($name) {
269 269
                 return $field->getName() != $name;
270 270
             }
271 271
         );
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
         }
284 284
 
285 285
         $this->relations = $this->relations->filter(
286
-            function (Relation $relation) use ($name) {
286
+            function(Relation $relation) use ($name) {
287 287
                 return $relation->getName() != $name;
288 288
             }
289 289
         );
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
      */
341 341
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
342 342
     {
343
-        collect($this->fields)->each(function ($field) use ($fieldWidth, $labelWidth) {
343
+        collect($this->fields)->each(function($field) use ($fieldWidth, $labelWidth) {
344 344
             $field->setWidth($fieldWidth, $labelWidth);
345 345
         });
346 346
 
Please login to merge, or discard this patch.
src/Grid/Selectable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             $this->disablePagination();
87 87
         }
88 88
 
89
-        $this->tools(function (Tools $tools) {
89
+        $this->tools(function(Tools $tools) {
90 90
             $tools->append(new Grid\Selectable\BrowserBtn());
91 91
         });
92 92
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $hide = $hide ? 'hide' : '';
99 99
         $key = $this->key;
100 100
 
101
-        $this->column('__remove__', ' ')->display(function () use ($hide, $key) {
101
+        $this->column('__remove__', ' ')->display(function() use ($hide, $key) {
102 102
             return <<<BTN
103 103
 <a href="javascript:void(0);" class="grid-row-remove {$hide}" data-key="{$this->getAttribute($key)}">
104 104
     <i class="fa fa-trash"></i>
Please login to merge, or discard this patch.
src/Form.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                 return $ret;
252 252
             }
253 253
 
254
-            collect(explode(',', $id))->filter()->each(function ($id) {
254
+            collect(explode(',', $id))->filter()->each(function($id) {
255 255
                 $builder = $this->model()->newQuery();
256 256
 
257 257
                 if ($this->isSoftDeletes) {
@@ -304,9 +304,9 @@  discard block
 block discarded – undo
304 304
 
305 305
         $data = $model->toArray();
306 306
 
307
-        $this->fields()->filter(function ($field) {
307
+        $this->fields()->filter(function($field) {
308 308
             return $field instanceof Field\File;
309
-        })->each(function (Field\File $file) use ($data) {
309
+        })->each(function(Field\File $file) use ($data) {
310 310
             $file->setOriginal($data);
311 311
 
312 312
             $file->destroy();
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
             return $response;
332 332
         }
333 333
 
334
-        DB::transaction(function () {
334
+        DB::transaction(function() {
335 335
             $inserts = $this->prepareInsert($this->updates);
336 336
 
337 337
             foreach ($inserts as $column => $value) {
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
             return $response;
534 534
         }
535 535
 
536
-        DB::transaction(function () {
536
+        DB::transaction(function() {
537 537
             $updates = $this->prepareUpdate($this->updates);
538 538
 
539 539
             foreach ($updates as $column => $value) {
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
     protected function getFieldByColumn($column)
986 986
     {
987 987
         return $this->fields()->first(
988
-            function (Field $field) use ($column) {
988
+            function(Field $field) use ($column) {
989 989
                 if (is_array($field->column())) {
990 990
                     return in_array($column, $field->column());
991 991
                 }
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
     {
1005 1005
         $values = $this->model->toArray();
1006 1006
 
1007
-        $this->fields()->each(function (Field $field) use ($values) {
1007
+        $this->fields()->each(function(Field $field) use ($values) {
1008 1008
             $field->setOriginal($values);
1009 1009
         });
1010 1010
     }
@@ -1032,7 +1032,7 @@  discard block
 block discarded – undo
1032 1032
 
1033 1033
         $data = $this->model->toArray();
1034 1034
 
1035
-        $this->fields()->each(function (Field $field) use ($data) {
1035
+        $this->fields()->each(function(Field $field) use ($data) {
1036 1036
             if (!in_array($field->column(), $this->ignored, true)) {
1037 1037
                 $field->fill($data);
1038 1038
             }
@@ -1162,7 +1162,7 @@  discard block
 block discarded – undo
1162 1162
      */
1163 1163
     public function setWidth($fieldWidth = 8, $labelWidth = 2): self
1164 1164
     {
1165
-        $this->fields()->each(function ($field) use ($fieldWidth, $labelWidth) {
1165
+        $this->fields()->each(function($field) use ($fieldWidth, $labelWidth) {
1166 1166
             /* @var Field $field  */
1167 1167
             $field->setWidth($fieldWidth, $labelWidth);
1168 1168
         });
Please login to merge, or discard this patch.
src/Form/Builder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
      */
344 344
     public function field($name)
345 345
     {
346
-        return $this->fields()->first(function (Field $field) use ($name) {
346
+        return $this->fields()->first(function(Field $field) use ($name) {
347 347
             return $field->column() === $name;
348 348
         });
349 349
     }
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 
574 574
         $this->form->getLayout()->removeReservedFields($reservedColumns);
575 575
 
576
-        $this->fields = $this->fields()->reject(function (Field $field) use ($reservedColumns) {
576
+        $this->fields = $this->fields()->reject(function(Field $field) use ($reservedColumns) {
577 577
             return in_array($field->column(), $reservedColumns, true);
578 578
         });
579 579
     }
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
         $tabObj = $this->form->setTab();
656 656
 
657 657
         if (!$tabObj->isEmpty()) {
658
-            $this->addTabformScript();;
658
+            $this->addTabformScript(); ;
659 659
         }
660 660
 
661 661
         $this->addCascadeScript();
Please login to merge, or discard this patch.
src/Form/Field/CanCascadeFields.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,9 +88,9 @@
 block discarded – undo
88 88
      */
89 89
     protected function applyCascadeConditions()
90 90
     {
91
-        $this->form->fields()->filter(function (Form\Field $field) {
91
+        $this->form->fields()->filter(function(Form\Field $field) {
92 92
             return $field->isDependsOn($this);
93
-        })->each(function (Form\Field $field) {
93
+        })->each(function(Form\Field $field) {
94 94
             $group = Arr::get($field->getDependency(), 'group');
95 95
             $field->setGroupClass(
96 96
                 $this->getDependentsElementClass($group)
Please login to merge, or discard this patch.