@@ -102,9 +102,9 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | protected function applyCascadeConditions() |
| 104 | 104 | { |
| 105 | - if( $this->form ) { |
|
| 105 | + if ($this->form) { |
|
| 106 | 106 | $this->form->fields() |
| 107 | - ->filter(function (Form\Field $field) { |
|
| 107 | + ->filter(function(Form\Field $field) { |
|
| 108 | 108 | return $field instanceof CascadeGroup |
| 109 | 109 | && $field->dependsOn($this) |
| 110 | 110 | && $this->hitsCondition($field); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | return; |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - $cascadeGroups = collect($this->conditions)->map(function ($condition) { |
|
| 165 | + $cascadeGroups = collect($this->conditions)->map(function($condition) { |
|
| 166 | 166 | return [ |
| 167 | 167 | 'class' => $this->getCascadeClass($condition['value']), |
| 168 | 168 | 'operator' => $condition['operator'], |
@@ -315,7 +315,7 @@ |
||
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | /** |
| 318 | - * @param $component |
|
| 318 | + * @param string $component |
|
| 319 | 319 | */ |
| 320 | 320 | public static function component($component, $data = []) |
| 321 | 321 | { |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | |
| 326 | 326 | libxml_use_internal_errors(true); |
| 327 | 327 | |
| 328 | - $dom->loadHTML('<?xml encoding="utf-8" ?>' . $str); |
|
| 328 | + $dom->loadHTML('<?xml encoding="utf-8" ?>'.$str); |
|
| 329 | 329 | |
| 330 | 330 | libxml_use_internal_errors(false); |
| 331 | 331 | |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | } |
| 335 | 335 | |
| 336 | 336 | if ($script = $dom->getElementsByTagName('script')[0]) { |
| 337 | - static::script(';(function () {' . $script->nodeValue . '})();'); |
|
| 337 | + static::script(';(function () {'.$script->nodeValue.'})();'); |
|
| 338 | 338 | } |
| 339 | 339 | |
| 340 | 340 | if ($element = $dom->getElementsByTagName('template')[0]) { |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | * |
| 283 | 283 | * @param string $column |
| 284 | 284 | * |
| 285 | - * @return mixed|string |
|
| 285 | + * @return string |
|
| 286 | 286 | */ |
| 287 | 287 | protected function formatColumn($column = '') |
| 288 | 288 | { |
@@ -591,7 +591,7 @@ discard block |
||
| 591 | 591 | } |
| 592 | 592 | |
| 593 | 593 | /** |
| 594 | - * @param string|array|Closure $input |
|
| 594 | + * @param callable|null $input |
|
| 595 | 595 | * @param string|array $original |
| 596 | 596 | * |
| 597 | 597 | * @return array|Closure |
@@ -802,7 +802,7 @@ discard block |
||
| 802 | 802 | /** |
| 803 | 803 | * Set or get value of the field. |
| 804 | 804 | * |
| 805 | - * @param null $value |
|
| 805 | + * @param string $value |
|
| 806 | 806 | * |
| 807 | 807 | * @return mixed |
| 808 | 808 | */ |
@@ -973,7 +973,7 @@ discard block |
||
| 973 | 973 | /** |
| 974 | 974 | * Add html attributes to elements. |
| 975 | 975 | * |
| 976 | - * @param array|string $attribute |
|
| 976 | + * @param string $attribute |
|
| 977 | 977 | * @param mixed $value |
| 978 | 978 | * |
| 979 | 979 | * @return $this |
@@ -1103,7 +1103,7 @@ discard block |
||
| 1103 | 1103 | /** |
| 1104 | 1104 | * Get placeholder. |
| 1105 | 1105 | * |
| 1106 | - * @return mixed |
|
| 1106 | + * @return string |
|
| 1107 | 1107 | */ |
| 1108 | 1108 | public function getPlaceholder() |
| 1109 | 1109 | { |
@@ -1360,7 +1360,7 @@ discard block |
||
| 1360 | 1360 | } |
| 1361 | 1361 | |
| 1362 | 1362 | /** |
| 1363 | - * @param array $labelClass |
|
| 1363 | + * @param string[] $labelClass |
|
| 1364 | 1364 | * |
| 1365 | 1365 | * @return self |
| 1366 | 1366 | */ |
@@ -1414,7 +1414,7 @@ discard block |
||
| 1414 | 1414 | * |
| 1415 | 1415 | * @param string $view |
| 1416 | 1416 | * |
| 1417 | - * @return string |
|
| 1417 | + * @return Field |
|
| 1418 | 1418 | */ |
| 1419 | 1419 | public function setView($view): self |
| 1420 | 1420 | { |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | - * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View|string |
|
| 67 | + * @return string|null |
|
| 68 | 68 | */ |
| 69 | 69 | protected function renderFilePicker() |
| 70 | 70 | { |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Encore\Admin\Admin; |
| 6 | 6 | use Encore\Admin\Form\Field; |
| 7 | -use Illuminate\Support\Arr; |
|
| 8 | 7 | |
| 9 | 8 | /** |
| 10 | 9 | * @mixin Field |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | protected $append; |
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | - * @param mixed $string |
|
| 18 | + * @param string $string |
|
| 19 | 19 | * |
| 20 | 20 | * @return $this |
| 21 | 21 | */ |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | - * @param mixed $string |
|
| 32 | + * @param string $string |
|
| 33 | 33 | * @return $this |
| 34 | 34 | */ |
| 35 | 35 | public function append($string) |
@@ -59,7 +59,6 @@ |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | - * @param string $wrap |
|
| 63 | 62 | */ |
| 64 | 63 | protected function addPickBtn($btn) |
| 65 | 64 | { |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | $this->value = json_encode($this->value, JSON_PRETTY_PRINT); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - $this->mountPicker(function ($btn) { |
|
| 51 | + $this->mountPicker(function($btn) { |
|
| 52 | 52 | $this->addPickBtn($btn); |
| 53 | 53 | }); |
| 54 | 54 | |
@@ -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->column->getName() . '-' . $this->getKey(), |
|
| 30 | + 'name' => $this->column->getName().'-'.$this->getKey(), |
|
| 31 | 31 | 'html' => $html, |
| 32 | 32 | 'value' => $this->value, |
| 33 | 33 | 'async' => $async, |