Completed
Pull Request — master (#1231)
by Song
02:42
created
src/Grid/Filter/Between.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 
55 55
         $this->value = array_get($inputs, $this->column);
56 56
 
57
-        $value = array_filter($this->value, function ($val) {
57
+        $value = array_filter($this->value, function($val) {
58 58
             return $val !== '';
59 59
         });
60 60
 
Please login to merge, or discard this patch.
src/Grid/Filter/AbstractFilter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@
 block discarded – undo
158 158
 
159 159
         list($relation, $args[0]) = explode('.', $this->column);
160 160
 
161
-        return ['whereHas' => [$relation, function ($relation) use ($args) {
161
+        return ['whereHas' => [$relation, function($relation) use ($args) {
162 162
             call_user_func_array([$relation, $this->query], $args);
163 163
         }]];
164 164
     }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -331,7 +331,7 @@
 block discarded – undo
331 331
      *
332 332
      * @param Presenter $presenter
333 333
      *
334
-     * @return mixed
334
+     * @return Presenter
335 335
      */
336 336
     protected function setPresenter(Presenter $presenter)
337 337
     {
Please login to merge, or discard this patch.
src/Grid/Row.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
     public function style($style)
135 135
     {
136 136
         if (is_array($style)) {
137
-            $style = implode('', array_map(function ($key, $val) {
137
+            $style = implode('', array_map(function($key, $val) {
138 138
                 return "$key:$val";
139 139
             }, array_keys($style), array_values($style)));
140 140
         }
Please login to merge, or discard this patch.
src/Widgets/Box.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
             return $this->style([$styles]);
65 65
         }
66 66
 
67
-        $styles = array_map(function ($style) {
67
+        $styles = array_map(function($style) {
68 68
             return 'box-'.$style;
69 69
         }, $styles);
70 70
 
Please login to merge, or discard this patch.
src/Auth/Permission.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      *
13 13
      * @param $permission
14 14
      *
15
-     * @return true
15
+     * @return boolean|null
16 16
      */
17 17
     public static function check($permission)
18 18
     {
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      *
31 31
      * @param $roles
32 32
      *
33
-     * @return true
33
+     * @return boolean|null
34 34
      */
35 35
     public static function allow($roles)
36 36
     {
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      *
49 49
      * @param $roles
50 50
      *
51
-     * @return true
51
+     * @return boolean|null
52 52
      */
53 53
     public static function deny($roles)
54 54
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         }
23 23
 
24 24
         if (is_array($permission)) {
25
-            collect($permission)->each(function ($permission) {
25
+            collect($permission)->each(function($permission) {
26 26
                 call_user_func([Permission::class, 'check'], $permission);
27 27
             });
28 28
 
Please login to merge, or discard this patch.
src/Widgets/Form.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
     /**
118 118
      * Add form attributes.
119 119
      *
120
-     * @param string|array $attr
120
+     * @param string $attr
121 121
      * @param string       $value
122 122
      *
123 123
      * @return $this
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      */
163 163
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
164 164
     {
165
-        collect($this->fields)->each(function ($field) use ($fieldWidth, $labelWidth) {
165
+        collect($this->fields)->each(function($field) use ($fieldWidth, $labelWidth) {
166 166
             /* @var Field $field  */
167 167
             $field->setWidth($fieldWidth, $labelWidth);
168 168
         });
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      *
196 196
      * @return $this
197 197
      */
198
-    protected function pushField(Field &$field)
198
+    protected function pushField(Field & $field)
199 199
     {
200 200
         array_push($this->fields, $field);
201 201
 
Please login to merge, or discard this patch.
src/Grid/Model.php 2 patches
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.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $this->setSort();
195 195
         $this->setPaginate();
196 196
 
197
-        $this->queries->unique()->each(function ($query) {
197
+        $this->queries->unique()->each(function($query) {
198 198
             $this->model = call_user_func_array([$this->model, $query['method']], $query['arguments']);
199 199
         });
200 200
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     {
219 219
         $paginate = $this->findQueryByMethod('paginate');
220 220
 
221
-        $this->queries = $this->queries->reject(function ($query) {
221
+        $this->queries = $this->queries->reject(function($query) {
222 222
             return $query['method'] == 'paginate';
223 223
         });
224 224
 
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      */
269 269
     protected function findQueryByMethod($method)
270 270
     {
271
-        return $this->queries->first(function ($query) use ($method) {
271
+        return $this->queries->first(function($query) use ($method) {
272 272
             return $query['method'] == $method;
273 273
         });
274 274
     }
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
     {
314 314
         list($relationName, $relationColumn) = explode('.', $column);
315 315
 
316
-        if ($this->queries->contains(function ($query) use ($relationName) {
316
+        if ($this->queries->contains(function($query) use ($relationName) {
317 317
             return $query['method'] == 'with' && in_array($relationName, $query['arguments']);
318 318
         })) {
319 319
             $relation = $this->model->$relationName();
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function resetOrderBy()
344 344
     {
345
-        $this->queries = $this->queries->reject(function ($query) {
345
+        $this->queries = $this->queries->reject(function($query) {
346 346
             return $query['method'] == 'orderBy';
347 347
         });
348 348
     }
Please login to merge, or discard this patch.
src/Console/MakeCommand.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     /**
26 26
      * Execute the console command.
27 27
      *
28
-     * @return void
28
+     * @return false|null
29 29
      */
30 30
     public function handle()
31 31
     {
Please login to merge, or discard this patch.
src/Controllers/AuthController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
     /**
59 59
      * User logout.
60 60
      *
61
-     * @return Redirect
61
+     * @return \Illuminate\Http\RedirectResponse
62 62
      */
63 63
     public function getLogout()
64 64
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function getSetting()
78 78
     {
79
-        return Admin::content(function (Content $content) {
79
+        return Admin::content(function(Content $content) {
80 80
             $content->header(trans('admin.user_setting'));
81 81
             $content->body($this->settingForm()->edit(Admin::user()->id));
82 82
         });
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
      */
100 100
     protected function settingForm()
101 101
     {
102
-        return Administrator::form(function (Form $form) {
102
+        return Administrator::form(function(Form $form) {
103 103
             $form->display('username', trans('admin.username'));
104 104
             $form->text('name', trans('admin.name'))->rules('required');
105 105
             $form->image('avatar', trans('admin.avatar'));
106 106
             $form->password('password', trans('admin.password'))->rules('confirmed|required');
107 107
             $form->password('password_confirmation', trans('admin.password_confirmation'))->rules('required')
108
-                ->default(function ($form) {
108
+                ->default(function($form) {
109 109
                     return $form->model()->password;
110 110
                 });
111 111
 
@@ -113,13 +113,13 @@  discard block
 block discarded – undo
113 113
 
114 114
             $form->ignore(['password_confirmation']);
115 115
 
116
-            $form->saving(function (Form $form) {
116
+            $form->saving(function(Form $form) {
117 117
                 if ($form->password && $form->model()->password != $form->password) {
118 118
                     $form->password = bcrypt($form->password);
119 119
                 }
120 120
             });
121 121
 
122
-            $form->saved(function () {
122
+            $form->saved(function() {
123 123
                 admin_toastr(trans('admin.update_succeeded'));
124 124
 
125 125
                 return redirect(admin_base_path('auth/setting'));
Please login to merge, or discard this patch.