| Total Complexity | 2 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class PaginationDefaults extends DefaultsAbstract |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The values that should be cast before sanitization is run. |
||
| 9 | * This is done before $sanitize and $enums. |
||
| 10 | */ |
||
| 11 | public array $casts = [ |
||
| 12 | 'add_args' => 'array', |
||
| 13 | 'base' => 'string', |
||
| 14 | 'before_page_number' => 'string', |
||
| 15 | 'format' => 'string', |
||
| 16 | 'next_text' => 'string', |
||
| 17 | 'prev_text' => 'string', |
||
| 18 | 'type' => 'string', |
||
| 19 | ]; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * The values that should be sanitized. |
||
| 23 | * This is done after $casts and before $enums. |
||
| 24 | */ |
||
| 25 | public array $sanitize = [ |
||
| 26 | 'current' => 'min:1', |
||
| 27 | 'end_size' => 'min:1', |
||
| 28 | 'mid_size' => 'min:1', |
||
| 29 | 'total' => 'min:0', |
||
| 30 | ]; |
||
| 31 | |||
| 32 | 1 | protected function defaults(): array |
|
| 46 | 1 | ]; |
|
| 47 | } |
||
| 48 | |||
| 49 | 1 | protected function sanitize(array $values = []): array |
|
| 58 |