Completed
Pull Request — master (#5319)
by
unknown
02:42
created
src/Form/Field.php 1 patch
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
      *
283 283
      * @param string $column
284 284
      *
285
-     * @return mixed|string
285
+     * @return string
286 286
      */
287 287
     protected function formatColumn($column = '')
288 288
     {
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
     }
592 592
 
593 593
     /**
594
-     * @param string|array|Closure $input
594
+     * @param callable|null $input
595 595
      * @param string|array         $original
596 596
      *
597 597
      * @return array|Closure
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
     /**
803 803
      * Set or get value of the field.
804 804
      *
805
-     * @param null $value
805
+     * @param string $value
806 806
      *
807 807
      * @return mixed
808 808
      */
@@ -973,7 +973,7 @@  discard block
 block discarded – undo
973 973
     /**
974 974
      * Add html attributes to elements.
975 975
      *
976
-     * @param array|string $attribute
976
+     * @param string $attribute
977 977
      * @param mixed        $value
978 978
      *
979 979
      * @return $this
@@ -1103,7 +1103,7 @@  discard block
 block discarded – undo
1103 1103
     /**
1104 1104
      * Get placeholder.
1105 1105
      *
1106
-     * @return mixed
1106
+     * @return string
1107 1107
      */
1108 1108
     public function getPlaceholder()
1109 1109
     {
@@ -1360,7 +1360,7 @@  discard block
 block discarded – undo
1360 1360
     }
1361 1361
 
1362 1362
     /**
1363
-     * @param array $labelClass
1363
+     * @param string[] $labelClass
1364 1364
      * @param bool  $replace
1365 1365
      *
1366 1366
      * @return self
@@ -1415,7 +1415,7 @@  discard block
 block discarded – undo
1415 1415
      *
1416 1416
      * @param string $view
1417 1417
      *
1418
-     * @return string
1418
+     * @return Field
1419 1419
      */
1420 1420
     public function setView($view): self
1421 1421
     {
Please login to merge, or discard this patch.
src/Form/Field/PlainInput.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     protected $append;
16 16
 
17 17
     /**
18
-     * @param mixed $string
18
+     * @param string $string
19 19
      *
20 20
      * @return $this
21 21
      */
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     }
30 30
 
31 31
     /**
32
-     * @param mixed $string
32
+     * @param string $string
33 33
      *
34 34
      * @return $this
35 35
      */
Please login to merge, or discard this patch.
src/Grid/Tools/ColumnSelector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@
 block discarded – undo
33 33
      */
34 34
     protected function getGridColumns()
35 35
     {
36
-        return $this->grid->columns()->reject(function ($column) {
36
+        return $this->grid->columns()->reject(function($column) {
37 37
             return in_array($column->getName(), static::$ignored);
38
-        })->map(function ($column) {
38
+        })->map(function($column) {
39 39
             return [$column->getName() => $column->getLabel()];
40 40
         })->collapse();
41 41
     }
Please login to merge, or discard this patch.
src/Grid/Displayers/AbstractDisplayer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
     {
124 124
         $keys = collect(explode('.', $name ?: $this->getName()));
125 125
 
126
-        return $keys->shift().$keys->reduce(function ($carry, $val) {
126
+        return $keys->shift().$keys->reduce(function($carry, $val) {
127 127
             return $carry."[$val]";
128 128
         });
129 129
     }
Please login to merge, or discard this patch.
src/Grid/Displayers/SwitchGroup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
         $this->overrideStates($states);
13 13
 
14 14
         if (!Arr::isAssoc($columns)) {
15
-            $columns = collect($columns)->map(function ($column) {
15
+            $columns = collect($columns)->map(function($column) {
16 16
                 return [$column => ucfirst($column)];
17 17
             })->collapse();
18 18
         }
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
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     {
105 105
         if ($this->form) {
106 106
             $this->form->fields()
107
-                ->filter(function (Form\Field $field) {
107
+                ->filter(function(Form\Field $field) {
108 108
                     return $field instanceof CascadeGroup
109 109
                         && $field->dependsOn($this)
110 110
                         && $this->hitsCondition($field);
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
             return;
167 167
         }
168 168
 
169
-        $cascadeGroups = collect($this->conditions)->map(function ($condition) {
169
+        $cascadeGroups = collect($this->conditions)->map(function($condition) {
170 170
             return [
171 171
                 'class'    => $this->getCascadeClass($condition['value']),
172 172
                 'operator' => $condition['operator'],
Please login to merge, or discard this patch.
src/Form/Field/Embeds.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@
 block discarded – undo
249 249
     /**
250 250
      * Determine the column name to use with the embedded form.
251 251
      *
252
-     * @return array|string
252
+     * @return string
253 253
      */
254 254
     protected function getEmbeddedColumnName()
255 255
     {
Please login to merge, or discard this patch.
src/Controllers/UserController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,14 +35,14 @@  discard block
 block discarded – undo
35 35
         $grid->column('created_at', trans('admin.created_at'));
36 36
         $grid->column('updated_at', trans('admin.updated_at'));
37 37
 
38
-        $grid->actions(function (Grid\Displayers\Actions $actions) {
38
+        $grid->actions(function(Grid\Displayers\Actions $actions) {
39 39
             if ($actions->getKey() == 1) {
40 40
                 $actions->disableDelete();
41 41
             }
42 42
         });
43 43
 
44
-        $grid->tools(function (Grid\Tools $tools) {
45
-            $tools->batch(function (Grid\Tools\BatchActions $actions) {
44
+        $grid->tools(function(Grid\Tools $tools) {
45
+            $tools->batch(function(Grid\Tools\BatchActions $actions) {
46 46
                 $actions->disableDelete();
47 47
             });
48 48
         });
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
         $show->field('id', 'ID');
67 67
         $show->field('username', trans('admin.username'));
68 68
         $show->field('name', trans('admin.name'));
69
-        $show->field('roles', trans('admin.roles'))->as(function ($roles) {
69
+        $show->field('roles', trans('admin.roles'))->as(function($roles) {
70 70
             return $roles->pluck('name');
71 71
         })->label();
72
-        $show->field('permissions', trans('admin.permissions'))->as(function ($permission) {
72
+        $show->field('permissions', trans('admin.permissions'))->as(function($permission) {
73 73
             return $permission->pluck('name');
74 74
         })->label();
75 75
         $show->field('created_at', trans('admin.created_at'));
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
         $form->image('avatar', trans('admin.avatar'));
104 104
         $form->password('password', trans('admin.password'))->rules('required|confirmed');
105 105
         $form->password('password_confirmation', trans('admin.password_confirmation'))->rules('required')
106
-            ->default(function ($form) {
106
+            ->default(function($form) {
107 107
                 return $form->model()->password;
108 108
             });
109 109
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         $form->display('created_at', trans('admin.created_at'));
116 116
         $form->display('updated_at', trans('admin.updated_at'));
117 117
 
118
-        $form->saving(function (Form $form) {
118
+        $form->saving(function(Form $form) {
119 119
             if ($form->password && $form->model()->password != $form->password) {
120 120
                 $form->password = Hash::make($form->password);
121 121
             }
Please login to merge, or discard this patch.
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/')
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                 && in_array('GET', $route->methods())
59 59
                 && !in_array(substr($route->uri(), strlen('admin/')), config('admin.menu_exclude'));
60 60
         })
61
-            ->map(function (Route $route) {
61
+            ->map(function(Route $route) {
62 62
                 $uri = substr($route->uri(), strlen('admin/'));
63 63
 
64 64
                 return [
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
         $menus = Menu::all()->pluck('title', 'uri');
74 74
         // exclude exist ones
75
-        $news = $routes->diffKeys($menus)->map(function ($item, $key) {
75
+        $news = $routes->diffKeys($menus)->map(function($item, $key) {
76 76
             return [
77 77
                 'title' => $item,
78 78
                 'uri'   => $key,
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         } else {
87 87
             if ($this->hasOption('dry-run') && $this->option('dry-run')) {
88 88
                 $this->line('<info>The following menu items will be created</info>: ');
89
-                $this->table(['Title', 'Uri'], array_map(function ($item) {
89
+                $this->table(['Title', 'Uri'], array_map(function($item) {
90 90
                     return [
91 91
                         $item['title'],
92 92
                         $item['uri'],
Please login to merge, or discard this patch.