Completed
Pull Request — master (#4037)
by Muhlis
03:04 queued 11s
created
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/Show.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
             $this->overwriteExistingField($name);
225 225
         }
226 226
 
227
-        return tap($field, function ($field) {
227
+        return tap($field, function($field) {
228 228
             $this->fields->push($field);
229 229
         });
230 230
     }
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
             $this->overwriteExistingRelation($name);
249 249
         }
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->each->setWidth($fieldWidth, $labelWidth);
345 345
         });
346 346
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     /**
154 154
      * Overwrite properties for field and relation.
155 155
      *
156
-     * @return bool
156
+     * @return Show
157 157
      */
158 158
     public function overWrite()
159 159
     {
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
      * @param string $method
397 397
      * @param array  $arguments
398 398
      *
399
-     * @return bool|mixed
399
+     * @return Field
400 400
      */
401 401
     public function __call($method, $arguments = [])
402 402
     {
Please login to merge, or discard this patch.