| Conditions | 3 | 
| Paths | 2 | 
| Total Lines | 11 | 
| Code Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); | ||
| 45 | private function parseSingle(Sorting $sorting): string | ||
| 46 |     { | ||
| 47 |         if (!array_key_exists($sorting->field(), $this->sortableFields)) { | ||
| 48 | throw new InvalidArgumentException( | ||
| 49 | $sorting->field() . ' is not a sortable field.' | ||
| 50 | ); | ||
| 51 | } | ||
| 52 | return sprintf( | ||
| 53 | '%s %s', | ||
| 54 | $this->sortableFields[$sorting->field()], | ||
| 55 | $sorting->ascends() ? 'ASC' : 'DESC' | ||
| 56 | ); | ||
| 59 |