Total Complexity | 6 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
7 | class OrderBy extends Clause |
||
8 | { |
||
9 | private DeckOrderBy $deck; |
||
10 | |||
11 | public function __construct($selected, string $direction) |
||
14 | } |
||
15 | |||
16 | public function add(...$args): self |
||
17 | { |
||
18 | list($selected, $direction) = $args; |
||
19 | $this->deck->add($selected, $direction); |
||
20 | return $this; |
||
21 | } |
||
22 | |||
23 | public function asc($selected): self |
||
24 | { |
||
25 | return $this->add([$selected, 'ASC']); |
||
26 | } |
||
27 | |||
28 | public function desc($selected): self |
||
29 | { |
||
30 | return $this->add([$selected, 'DESC']); |
||
31 | } |
||
32 | |||
33 | public function __toString(): string |
||
36 | } |
||
37 | |||
38 | |||
39 | public function name(): string |
||
42 | } |
||
43 | } |
||
44 |