Total Complexity | 8 |
Total Lines | 95 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
12 | class ReadOffersBuilder extends BaseBuilder |
||
13 | { |
||
14 | /** |
||
15 | * @return ReadOffersQuery |
||
16 | */ |
||
17 | 8 | public function createRoute() |
|
18 | { |
||
19 | 8 | $route = new ReadOffersQuery(); |
|
20 | 8 | $route->setActiveFilters($this->toArray()); |
|
21 | |||
22 | 8 | return $route; |
|
23 | } |
||
24 | |||
25 | /** |
||
26 | * @param $id |
||
27 | * |
||
28 | * @return $this |
||
29 | */ |
||
30 | 8 | public function categoryId($id) |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * @return $this |
||
39 | */ |
||
40 | 3 | public function isActive() |
|
41 | { |
||
42 | 3 | $this->params['active'] = 1; |
|
43 | |||
44 | 3 | return $this; |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * @param $limit |
||
49 | * |
||
50 | * @return $this |
||
51 | */ |
||
52 | 8 | public function limit($limit) |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * @param $offset |
||
61 | * |
||
62 | * @return $this |
||
63 | */ |
||
64 | 8 | public function offset($offset) |
|
69 | } |
||
70 | |||
71 | /** |
||
72 | * @param $field |
||
73 | * |
||
74 | * @return $this |
||
75 | */ |
||
76 | 2 | public function orderByField($field) |
|
77 | { |
||
78 | 2 | $this->params['orderByField'] = $field; |
|
79 | |||
80 | 2 | return $this; |
|
81 | } |
||
82 | |||
83 | /** |
||
84 | * @param $id |
||
85 | * |
||
86 | * @return $this |
||
87 | */ |
||
88 | 1 | public function merchantManagerId($id) |
|
93 | } |
||
94 | |||
95 | /** |
||
96 | * Like поиск по полям, поля не указываются |
||
97 | * |
||
98 | * @param string $term |
||
99 | * |
||
100 | * @return $this |
||
101 | */ |
||
102 | 1 | public function mainFilterItem($term) |
|
107 | } |
||
108 | } |
||
109 |