@@ -55,7 +55,6 @@ |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
58 | - * @param int $multiple |
|
59 | 58 | * |
60 | 59 | * @return string |
61 | 60 | */ |
@@ -125,7 +125,7 @@ |
||
125 | 125 | $value = explode($this->separator, $value); |
126 | 126 | } |
127 | 127 | |
128 | - return collect(Arr::wrap($value))->map(function ($item) use ($field) { |
|
128 | + return collect(Arr::wrap($value))->map(function($item) use ($field) { |
|
129 | 129 | return [ |
130 | 130 | 'url' => $this->field->objectUrl($item), |
131 | 131 | 'value' => $item, |
@@ -55,7 +55,6 @@ |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
58 | - * @param int $multiple |
|
59 | 58 | * |
60 | 59 | * @return string |
61 | 60 | */ |
@@ -27,7 +27,7 @@ |
||
27 | 27 | return Admin::component('admin::components.column-expand', [ |
28 | 28 | 'key' => $this->getKey(), |
29 | 29 | 'url' => $this->getLoadUrl(), |
30 | - 'name' => $this->getName() . '-' . $this->getKey(), |
|
30 | + 'name' => $this->getName().'-'.$this->getKey(), |
|
31 | 31 | 'html' => $html, |
32 | 32 | 'value' => $this->value, |
33 | 33 | 'async' => $async, |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $title = $this->trans('title'); |
39 | 39 | } |
40 | 40 | |
41 | - $html = ''; |
|
41 | + $html = ''; |
|
42 | 42 | |
43 | 43 | if ($async = is_subclass_of($callback, Renderable::class)) { |
44 | 44 | $this->renderable = $callback; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'html' => $html, |
55 | 55 | 'key' => $this->getKey(), |
56 | 56 | 'value' => $this->value, |
57 | - 'name' => $this->getKey() . '-' . str_replace('.', '_', $this->getColumn()->getName()), |
|
57 | + 'name' => $this->getKey().'-'.str_replace('.', '_', $this->getColumn()->getName()), |
|
58 | 58 | ]); |
59 | 59 | } |
60 | 60 | } |
@@ -14,7 +14,6 @@ discard block |
||
14 | 14 | protected $renderable; |
15 | 15 | |
16 | 16 | /** |
17 | - * @param int $multiple |
|
18 | 17 | * |
19 | 18 | * @return string |
20 | 19 | */ |
@@ -28,7 +27,7 @@ discard block |
||
28 | 27 | /** |
29 | 28 | * @param \Closure|string $callback |
30 | 29 | * |
31 | - * @return mixed|string |
|
30 | + * @return null|string |
|
32 | 31 | */ |
33 | 32 | public function display($callback = null) |
34 | 33 | { |
@@ -20,6 +20,4 @@ |
||
20 | 20 | }); |
21 | 21 | SCRIPT); |
22 | 22 | |
23 | - return $this; |
|
24 | - } |
|
25 | -} |
|
23 | + return $this |
|
26 | 24 | \ No newline at end of file |
@@ -20,6 +20,4 @@ |
||
20 | 20 | }); |
21 | 21 | SCRIPT); |
22 | 22 | |
23 | - return $this; |
|
24 | - } |
|
25 | -} |
|
23 | + return $this |
|
26 | 24 | \ No newline at end of file |
@@ -20,6 +20,4 @@ |
||
20 | 20 | }); |
21 | 21 | SCRIPT); |
22 | 22 | |
23 | - return $this; |
|
24 | - } |
|
25 | -} |
|
23 | + return $this |
|
26 | 24 | \ No newline at end of file |
@@ -20,6 +20,4 @@ |
||
20 | 20 | }); |
21 | 21 | SCRIPT); |
22 | 22 | |
23 | - return $this; |
|
24 | - } |
|
25 | -} |
|
23 | + return $this |
|
26 | 24 | \ No newline at end of file |
@@ -20,6 +20,4 @@ |
||
20 | 20 | }); |
21 | 21 | SCRIPT); |
22 | 22 | |
23 | - return $this; |
|
24 | - } |
|
25 | -} |
|
23 | + return $this |
|
26 | 24 | \ No newline at end of file |
@@ -20,6 +20,4 @@ |
||
20 | 20 | }); |
21 | 21 | SCRIPT); |
22 | 22 | |
23 | - return $this; |
|
24 | - } |
|
25 | -} |
|
23 | + return $this |
|
26 | 24 | \ No newline at end of file |
@@ -20,6 +20,4 @@ |
||
20 | 20 | }); |
21 | 21 | SCRIPT); |
22 | 22 | |
23 | - return $this; |
|
24 | - } |
|
25 | -} |
|
23 | + return $this |
|
26 | 24 | \ No newline at end of file |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | /** |
467 | 467 | * Resolve perPage for pagination. |
468 | 468 | * |
469 | - * @param array|null $paginate |
|
469 | + * @param Model $paginate |
|
470 | 470 | * |
471 | 471 | * @return array |
472 | 472 | */ |
@@ -496,7 +496,7 @@ discard block |
||
496 | 496 | /** |
497 | 497 | * Find query by method name. |
498 | 498 | * |
499 | - * @param $method |
|
499 | + * @param string $method |
|
500 | 500 | * |
501 | 501 | * @return static |
502 | 502 | */ |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | * |
621 | 621 | * @throws \Exception |
622 | 622 | * |
623 | - * @return array |
|
623 | + * @return string[] |
|
624 | 624 | */ |
625 | 625 | protected function joinParameters(Relation $relation) |
626 | 626 | { |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | |
650 | 650 | /** |
651 | 651 | * @param string $method |
652 | - * @param array $arguments |
|
652 | + * @param integer[] $arguments |
|
653 | 653 | * |
654 | 654 | * @return $this |
655 | 655 | */ |
@@ -325,9 +325,9 @@ discard block |
||
325 | 325 | |
326 | 326 | $this->setSort(); |
327 | 327 | |
328 | - $this->queries->reject(function ($query) { |
|
328 | + $this->queries->reject(function($query) { |
|
329 | 329 | return $query['method'] == 'paginate'; |
330 | - })->each(function ($query) { |
|
330 | + })->each(function($query) { |
|
331 | 331 | $this->model = $this->model->{$query['method']}(...$query['arguments']); |
332 | 332 | }); |
333 | 333 | |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | $this->setSort(); |
379 | 379 | $this->setPaginate(); |
380 | 380 | |
381 | - $this->queries->unique()->each(function ($query) { |
|
381 | + $this->queries->unique()->each(function($query) { |
|
382 | 382 | $this->model = call_user_func_array([$this->model, $query['method']], $query['arguments']); |
383 | 383 | }); |
384 | 384 | |
@@ -408,9 +408,9 @@ discard block |
||
408 | 408 | |
409 | 409 | $queryBuilder = $this->originalModel; |
410 | 410 | |
411 | - $this->queries->reject(function ($query) { |
|
411 | + $this->queries->reject(function($query) { |
|
412 | 412 | return in_array($query['method'], ['get', 'paginate']); |
413 | - })->each(function ($query) use (&$queryBuilder) { |
|
413 | + })->each(function($query) use (&$queryBuilder) { |
|
414 | 414 | $queryBuilder = $queryBuilder->{$query['method']}(...$query['arguments']); |
415 | 415 | }); |
416 | 416 | |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | { |
445 | 445 | $paginate = $this->findQueryByMethod('paginate'); |
446 | 446 | |
447 | - $this->queries = $this->queries->reject(function ($query) { |
|
447 | + $this->queries = $this->queries->reject(function($query) { |
|
448 | 448 | return $query['method'] == 'paginate'; |
449 | 449 | }); |
450 | 450 | |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | */ |
503 | 503 | protected function findQueryByMethod($method) |
504 | 504 | { |
505 | - return $this->queries->first(function ($query) use ($method) { |
|
505 | + return $this->queries->first(function($query) use ($method) { |
|
506 | 506 | return $query['method'] == $method; |
507 | 507 | }); |
508 | 508 | } |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | } |
526 | 526 | |
527 | 527 | $columnNameContainsDots = Str::contains($columnName, '.'); |
528 | - $isRelation = $this->queries->contains(function ($query) use ($columnName) { |
|
528 | + $isRelation = $this->queries->contains(function($query) use ($columnName) { |
|
529 | 529 | $relationName = explode('.', $columnName)[0]; |
530 | 530 | |
531 | 531 | return $query['method'] === 'with' && in_array($relationName, $query['arguments'], true); |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | { |
574 | 574 | list($relationName, $relationColumn) = explode('.', $column); |
575 | 575 | |
576 | - if ($this->queries->contains(function ($query) use ($relationName) { |
|
576 | + if ($this->queries->contains(function($query) use ($relationName) { |
|
577 | 577 | return $query['method'] == 'with' && in_array($relationName, $query['arguments']); |
578 | 578 | })) { |
579 | 579 | $relation = $this->model->$relationName(); |
@@ -607,7 +607,7 @@ discard block |
||
607 | 607 | */ |
608 | 608 | public function resetOrderBy() |
609 | 609 | { |
610 | - $this->queries = $this->queries->reject(function ($query) { |
|
610 | + $this->queries = $this->queries->reject(function($query) { |
|
611 | 611 | return $query['method'] == 'orderBy' || $query['method'] == 'orderByDesc'; |
612 | 612 | }); |
613 | 613 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | 'scopes' => $filter->getScopes(), |
23 | 23 | 'label' => $label, |
24 | 24 | 'cancel' => $filter->urlWithoutScopes(), |
25 | - 'btn_class' => uniqid() . '-filter-btn', |
|
25 | + 'btn_class' => uniqid().'-filter-btn', |
|
26 | 26 | 'expand' => $filter->expand, |
27 | 27 | 'filter_id' => $filter->getFilterID(), |
28 | 28 | ]); |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | */ |
34 | 34 | protected function getGridColumns() |
35 | 35 | { |
36 | - return $this->grid->columns()->reject(function ($column) { |
|
36 | + return $this->grid->columns()->reject(function($column) { |
|
37 | 37 | return in_array($column->getName(), static::$ignored); |
38 | - })->map(function ($column) { |
|
38 | + })->map(function($column) { |
|
39 | 39 | return [$column->getName() => $column->getLabel()]; |
40 | 40 | })->collapse(); |
41 | 41 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public static function ignore($name) |
49 | 49 | { |
50 | - static::$ignored = array_merge(static::$ignored, (array)$name); |
|
50 | + static::$ignored = array_merge(static::$ignored, (array) $name); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |
@@ -70,7 +70,6 @@ discard block |
||
70 | 70 | /** |
71 | 71 | * Grid inline date picker. |
72 | 72 | * |
73 | - * @param string $format |
|
74 | 73 | * |
75 | 74 | * @return $this |
76 | 75 | */ |
@@ -82,7 +81,6 @@ discard block |
||
82 | 81 | /** |
83 | 82 | * Grid inline time picker. |
84 | 83 | * |
85 | - * @param string $format |
|
86 | 84 | * |
87 | 85 | * @return $this |
88 | 86 | */ |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | { |
233 | 233 | $identifiers = \DateTimeZone::listIdentifiers(\DateTimeZone::ALL); |
234 | 234 | |
235 | - $options = collect($identifiers)->mapWithKeys(function ($timezone) { |
|
235 | + $options = collect($identifiers)->mapWithKeys(function($timezone) { |
|
236 | 236 | return [$timezone => $timezone]; |
237 | 237 | })->toArray(); |
238 | 238 | |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | * |
295 | 295 | * @return $this |
296 | 296 | */ |
297 | - public function switch(array $states = []) |
|
297 | + public function switch (array $states = []) |
|
298 | 298 | { |
299 | 299 | return $this->displayUsing(Displayers\SwitchDisplay::class, [$states]); |
300 | 300 | } |
@@ -9,6 +9,7 @@ |
||
9 | 9 | { |
10 | 10 | /** |
11 | 11 | * @param int $multiple |
12 | + * @param string|null $selectable |
|
12 | 13 | * |
13 | 14 | * @return string |
14 | 15 | */ |