@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | return $column; |
67 | 67 | } |
68 | 68 | |
69 | - return current($this->data_source->getRootAliases()) . '.' . $column; |
|
69 | + return current($this->data_source->getRootAliases()).'.'.$column; |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | |
218 | 218 | $c = $this->checkAliases($column); |
219 | 219 | |
220 | - if($filter->isExact()){ |
|
220 | + if ($filter->isExact()) { |
|
221 | 221 | $exprs[] = $this->data_source->expr()->eq($c, $this->data_source->expr()->eq($value)); |
222 | 222 | continue; |
223 | 223 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | |
54 | 54 | /** |
55 | 55 | * @return Doctrine\ORM\Query |
56 | - */ |
|
56 | + */ |
|
57 | 57 | public function getQuery() |
58 | 58 | { |
59 | 59 | return $this->data_source->getQuery(); |
@@ -222,11 +222,11 @@ discard block |
||
222 | 222 | continue; |
223 | 223 | } |
224 | 224 | |
225 | - if ($filter->hasSplitWordsSearch() === FALSE) { |
|
226 | - $words = [$value]; |
|
227 | - } else { |
|
228 | - $words = explode(' ', $value); |
|
229 | - } |
|
225 | + if ($filter->hasSplitWordsSearch() === FALSE) { |
|
226 | + $words = [$value]; |
|
227 | + } else { |
|
228 | + $words = explode(' ', $value); |
|
229 | + } |
|
230 | 230 | |
231 | 231 | foreach ($words as $word) { |
232 | 232 | $exprs[] = $this->data_source->expr()->like($c, $this->data_source->expr()->literal("%$word%")); |
@@ -122,7 +122,7 @@ |
||
122 | 122 | $or = []; |
123 | 123 | |
124 | 124 | foreach ($condition as $column => $value) { |
125 | - if($filter->isExact()){ |
|
125 | + if ($filter->isExact()) { |
|
126 | 126 | $this->data_source->where("$column = %s", $value); |
127 | 127 | continue; |
128 | 128 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | return $this->data_source->count( |
63 | - $this->data_source->getName() . '.' . (is_array($primary) ? reset($primary) : $primary) |
|
63 | + $this->data_source->getName().'.'.(is_array($primary) ? reset($primary) : $primary) |
|
64 | 64 | ); |
65 | 65 | } |
66 | 66 | |
@@ -171,8 +171,8 @@ discard block |
||
171 | 171 | $like = '('; |
172 | 172 | $args = []; |
173 | 173 | |
174 | - if($filter->isExact()){ |
|
175 | - $like .= "$column = ? "; |
|
174 | + if ($filter->isExact()) { |
|
175 | + $like .= "$column = ? "; |
|
176 | 176 | $args[] = "$value"; |
177 | 177 | } else { |
178 | 178 | $words = explode(' ', $value); |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $like .= "$column LIKE ? OR "; |
181 | 181 | $args[] = "%$word%"; |
182 | 182 | } |
183 | - $like = substr($like, 0, strlen($like) - 4) . ')'; |
|
183 | + $like = substr($like, 0, strlen($like) - 4).')'; |
|
184 | 184 | } |
185 | 185 | $or[] = $like; |
186 | 186 | $big_or .= "$like OR "; |
@@ -218,9 +218,9 @@ discard block |
||
218 | 218 | |
219 | 219 | foreach ($values as $value) { |
220 | 220 | if ($i == $length) { |
221 | - $or .= $filter->getColumn() . ' = ?)'; |
|
221 | + $or .= $filter->getColumn().' = ?)'; |
|
222 | 222 | } else { |
223 | - $or .= $filter->getColumn() . ' = ? OR '; |
|
223 | + $or .= $filter->getColumn().' = ? OR '; |
|
224 | 224 | } |
225 | 225 | |
226 | 226 | $i++; |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | |
231 | 231 | call_user_func_array([$this->data_source, 'where'], $values); |
232 | 232 | } else { |
233 | - $this->data_source->where($filter->getColumn() . ' = ?', reset($values)); |
|
233 | + $this->data_source->where($filter->getColumn().' = ?', reset($values)); |
|
234 | 234 | } |
235 | 235 | } |
236 | 236 |
@@ -175,11 +175,11 @@ |
||
175 | 175 | $like .= "$column = ? "; |
176 | 176 | $args[] = "$value"; |
177 | 177 | } else { |
178 | - if ($filter->hasSplitWordsSearch() === FALSE) { |
|
179 | - $words = [$value]; |
|
180 | - } else { |
|
181 | - $words = explode(' ', $value); |
|
182 | - } |
|
178 | + if ($filter->hasSplitWordsSearch() === FALSE) { |
|
179 | + $words = [$value]; |
|
180 | + } else { |
|
181 | + $words = explode(' ', $value); |
|
182 | + } |
|
183 | 183 | foreach ($words as $word) { |
184 | 184 | $like .= "$column LIKE ? OR "; |
185 | 185 | $args[] = "%$word%"; |
@@ -122,7 +122,7 @@ |
||
122 | 122 | $or = []; |
123 | 123 | |
124 | 124 | foreach ($condition as $column => $value) { |
125 | - if($filter->isExact()){ |
|
125 | + if ($filter->isExact()) { |
|
126 | 126 | $this->data_source->where("$column = %s", $value); |
127 | 127 | continue; |
128 | 128 | } |
@@ -164,11 +164,11 @@ |
||
164 | 164 | continue; |
165 | 165 | } |
166 | 166 | |
167 | - if ($filter->hasSplitWordsSearch() === FALSE) { |
|
168 | - $words = [$value]; |
|
169 | - } else { |
|
170 | - $words = explode(' ', $value); |
|
171 | - } |
|
167 | + if ($filter->hasSplitWordsSearch() === FALSE) { |
|
168 | + $words = [$value]; |
|
169 | + } else { |
|
170 | + $words = explode(' ', $value); |
|
171 | + } |
|
172 | 172 | |
173 | 173 | foreach ($words as $word) { |
174 | 174 | $escaped = $this->data_source->getConnection()->getDriver()->escapeLike($word, 0); |