| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public function resolve(string $sort): array |
||
| 10 | { |
||
| 11 | return match ($sort) { |
||
| 12 | PropertySort::PUBLISHED_AT_ASC => ['publishedAt', 1], |
||
| 13 | PropertySort::PRICE_ASC => ['price', 1], |
||
| 14 | PropertySort::PRICE_DESC => ['price', -1], |
||
| 15 | PropertySort::AREA_ASC => ['area', 1], |
||
| 16 | PropertySort::AREA_DESC => ['area', -1], |
||
| 17 | default => ['publishedAt', -1], |
||
| 18 | }; |
||
| 21 |