Conditions | 2 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
25 | 3 | public static function fromRawData(array $query): self |
|
26 | { |
||
27 | 3 | $startDate = self::getDateQueryParam($query, 'startDate'); |
|
28 | 3 | $endDate = self::getDateQueryParam($query, 'endDate'); |
|
29 | |||
30 | 3 | return new self( |
|
31 | 3 | new DateRange($startDate, $endDate), |
|
32 | 3 | (int) ($query['page'] ?? 1), |
|
33 | 3 | isset($query['itemsPerPage']) ? (int) $query['itemsPerPage'] : null |
|
34 | ); |
||
62 |