Conditions | 3 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | public function jsonSerialize(): mixed |
||
10 | { |
||
11 | $rules = $this->validationRules(); |
||
|
|||
12 | |||
13 | $content = $this->content(); |
||
14 | $content['validators'] = $rules ? $rules[array_key_first($rules)] : []; |
||
15 | |||
16 | if ($this instanceof MultiInput) { |
||
17 | $content['options'] = $this->options(); |
||
18 | } |
||
19 | |||
20 | return collect([ |
||
21 | 'component' => $this->component(), |
||
22 | 'content' => $content, |
||
23 | ]); |
||
25 | } |