@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | |
53 | 53 | protected function processFilter($params) |
54 | 54 | { |
55 | - if(isset($params['filter'])) |
|
55 | + if (isset($params['filter'])) |
|
56 | 56 | { |
57 | 57 | $this->filter = new \Data\Filter($params['filter']); |
58 | 58 | } |
59 | - else if(isset($params['$filter'])) |
|
59 | + else if (isset($params['$filter'])) |
|
60 | 60 | { |
61 | 61 | $this->filter = new \Data\Filter($params['$filter']); |
62 | 62 | } |
@@ -64,42 +64,42 @@ discard block |
||
64 | 64 | |
65 | 65 | protected function processExpand($params) |
66 | 66 | { |
67 | - if(isset($params['$expand'])) |
|
67 | + if (isset($params['$expand'])) |
|
68 | 68 | { |
69 | - $this->expand = explode(',',$params['$expand']); |
|
69 | + $this->expand = explode(',', $params['$expand']); |
|
70 | 70 | } |
71 | 71 | } |
72 | 72 | |
73 | 73 | protected function processSelect($params) |
74 | 74 | { |
75 | - if(isset($params['select'])) |
|
75 | + if (isset($params['select'])) |
|
76 | 76 | { |
77 | - $this->select = explode(',',$params['select']); |
|
77 | + $this->select = explode(',', $params['select']); |
|
78 | 78 | } |
79 | - else if(isset($params['$select'])) |
|
79 | + else if (isset($params['$select'])) |
|
80 | 80 | { |
81 | - $this->select = explode(',',$params['$select']); |
|
81 | + $this->select = explode(',', $params['$select']); |
|
82 | 82 | } |
83 | 83 | } |
84 | 84 | |
85 | 85 | protected function processOrderBy($params) |
86 | 86 | { |
87 | - if(isset($params['$orderby'])) |
|
87 | + if (isset($params['$orderby'])) |
|
88 | 88 | { |
89 | 89 | $this->orderby = array(); |
90 | - $orderby = explode(',',$params['$orderby']); |
|
90 | + $orderby = explode(',', $params['$orderby']); |
|
91 | 91 | $count = count($orderby); |
92 | - for($i = 0; $i < $count; $i++) |
|
92 | + for ($i = 0; $i < $count; $i++) |
|
93 | 93 | { |
94 | - $exp = explode(' ',$orderby[$i]); |
|
95 | - if(count($exp) === 1) |
|
94 | + $exp = explode(' ', $orderby[$i]); |
|
95 | + if (count($exp) === 1) |
|
96 | 96 | { |
97 | 97 | //Default to assending |
98 | 98 | $this->orderby[$exp[0]] = 1; |
99 | 99 | } |
100 | 100 | else |
101 | 101 | { |
102 | - switch($exp[1]) |
|
102 | + switch ($exp[1]) |
|
103 | 103 | { |
104 | 104 | case 'asc': |
105 | 105 | $this->orderby[$exp[0]] = 1; |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | protected function processTop($params) |
119 | 119 | { |
120 | - if(isset($params['$top']) && is_numeric($params['$top'])) |
|
120 | + if (isset($params['$top']) && is_numeric($params['$top'])) |
|
121 | 121 | { |
122 | 122 | $this->top = intval($params['$top']); |
123 | 123 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | protected function processSkip($params) |
127 | 127 | { |
128 | - if(isset($params['$skip']) && is_numeric($params['$skip'])) |
|
128 | + if (isset($params['$skip']) && is_numeric($params['$skip'])) |
|
129 | 129 | { |
130 | 130 | $this->skip = intval($params['$skip']); |
131 | 131 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | protected function processCount($params) |
135 | 135 | { |
136 | - if(isset($params['$count']) && strcasecmp($params['$count'], 'true') === 0) |
|
136 | + if (isset($params['$count']) && strcasecmp($params['$count'], 'true') === 0) |
|
137 | 137 | { |
138 | 138 | $this->count = true; |
139 | 139 | } |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | |
142 | 142 | protected function processSearch($params) |
143 | 143 | { |
144 | - if(isset($params['$search'])) |
|
144 | + if (isset($params['$search'])) |
|
145 | 145 | { |
146 | 146 | throw new Exception('Search not yet implemented'); |
147 | 147 | } |