@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | public function buildCount(Request $request, $count, $params = []) |
| 113 | 113 | { |
| 114 | 114 | if ($count) { |
| 115 | - $request->on(Request::EVENT_AFTER_SEND, function (\yii\httpclient\RequestEvent $event) { |
|
| 115 | + $request->on(Request::EVENT_AFTER_SEND, function(\yii\httpclient\RequestEvent $event) { |
|
| 116 | 116 | $data = $event->response->getData(); |
| 117 | 117 | $event->response->setData(count($data)); |
| 118 | 118 | }); |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | |
| 239 | 239 | return $this->$method($operator, $condition); |
| 240 | 240 | } else { |
| 241 | - throw new InvalidParamException('Found unknown operator in query: ' . $operator); |
|
| 241 | + throw new InvalidParamException('Found unknown operator in query: '.$operator); |
|
| 242 | 242 | } |
| 243 | 243 | } else { |
| 244 | 244 | return $this->buildHashCondition($condition); |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | foreach ($condition as $attribute => $value) { |
| 252 | 252 | if (is_array($value)) { // IN condition |
| 253 | 253 | // $parts[] = [$attribute.'s' => join(',',$value)]; |
| 254 | - $parts[$attribute . 's'] = implode(',', $value); |
|
| 254 | + $parts[$attribute.'s'] = implode(',', $value); |
|
| 255 | 255 | } else { |
| 256 | 256 | $parts[$attribute] = $value; |
| 257 | 257 | } |
@@ -262,12 +262,12 @@ discard block |
||
| 262 | 262 | |
| 263 | 263 | protected function buildLikeCondition($operator, $operands) |
| 264 | 264 | { |
| 265 | - return [$operands[0] . '_like' => $operands[1]]; |
|
| 265 | + return [$operands[0].'_like' => $operands[1]]; |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | protected function buildIlikeCondition($operator, $operands) |
| 269 | 269 | { |
| 270 | - return [$operands[0] . '_ilike' => $operands[1]]; |
|
| 270 | + return [$operands[0].'_ilike' => $operands[1]]; |
|
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | protected function buildCompareCondition($operator, $operands) |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | throw new InvalidParamException("Operator '$operator' requires three operands."); |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | - return [$operands[0] . '_' . $operator => $operands[1]]; |
|
| 279 | + return [$operands[0].'_'.$operator => $operands[1]]; |
|
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | protected function buildAndCondition($operator, $operands) |
@@ -323,9 +323,9 @@ discard block |
||
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | if ($not) { |
| 326 | - $key = $column . '_ni'; // not in |
|
| 326 | + $key = $column.'_ni'; // not in |
|
| 327 | 327 | } else { |
| 328 | - $key = $column . '_in'; |
|
| 328 | + $key = $column.'_in'; |
|
| 329 | 329 | } |
| 330 | 330 | return [$key => $values]; |
| 331 | 331 | } |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | { |
| 347 | 347 | $key = array_shift($operands); |
| 348 | 348 | |
| 349 | - return [$key . '_' . $operator => reset($operands)]; |
|
| 349 | + return [$key.'_'.$operator => reset($operands)]; |
|
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | protected function buildCompositeInCondition($operator, $columns, $values) |