Completed
Pull Request — master (#2254)
by
unknown
11:30
created
src/Grid/Model.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     /**
241 241
      * Resolve perPage for pagination.
242 242
      *
243
-     * @param array|null $paginate
243
+     * @param Model $paginate
244 244
      *
245 245
      * @return array
246 246
      */
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
     /**
263 263
      * Find query by method name.
264 264
      *
265
-     * @param $method
265
+     * @param string $method
266 266
      *
267 267
      * @return static
268 268
      */
Please login to merge, or discard this patch.
src/Form/Builder.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     /**
133 133
      * Returns builder is $mode.
134 134
      *
135
-     * @param $mode
135
+     * @param string $mode
136 136
      *
137 137
      * @return bool
138 138
      */
@@ -154,6 +154,7 @@  discard block
 block discarded – undo
154 154
     }
155 155
 
156 156
     /**
157
+     * @param integer $slice
157 158
      * @return string
158 159
      */
159 160
     public function getResource($slice = null)
Please login to merge, or discard this patch.
src/Grid/Filter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
     {
116 116
         $inputs = array_dot(Input::all());
117 117
 
118
-        $inputs = array_filter($inputs, function ($input) {
118
+        $inputs = array_filter($inputs, function($input) {
119 119
             return $input !== '' && !is_null($input);
120 120
         });
121 121
 
Please login to merge, or discard this patch.
src/Grid/Tools.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function disableRefreshButton()
86 86
     {
87
-        $this->tools = $this->tools->reject(function ($tool) {
87
+        $this->tools = $this->tools->reject(function($tool) {
88 88
             return $tool instanceof RefreshButton;
89 89
         });
90 90
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function disableBatchActions()
98 98
     {
99
-        $this->tools = $this->tools->reject(function ($tool) {
99
+        $this->tools = $this->tools->reject(function($tool) {
100 100
             return $tool instanceof BatchActions;
101 101
         });
102 102
     }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function batch(\Closure $closure)
108 108
     {
109
-        call_user_func($closure, $this->tools->first(function ($tool) {
109
+        call_user_func($closure, $this->tools->first(function($tool) {
110 110
             return $tool instanceof BatchActions;
111 111
         }));
112 112
     }
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function render()
120 120
     {
121
-        return $this->tools->map(function ($tool) {
121
+        return $this->tools->map(function($tool) {
122 122
             if ($tool instanceof AbstractTool) {
123 123
                 return $tool->setGrid($this->grid)->render();
124 124
             }
Please login to merge, or discard this patch.
src/Form/Tools.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
             $this->add($this->backButton());
134 134
         }
135 135
 
136
-        return $this->tools->map(function ($tool) {
136
+        return $this->tools->map(function($tool) {
137 137
             if ($tool instanceof Renderable) {
138 138
                 return $tool->render();
139 139
             }
Please login to merge, or discard this patch.
src/Form/Tab.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
     public function getTabs()
83 83
     {
84 84
         // If there is no active tab, then active the first.
85
-        if ($this->tabs->filter(function ($tab) {
85
+        if ($this->tabs->filter(function($tab) {
86 86
             return $tab['active'];
87 87
         })->isEmpty()) {
88 88
             $first = $this->tabs->first();
Please login to merge, or discard this patch.
src/Controllers/RoleController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function index()
23 23
     {
24
-        return Admin::content(function (Content $content) {
24
+        return Admin::content(function(Content $content) {
25 25
             $content->header(trans('admin.roles'));
26 26
             $content->description(trans('admin.list'));
27 27
             $content->body($this->grid()->render());
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function edit($id)
39 39
     {
40
-        return Admin::content(function (Content $content) use ($id) {
40
+        return Admin::content(function(Content $content) use ($id) {
41 41
             $content->header(trans('admin.roles'));
42 42
             $content->description(trans('admin.edit'));
43 43
             $content->body($this->form()->edit($id));
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function create()
53 53
     {
54
-        return Admin::content(function (Content $content) {
54
+        return Admin::content(function(Content $content) {
55 55
             $content->header(trans('admin.roles'));
56 56
             $content->description(trans('admin.create'));
57 57
             $content->body($this->form());
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     protected function grid()
67 67
     {
68
-        return Admin::grid(Role::class, function (Grid $grid) {
68
+        return Admin::grid(Role::class, function(Grid $grid) {
69 69
             $grid->id('ID')->sortable();
70 70
             $grid->slug(trans('admin.slug'));
71 71
             $grid->name(trans('admin.name'));
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
75 75
             $grid->created_at(trans('admin.created_at'));
76 76
             $grid->updated_at(trans('admin.updated_at'));
77 77
 
78
-            $grid->actions(function (Grid\Displayers\Actions $actions) {
78
+            $grid->actions(function(Grid\Displayers\Actions $actions) {
79 79
                 if ($actions->row->slug == 'administrator') {
80 80
                     $actions->disableDelete();
81 81
                 }
82 82
             });
83 83
 
84
-            $grid->tools(function (Grid\Tools $tools) {
85
-                $tools->batch(function (Grid\Tools\BatchActions $actions) {
84
+            $grid->tools(function(Grid\Tools $tools) {
85
+                $tools->batch(function(Grid\Tools\BatchActions $actions) {
86 86
                     $actions->disableDelete();
87 87
                 });
88 88
             });
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function form()
98 98
     {
99
-        return Admin::form(Role::class, function (Form $form) {
99
+        return Admin::form(Role::class, function(Form $form) {
100 100
             $form->display('id', 'ID');
101 101
 
102 102
             $form->text('slug', trans('admin.slug'))->rules('required');
Please login to merge, or discard this patch.
src/Controllers/LogController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,23 +18,23 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public function index()
20 20
     {
21
-        return Admin::content(function (Content $content) {
21
+        return Admin::content(function(Content $content) {
22 22
             $content->header(trans('admin.operation_log'));
23 23
             $content->description(trans('admin.list'));
24 24
 
25
-            $grid = Admin::grid(OperationLog::class, function (Grid $grid) {
25
+            $grid = Admin::grid(OperationLog::class, function(Grid $grid) {
26 26
                 $grid->model()->orderBy('id', 'DESC');
27 27
 
28 28
                 $grid->id('ID')->sortable();
29 29
                 $grid->user()->name('User');
30
-                $grid->method()->display(function ($method) {
30
+                $grid->method()->display(function($method) {
31 31
                     $color = array_get(OperationLog::$methodColors, $method, 'grey');
32 32
 
33 33
                     return "<span class=\"badge bg-$color\">$method</span>";
34 34
                 });
35 35
                 $grid->path()->label('info');
36 36
                 $grid->ip()->label('primary');
37
-                $grid->input()->display(function ($input) {
37
+                $grid->input()->display(function($input) {
38 38
                     $input = json_decode($input, true);
39 39
                     $input = array_except($input, ['_pjax', '_token', '_method', '_previous_']);
40 40
                     if (empty($input)) {
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
 
47 47
                 $grid->created_at(trans('admin.created_at'));
48 48
 
49
-                $grid->actions(function (Grid\Displayers\Actions $actions) {
49
+                $grid->actions(function(Grid\Displayers\Actions $actions) {
50 50
                     $actions->disableEdit();
51 51
                 });
52 52
 
53 53
                 $grid->disableCreation();
54 54
 
55
-                $grid->filter(function ($filter) {
55
+                $grid->filter(function($filter) {
56 56
                     $filter->equal('user_id', 'User')->select(Administrator::all()->pluck('name', 'id'));
57 57
                     $filter->equal('method')->select(array_combine(OperationLog::$methods, OperationLog::$methods));
58 58
                     $filter->like('path');
Please login to merge, or discard this patch.
src/Controllers/UserController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function index()
24 24
     {
25
-        return Admin::content(function (Content $content) {
25
+        return Admin::content(function(Content $content) {
26 26
             $content->header(trans('admin.administrator'));
27 27
             $content->description(trans('admin.list'));
28 28
             $content->body($this->grid()->render());
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function edit($id)
40 40
     {
41
-        return Admin::content(function (Content $content) use ($id) {
41
+        return Admin::content(function(Content $content) use ($id) {
42 42
             $content->header(trans('admin.administrator'));
43 43
             $content->description(trans('admin.edit'));
44 44
             $content->body($this->form()->edit($id));
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function create()
54 54
     {
55
-        return Admin::content(function (Content $content) {
55
+        return Admin::content(function(Content $content) {
56 56
             $content->header(trans('admin.administrator'));
57 57
             $content->description(trans('admin.create'));
58 58
             $content->body($this->form());
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     protected function grid()
68 68
     {
69
-        return Administrator::grid(function (Grid $grid) {
69
+        return Administrator::grid(function(Grid $grid) {
70 70
             $grid->id('ID')->sortable();
71 71
             $grid->username(trans('admin.username'));
72 72
             $grid->name(trans('admin.name'));
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
             $grid->created_at(trans('admin.created_at'));
75 75
             $grid->updated_at(trans('admin.updated_at'));
76 76
 
77
-            $grid->actions(function (Grid\Displayers\Actions $actions) {
77
+            $grid->actions(function(Grid\Displayers\Actions $actions) {
78 78
                 if ($actions->getKey() == 1) {
79 79
                     $actions->disableDelete();
80 80
                 }
81 81
             });
82 82
 
83
-            $grid->tools(function (Grid\Tools $tools) {
84
-                $tools->batch(function (Grid\Tools\BatchActions $actions) {
83
+            $grid->tools(function(Grid\Tools $tools) {
84
+                $tools->batch(function(Grid\Tools\BatchActions $actions) {
85 85
                     $actions->disableDelete();
86 86
                 });
87 87
             });
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function form()
97 97
     {
98
-        return Administrator::form(function (Form $form) {
98
+        return Administrator::form(function(Form $form) {
99 99
             $form->display('id', 'ID');
100 100
 
101 101
             $form->text('username', trans('admin.username'))->rules('required');
@@ -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 = bcrypt($form->password);
121 121
                 }
Please login to merge, or discard this patch.