Total Complexity | 4 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class SortField |
||
8 | { |
||
9 | const DIRECTION_ASCENDING = 'asc'; |
||
10 | const DIRECTION_DESCENDING = 'desc'; |
||
11 | |||
12 | private string $field; |
||
13 | private string $direction; |
||
14 | private array $params; |
||
15 | |||
16 | public function __construct(string $field, string $direction, array $params = []) |
||
17 | { |
||
18 | 6 | $this->field = $field; |
|
19 | $this->direction = $direction; |
||
20 | 6 | $this->params = $params; |
|
21 | 6 | } |
|
22 | 6 | ||
23 | public function getField(): string |
||
24 | 3 | { |
|
25 | return $this->field; |
||
26 | 3 | } |
|
27 | |||
28 | public function getDirection(): string |
||
29 | 3 | { |
|
30 | return $this->direction; |
||
31 | 3 | } |
|
32 | |||
33 | public function getParams(): array |
||
36 | } |
||
37 | } |
||
38 |