Completed
Push — master ( fcb695...c2a60e )
by Song
08:26
created
src/Form/Field/PlainInput.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -8,6 +8,9 @@  discard block
 block discarded – undo
8 8
 
9 9
     protected $append;
10 10
 
11
+    /**
12
+     * @param string $string
13
+     */
11 14
     public function prepend($string)
12 15
     {
13 16
         if (is_null($this->prepend)) {
@@ -17,6 +20,9 @@  discard block
 block discarded – undo
17 20
         return $this;
18 21
     }
19 22
 
23
+    /**
24
+     * @param string $string
25
+     */
20 26
     public function append($string)
21 27
     {
22 28
         if (is_null($this->append)) {
@@ -33,6 +39,9 @@  discard block
 block discarded – undo
33 39
         }
34 40
     }
35 41
 
42
+    /**
43
+     * @param string $attribute
44
+     */
36 45
     protected function defaultAttribute($attribute, $value)
37 46
     {
38 47
         if (!array_key_exists($attribute, $this->attributes)) {
Please login to merge, or discard this patch.
src/Form/Field/UploadField.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@
 block discarded – undo
233 233
      *
234 234
      * @param UploadedFile $file
235 235
      *
236
-     * @return mixed
236
+     * @return string
237 237
      */
238 238
     protected function upload(UploadedFile $file)
239 239
     {
Please login to merge, or discard this patch.
src/Form/NestedForm.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -292,7 +292,7 @@
 block discarded – undo
292 292
     /**
293 293
      * Get the html and script of template.
294 294
      *
295
-     * @return array
295
+     * @return string[]
296 296
      */
297 297
     public function getTemplateHtmlAndScript()
298 298
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@
 block discarded – undo
173 173
         if (array_key_exists($key, $this->original)) {
174 174
             $values = $this->original[$key];
175 175
         }
176
-        $this->fields->each(function (Field $field) use ($values) {
176
+        $this->fields->each(function(Field $field) use ($values) {
177 177
             $field->setOriginal($values);
178 178
         });
179 179
     }
Please login to merge, or discard this patch.
src/Form/Tools.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -66,6 +66,9 @@
 block discarded – undo
66 66
 EOT;
67 67
     }
68 68
 
69
+    /**
70
+     * @return string
71
+     */
69 72
     public function listButton()
70 73
     {
71 74
         $slice = Str::contains($this->form->getResource(0), '/edit') ? null : -1;
Please login to merge, or discard this 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/Grid.php 2 patches
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      * Get or set option for grid.
225 225
      *
226 226
      * @param string $key
227
-     * @param mixed  $value
227
+     * @param boolean  $value
228 228
      *
229 229
      * @return $this|mixed
230 230
      */
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
     /**
355 355
      * Get the grid paginator.
356 356
      *
357
-     * @return mixed
357
+     * @return Tools\Paginator
358 358
      */
359 359
     public function paginator()
360 360
     {
@@ -714,6 +714,9 @@  discard block
 block discarded – undo
714 714
 
715 715
     protected $footer;
716 716
 
717
+    /**
718
+     * @return callable
719
+     */
717 720
     public function footer(Closure $closure = null)
718 721
     {
719 722
         if (!$closure) {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
         $callback = $this->actionsCallback;
435 435
         $column = $this->addColumn('__actions__', trans('admin.action'));
436 436
 
437
-        $column->display(function ($value) use ($grid, $column, $callback) {
437
+        $column->display(function($value) use ($grid, $column, $callback) {
438 438
             $actions = new Actions($value, $grid, $column, $this);
439 439
 
440 440
             return $actions->display($callback);
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
      */
449 449
     public function disableRowSelector()
450 450
     {
451
-        $this->tools(function ($tools) {
451
+        $this->tools(function($tools) {
452 452
             /* @var Grid\Tools $tools */
453 453
             $tools->disableBatchActions();
454 454
         });
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
         $column = new Column(Column::SELECT_COLUMN_NAME, ' ');
473 473
         $column->setGrid($this);
474 474
 
475
-        $column->display(function ($value) use ($grid, $column) {
475
+        $column->display(function($value) use ($grid, $column) {
476 476
             $actions = new RowSelector($value, $grid, $column, $this);
477 477
 
478 478
             return $actions->display();
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 
500 500
         Column::setOriginalGridData($data);
501 501
 
502
-        $this->columns->map(function (Column $column) use (&$data) {
502
+        $this->columns->map(function(Column $column) use (&$data) {
503 503
             $data = $column->fill($data);
504 504
 
505 505
             $this->columnNames[] = $column->getName();
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
      */
578 578
     protected function buildRows(array $data)
579 579
     {
580
-        $this->rows = collect($data)->map(function ($model, $number) {
580
+        $this->rows = collect($data)->map(function($model, $number) {
581 581
             return new Row($number, $model);
582 582
         });
583 583
 
Please login to merge, or discard this patch.
src/Grid/Column.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     /**
126 126
      * Extend column displayer.
127 127
      *
128
-     * @param $name
128
+     * @param string $name
129 129
      * @param $displayer
130 130
      */
131 131
     public static function extend($name, $displayer)
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     /**
160 160
      * Set model for column.
161 161
      *
162
-     * @param $model
162
+     * @param Model $model
163 163
      */
164 164
     public function setModel($model)
165 165
     {
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
     /**
217 217
      * Get name of this column.
218 218
      *
219
-     * @return mixed
219
+     * @return string
220 220
      */
221 221
     public function getName()
222 222
     {
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     /**
227 227
      * Format label.
228 228
      *
229
-     * @param $label
229
+     * @param string $label
230 230
      *
231 231
      * @return mixed
232 232
      */
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     /**
241 241
      * Get label of the column.
242 242
      *
243
-     * @return mixed
243
+     * @return string
244 244
      */
245 245
     public function getLabel()
246 246
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
      * @param array $attributes
185 185
      * @return $this
186 186
      */
187
-    public function setAttributes($attributes  = [])
187
+    public function setAttributes($attributes = [])
188 188
     {
189 189
         static::$htmlAttributes[$this->name] = $attributes;
190 190
 
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
         $grid = $this->grid;
407 407
         $column = $this;
408 408
 
409
-        $this->display(function ($value) use ($grid, $column, $class) {
409
+        $this->display(function($value) use ($grid, $column, $class) {
410 410
             $definition = new $class($value, $grid, $column, $this);
411 411
 
412 412
             return $definition->display();
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
     protected function htmlEntityEncode($item)
424 424
     {
425 425
         if (is_array($item)) {
426
-            array_walk_recursive($item, function (&$value) {
426
+            array_walk_recursive($item, function(&$value) {
427 427
                 $value = htmlentities($value);
428 428
             });
429 429
         } else {
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
      */
504 504
     protected function callSupportDisplayer($abstract, $arguments)
505 505
     {
506
-        return $this->display(function ($value) use ($abstract, $arguments) {
506
+        return $this->display(function($value) use ($abstract, $arguments) {
507 507
             if (is_array($value) || $value instanceof Arrayable) {
508 508
                 return call_user_func_array([collect($value), $abstract], $arguments);
509 509
             }
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
     protected function callBuiltinDisplayer($abstract, $arguments)
528 528
     {
529 529
         if ($abstract instanceof Closure) {
530
-            return $this->display(function ($value) use ($abstract, $arguments) {
530
+            return $this->display(function($value) use ($abstract, $arguments) {
531 531
                 return call_user_func_array($abstract->bindTo($this), array_merge([$value], $arguments));
532 532
             });
533 533
         }
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
             $grid = $this->grid;
537 537
             $column = $this;
538 538
 
539
-            return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) {
539
+            return $this->display(function($value) use ($abstract, $grid, $column, $arguments) {
540 540
                 $displayer = new $abstract($value, $grid, $column, $this);
541 541
 
542 542
                 return call_user_func_array([$displayer, 'display'], $arguments);
Please login to merge, or discard this patch.
src/Grid/Displayers/Actions.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -108,6 +108,7 @@
 block discarded – undo
108 108
 
109 109
     /**
110 110
      * {@inheritdoc}
111
+     * @param \Closure $callback
111 112
      */
112 113
     public function display($callback = null)
113 114
     {
Please login to merge, or discard this patch.
src/Grid/Filter/Field/DateTime.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -15,6 +15,9 @@
 block discarded – undo
15 15
 
16 16
     protected $format = 'YYYY-MM-DD HH:mm:ss';
17 17
 
18
+    /**
19
+     * @param \Encore\Admin\Grid\Filter\AbstractFilter $filter
20
+     */
18 21
     public function __construct($filter, array $options = [])
19 22
     {
20 23
         $this->filter = $filter;
Please login to merge, or discard this patch.
src/Grid/Filter/Field/Select.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@
 block discarded – undo
183 183
      *
184 184
      * @param string $target
185 185
      *
186
-     * @return mixed
186
+     * @return string
187 187
      */
188 188
     protected function getClass($target)
189 189
     {
Please login to merge, or discard this patch.