Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function __construct() |
||
26 | { |
||
27 | $config = [ |
||
28 | 'description' => 'Describe what page we want', |
||
29 | 'fields' => fn (): array => [ |
||
30 | 'offset' => [ |
||
31 | 'type' => self::int(), |
||
32 | 'defaultValue' => null, |
||
33 | 'description' => 'The zero-based index of first item of the page. If given a value greater than zero, then `pageIndex` is ignored.', |
||
34 | ], |
||
35 | 'pageIndex' => [ |
||
36 | 'type' => self::int(), |
||
37 | 'defaultValue' => 0, |
||
38 | 'description' => 'The zero-based index of the page. If given negative value, then fallback to 0.', |
||
39 | ], |
||
40 | 'pageSize' => [ |
||
41 | 'type' => self::int(), |
||
42 | 'defaultValue' => 50, |
||
43 | 'description' => 'Number of items to display on a page. If given negative value, then fallback to 0.', |
||
44 | ], |
||
45 | ], |
||
46 | ]; |
||
47 | |||
48 | parent::__construct($config); |
||
49 | } |
||
51 |