| Total Complexity | 2 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class ControlDefaults extends DefaultsAbstract |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The values that should be constrained after sanitization is run. |
||
| 11 | * This is done after $casts and $sanitize. |
||
| 12 | */ |
||
| 13 | public array $enums = [ |
||
| 14 | 'group' => [ |
||
| 15 | 'design', 'general', |
||
| 16 | ], |
||
| 17 | ]; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * The keys that should be mapped to other keys. |
||
| 21 | * Keys are mapped before the values are normalized and sanitized. |
||
| 22 | * Note: Mapped keys should not be included in the defaults! |
||
| 23 | */ |
||
| 24 | public array $mapped = [ |
||
| 25 | 'label' => 'heading', |
||
| 26 | 'name' => 'param_name', |
||
| 27 | ]; |
||
| 28 | |||
| 29 | protected function defaults(): array |
||
| 35 | ]; |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Finalize provided values, this always runs last. |
||
| 40 | */ |
||
| 41 | protected function finalize(array $values = []): array |
||
| 53 |