Total Complexity | 4 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
7 | class SectionDefaults extends DefaultsAbstract |
||
8 | { |
||
9 | /** |
||
10 | * The values that should be sanitized. |
||
11 | * This is done after $casts and before $enums. |
||
12 | */ |
||
13 | public array $sanitize = [ |
||
14 | 'children' => 'array-consolidate', |
||
15 | 'fields' => 'array-string', |
||
16 | 'label' => 'text', |
||
17 | 'options' => 'array-consolidate', |
||
18 | ]; |
||
19 | |||
20 | protected function defaults(): array |
||
21 | { |
||
22 | return [ |
||
23 | 'children' => [], |
||
24 | 'fields' => [], |
||
25 | 'label' => '', |
||
26 | 'options' => [], |
||
27 | ]; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Finalize provided values, this always runs last. |
||
32 | */ |
||
33 | protected function finalize(array $values = []): array |
||
47 | } |
||
48 | } |
||
49 |