Total Complexity | 4 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class Order extends Payload |
||
10 | { |
||
11 | const ASC = 'asc'; |
||
12 | const DESC = 'desc'; |
||
13 | |||
14 | protected function insert($item, $value) |
||
24 | } |
||
25 | |||
26 | public function add(string $fieldName, string $direction = self::ASC): self |
||
27 | { |
||
28 | $new = clone $this; |
||
29 | $new->insert($fieldName, $direction); |
||
30 | return $new; |
||
31 | } |
||
32 | |||
33 | public static function by(string $fieldName, string $direction = self::ASC): self |
||
36 | } |
||
37 | } |
||
38 |