| Total Complexity | 4 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class OrderBy |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | * |
||
| 23 | * @GraphQL\Field(type="string!") |
||
| 24 | */ |
||
| 25 | protected $field; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | * |
||
| 30 | * @GraphQL\Field(type="string") |
||
| 31 | */ |
||
| 32 | protected $direction = 'ASC'; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | 1 | public function getField(): string |
|
| 38 | { |
||
| 39 | 1 | return $this->field; |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param string $field |
||
| 44 | * |
||
| 45 | * @return OrderBy |
||
| 46 | */ |
||
| 47 | 1 | public function setField(string $field): OrderBy |
|
| 48 | { |
||
| 49 | 1 | $this->field = $field; |
|
| 50 | |||
| 51 | 1 | return $this; |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | 1 | public function getDirection(): string |
|
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param string $direction |
||
| 64 | * |
||
| 65 | * @return OrderBy |
||
| 66 | */ |
||
| 67 | 1 | public function setDirection(string $direction): OrderBy |
|
| 74 |