Completed
Pull Request — master (#3553)
by Song
03:04
created
src/Grid/Column.php 2 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     /**
167 167
      * Extend column displayer.
168 168
      *
169
-     * @param $name
169
+     * @param string $name
170 170
      * @param $displayer
171 171
      */
172 172
     public static function extend($name, $displayer)
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
     /**
201 201
      * Set model for column.
202 202
      *
203
-     * @param $model
203
+     * @param Model $model
204 204
      */
205 205
     public function setModel($model)
206 206
     {
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
     /**
285 285
      * Get original column value.
286 286
      *
287
-     * @return mixed
287
+     * @return string
288 288
      */
289 289
     public function getOriginal()
290 290
     {
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
     /**
295 295
      * Get name of this column.
296 296
      *
297
-     * @return mixed
297
+     * @return string
298 298
      */
299 299
     public function getName()
300 300
     {
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
     /**
323 323
      * Get label of the column.
324 324
      *
325
-     * @return mixed
325
+     * @return string
326 326
      */
327 327
     public function getLabel()
328 328
     {
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
      * Display using display abstract.
410 410
      *
411 411
      * @param string $abstract
412
-     * @param array  $arguments
412
+     * @param Closure[]  $arguments
413 413
      *
414 414
      * @return $this
415 415
      */
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 
407 407
         $column = $this;
408 408
 
409
-        return $this->display(function ($value) use ($grid, $column, $abstract, $arguments) {
409
+        return $this->display(function($value) use ($grid, $column, $abstract, $arguments) {
410 410
             /** @var AbstractDisplayer $displayer */
411 411
             $displayer = new $abstract($value, $grid, $column, $this);
412 412
 
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
      */
425 425
     public function using(array $values, $default = null)
426 426
     {
427
-        return $this->display(function ($value) use ($values, $default) {
427
+        return $this->display(function($value) use ($values, $default) {
428 428
             if (is_null($value)) {
429 429
                 return $default;
430 430
             }
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
      */
443 443
     public function replace(array $replacements)
444 444
     {
445
-        return $this->display(function ($value) use ($replacements) {
445
+        return $this->display(function($value) use ($replacements) {
446 446
             if (isset($replacements[$value])) {
447 447
                 return $replacements[$value];
448 448
             }
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
      */
461 461
     public function view($view)
462 462
     {
463
-        return $this->display(function ($value) use ($view) {
463
+        return $this->display(function($value) use ($view) {
464 464
             $model = $this;
465 465
 
466 466
             return view($view, compact('model', 'value'))->render();
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
      */
501 501
     public function filesize()
502 502
     {
503
-        return $this->display(function ($value) {
503
+        return $this->display(function($value) {
504 504
             return file_size($value);
505 505
         });
506 506
     }
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
      */
515 515
     public function gravatar($size = 30)
516 516
     {
517
-        return $this->display(function ($value) use ($size) {
517
+        return $this->display(function($value) use ($size) {
518 518
             $src = sprintf(
519 519
                 'https://www.gravatar.com/avatar/%s?s=%d',
520 520
                 md5(strtolower($value)),
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
      */
536 536
     public function loading($values = [], $others = [])
537 537
     {
538
-        return $this->display(function ($value) use ($values, $others) {
538
+        return $this->display(function($value) use ($values, $others) {
539 539
             $values = (array) $values;
540 540
 
541 541
             if (in_array($value, $values)) {
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
      */
557 557
     public function icon(array $setting, $default = '')
558 558
     {
559
-        return $this->display(function ($value) use ($setting, $default) {
559
+        return $this->display(function($value) use ($setting, $default) {
560 560
             $fa = '';
561 561
 
562 562
             if (isset($setting[$value])) {
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
             Carbon::setLocale($locale);
583 583
         }
584 584
 
585
-        return $this->display(function ($value) {
585
+        return $this->display(function($value) {
586 586
             return Carbon::parse($value)->diffForHumans();
587 587
         });
588 588
     }
@@ -703,7 +703,7 @@  discard block
 block discarded – undo
703 703
         $grid = $this->grid;
704 704
         $column = $this;
705 705
 
706
-        $this->display(function ($value) use ($grid, $column, $class) {
706
+        $this->display(function($value) use ($grid, $column, $class) {
707 707
             /** @var AbstractDisplayer $definition */
708 708
             $definition = new $class($value, $grid, $column, $this);
709 709
 
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
     protected function htmlEntityEncode($item)
722 722
     {
723 723
         if (is_array($item)) {
724
-            array_walk_recursive($item, function (&$value) {
724
+            array_walk_recursive($item, function(&$value) {
725 725
                 $value = htmlentities($value);
726 726
             });
727 727
         } else {
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
      */
759 759
     protected function callSupportDisplayer($abstract, $arguments)
760 760
     {
761
-        return $this->display(function ($value) use ($abstract, $arguments) {
761
+        return $this->display(function($value) use ($abstract, $arguments) {
762 762
             if (is_array($value) || $value instanceof Arrayable) {
763 763
                 return call_user_func_array([collect($value), $abstract], $arguments);
764 764
             }
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
     protected function callBuiltinDisplayer($abstract, $arguments)
783 783
     {
784 784
         if ($abstract instanceof Closure) {
785
-            return $this->display(function ($value) use ($abstract, $arguments) {
785
+            return $this->display(function($value) use ($abstract, $arguments) {
786 786
                 return $abstract->call($this, ...array_merge([$value], $arguments));
787 787
             });
788 788
         }
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
             $grid = $this->grid;
792 792
             $column = $this;
793 793
 
794
-            return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) {
794
+            return $this->display(function($value) use ($abstract, $grid, $column, $arguments) {
795 795
                 /** @var AbstractDisplayer $displayer */
796 796
                 $displayer = new $abstract($value, $grid, $column, $this);
797 797
 
Please login to merge, or discard this patch.
src/Console/PermissionCommand.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -112,6 +112,9 @@  discard block
 block discarded – undo
112 112
         ];
113 113
     }
114 114
 
115
+    /**
116
+     * @param string $permission
117
+     */
115 118
     private function generateHttpMethod($permission)
116 119
     {
117 120
         switch ($permission) {
@@ -134,6 +137,9 @@  discard block
 block discarded – undo
134 137
         return $http_method;
135 138
     }
136 139
 
140
+    /**
141
+     * @param string $permission
142
+     */
137 143
     private function generateHttpPath($table, $permission)
138 144
     {
139 145
         $resource = Str::kebab(Str::camel($table));
@@ -160,6 +166,9 @@  discard block
 block discarded – undo
160 166
         return $http_path;
161 167
     }
162 168
 
169
+    /**
170
+     * @param string $permission
171
+     */
163 172
     private function generateSlug($table, $permission)
164 173
     {
165 174
         return Str::kebab(Str::camel($table)).'.'.$permission;
Please login to merge, or discard this patch.
src/Grid/Column/InputFilter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      * Add a binding to the query.
28 28
      *
29 29
      * @param string     $value
30
-     * @param Model|null $model
30
+     * @param Model $model
31 31
      */
32 32
     public function addBinding($value, Model $model)
33 33
     {
Please login to merge, or discard this patch.
src/Grid/Column/HasHeader.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
     public function renderHeader()
117 117
     {
118
-        return collect($this->headers)->map(function ($item) {
118
+        return collect($this->headers)->map(function($item) {
119 119
             if ($item instanceof Renderable) {
120 120
                 return $item->render();
121 121
             }
Please login to merge, or discard this patch.