| Total Complexity | 8 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | final class FindBatchRequest implements Arrayable |
||
| 21 | { |
||
| 22 | private $data = []; |
||
| 23 | |||
| 24 | public static function create(): self |
||
| 25 | { |
||
| 26 | return new self(); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function ofMailCategory(MailCategory $category) |
||
| 34 | } |
||
| 35 | |||
| 36 | public function ofMailType(MailType $type) |
||
| 37 | { |
||
| 38 | $this->data['mailType'] = $type; |
||
| 39 | |||
| 40 | return $this; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function sortAsc() |
||
| 44 | { |
||
| 45 | $this->data['sort'] = 'asc'; |
||
| 46 | |||
| 47 | return $this; |
||
| 48 | } |
||
| 49 | |||
| 50 | public function sortDesc() |
||
| 51 | { |
||
| 52 | $this->data['sort'] = 'desc'; |
||
| 53 | |||
| 54 | return $this; |
||
| 55 | } |
||
| 56 | |||
| 57 | public function page(int $page) |
||
| 58 | { |
||
| 59 | $this->data['page'] = $page; |
||
| 60 | |||
| 61 | return $this; |
||
| 62 | } |
||
| 63 | |||
| 64 | public function perPage(int $number) |
||
| 65 | { |
||
| 66 | $this->data['size'] = $number; |
||
| 67 | |||
| 68 | return $this; |
||
| 69 | } |
||
| 70 | |||
| 71 | public function toArray(): array |
||
| 74 | } |
||
| 75 | } |
||
| 76 |