| Total Complexity | 4 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class Ordening extends AbstractQuery |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | private $query; |
||
| 15 | |||
| 16 | public function __construct(string $key, RethinkInterface $rethink) |
||
| 21 | } |
||
| 22 | |||
| 23 | public function asc(string $key): Ordening |
||
| 24 | { |
||
| 25 | $this->query = [ |
||
| 26 | TermType::ASC, |
||
| 27 | [ |
||
| 28 | $key, |
||
| 29 | ], |
||
| 30 | ]; |
||
| 31 | |||
| 32 | return $this; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function desc(string $key): Ordening |
||
| 36 | { |
||
| 37 | $this->query = [ |
||
| 38 | TermType::DESC, |
||
| 39 | [ |
||
| 40 | $key, |
||
| 41 | ], |
||
| 42 | ]; |
||
| 43 | |||
| 44 | return $this; |
||
| 45 | } |
||
| 46 | |||
| 47 | public function toArray(): array |
||
| 50 | } |
||
| 51 | } |
||
| 52 |