@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | * |
282 | 282 | * @param string $column |
283 | 283 | * |
284 | - * @return mixed|string |
|
284 | + * @return string |
|
285 | 285 | */ |
286 | 286 | protected function formatColumn($column = '') |
287 | 287 | { |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | } |
575 | 575 | |
576 | 576 | /** |
577 | - * @param string|array|Closure $input |
|
577 | + * @param callable|null $input |
|
578 | 578 | * @param string|array $original |
579 | 579 | * |
580 | 580 | * @return array|Closure |
@@ -785,7 +785,7 @@ discard block |
||
785 | 785 | /** |
786 | 786 | * Set or get value of the field. |
787 | 787 | * |
788 | - * @param null $value |
|
788 | + * @param string $value |
|
789 | 789 | * |
790 | 790 | * @return mixed |
791 | 791 | */ |
@@ -956,7 +956,7 @@ discard block |
||
956 | 956 | /** |
957 | 957 | * Add html attributes to elements. |
958 | 958 | * |
959 | - * @param array|string $attribute |
|
959 | + * @param string $attribute |
|
960 | 960 | * @param mixed $value |
961 | 961 | * |
962 | 962 | * @return $this |
@@ -1334,7 +1334,7 @@ discard block |
||
1334 | 1334 | } |
1335 | 1335 | |
1336 | 1336 | /** |
1337 | - * @param array $labelClass |
|
1337 | + * @param string[] $labelClass |
|
1338 | 1338 | * |
1339 | 1339 | * @return self |
1340 | 1340 | */ |
@@ -1389,7 +1389,7 @@ discard block |
||
1389 | 1389 | * |
1390 | 1390 | * @param string $view |
1391 | 1391 | * |
1392 | - * @return string |
|
1392 | + * @return Field |
|
1393 | 1393 | */ |
1394 | 1394 | public function setView($view): self |
1395 | 1395 | { |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | /** |
145 | 145 | * Get form title. |
146 | 146 | * |
147 | - * @return mixed |
|
147 | + * @return string |
|
148 | 148 | */ |
149 | 149 | public function title() |
150 | 150 | { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | /** |
155 | 155 | * Get form description. |
156 | 156 | * |
157 | - * @return mixed |
|
157 | + * @return string |
|
158 | 158 | */ |
159 | 159 | public function description() |
160 | 160 | { |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | } |
171 | 171 | |
172 | 172 | /** |
173 | - * @return array |
|
173 | + * @return Form |
|
174 | 174 | */ |
175 | 175 | public function confirm($message) |
176 | 176 | { |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | /** |
230 | 230 | * Add form attributes. |
231 | 231 | * |
232 | - * @param string|array $attr |
|
232 | + * @param string $attr |
|
233 | 233 | * @param string $value |
234 | 234 | * |
235 | 235 | * @return $this |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | /** |
392 | 392 | * Get all fields of form. |
393 | 393 | * |
394 | - * @return Field[] |
|
394 | + * @return \Illuminate\Support\Collection |
|
395 | 395 | */ |
396 | 396 | public function fields() |
397 | 397 | { |
@@ -158,11 +158,11 @@ |
||
158 | 158 | } |
159 | 159 | |
160 | 160 | $cascadeGroups = collect($this->conditions)->map(function ($condition) { |
161 | - return [ |
|
162 | - 'class' => $this->getCascadeClass($condition['value']), |
|
163 | - 'operator' => $condition['operator'], |
|
164 | - 'value' => $condition['value'] |
|
165 | - ]; |
|
161 | + return [ |
|
162 | + 'class' => $this->getCascadeClass($condition['value']), |
|
163 | + 'operator' => $condition['operator'], |
|
164 | + 'value' => $condition['value'] |
|
165 | + ]; |
|
166 | 166 | })->toJson(); |
167 | 167 | |
168 | 168 | $script = <<<SCRIPT |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | protected function applyCascadeConditions() |
103 | 103 | { |
104 | 104 | $this->form->fields() |
105 | - ->filter(function (Form\Field $field) { |
|
105 | + ->filter(function(Form\Field $field) { |
|
106 | 106 | return $field instanceof CascadeGroup |
107 | 107 | && $field->dependsOn($this) |
108 | 108 | && $this->hitsCondition($field); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | return; |
158 | 158 | } |
159 | 159 | |
160 | - $cascadeGroups = collect($this->conditions)->map(function ($condition) { |
|
160 | + $cascadeGroups = collect($this->conditions)->map(function($condition) { |
|
161 | 161 | return [ |
162 | 162 | 'class' => $this->getCascadeClass($condition['value']), |
163 | 163 | 'operator' => $condition['operator'], |