Completed
Pull Request — master (#4037)
by Muhlis
02:48
created
src/Show/Panel.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     /**
129 129
      * Build panel tools.
130 130
      *
131
-     * @param $callable
131
+     * @param \Closure $callable
132 132
      */
133 133
     public function tools($callable)
134 134
     {
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     /**
139 139
      * Fill fields to panel.
140 140
      *
141
-     * @param []Field $fields
141
+     * @param Collection $fields
142 142
      *
143 143
      * @return $this
144 144
      */
Please login to merge, or discard this patch.
src/Controllers/UserController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
         $grid->column('created_at', trans('admin.created_at'));
35 35
         $grid->column('updated_at', trans('admin.updated_at'));
36 36
 
37
-        $grid->actions(function (Grid\Displayers\Actions $actions) {
37
+        $grid->actions(function(Grid\Displayers\Actions $actions) {
38 38
             if ($actions->getKey() == 1) {
39 39
                 $actions->disableDelete();
40 40
             }
41 41
         });
42 42
 
43
-        $grid->tools(function (Grid\Tools $tools) {
44
-            $tools->batch(function (Grid\Tools\BatchActions $actions) {
43
+        $grid->tools(function(Grid\Tools $tools) {
44
+            $tools->batch(function(Grid\Tools\BatchActions $actions) {
45 45
                 $actions->disableDelete();
46 46
             });
47 47
         });
@@ -65,15 +65,15 @@  discard block
 block discarded – undo
65 65
         $show->field('id', 'ID');
66 66
         $show->field('username', trans('admin.username'));
67 67
         $show->field('name', trans('admin.name'));
68
-        $show->field('roles', trans('admin.roles'))->as(function ($roles) {
68
+        $show->field('roles', trans('admin.roles'))->as(function($roles) {
69 69
             return $roles->pluck('name');
70 70
         })->label();
71
-        $show->field('permissions', trans('admin.permissions'))->as(function ($permission) {
71
+        $show->field('permissions', trans('admin.permissions'))->as(function($permission) {
72 72
             return $permission->pluck('name');
73 73
         })->label();
74 74
         $show->field('created_at', trans('admin.created_at'));
75 75
         $show->field('updated_at', trans('admin.updated_at'));
76
-        $show->panel()->tools(function ($tools) use ($id) {
76
+        $show->panel()->tools(function($tools) use ($id) {
77 77
             if ($id == 1) {
78 78
                 $tools->disableDelete();
79 79
             }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         $form->image('avatar', trans('admin.avatar'));
108 108
         $form->password('password', trans('admin.password'))->rules('required|confirmed');
109 109
         $form->password('password_confirmation', trans('admin.password_confirmation'))->rules('required')
110
-            ->default(function ($form) {
110
+            ->default(function($form) {
111 111
                 return $form->model()->password;
112 112
             });
113 113
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         $form->display('created_at', trans('admin.created_at'));
120 120
         $form->display('updated_at', trans('admin.updated_at'));
121 121
 
122
-        $form->saving(function (Form $form) {
122
+        $form->saving(function(Form $form) {
123 123
             if ($form->password && $form->model()->password != $form->password) {
124 124
                 $form->password = bcrypt($form->password);
125 125
             }
Please login to merge, or discard this patch.
src/Grid/Exporters/CsvExporter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@  discard block
 block discarded – undo
22 22
             'Content-Disposition' => "attachment; filename=\"$filename\"",
23 23
         ];
24 24
 
25
-        response()->stream(function () {
25
+        response()->stream(function() {
26 26
             $handle = fopen('php://output', 'w');
27 27
 
28 28
             $titles = [];
29 29
 
30
-            $this->chunk(function ($records) use ($handle, &$titles) {
30
+            $this->chunk(function($records) use ($handle, &$titles) {
31 31
                 if (empty($titles)) {
32 32
                     $titles = $this->getHeaderRowFromRecords($records);
33 33
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function getHeaderRowFromRecords(Collection $records): array
56 56
     {
57 57
         $titles = collect(Arr::dot($records->first()->getAttributes()))->keys()->map(
58
-            function ($key) {
58
+            function($key) {
59 59
                 $key = str_replace('.', ' ', $key);
60 60
 
61 61
                 return Str::ucfirst($key);
Please login to merge, or discard this patch.