@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $filter[] = ['doc.'.$attribute, '!=', 'null']; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - $aqb = AQB::for('doc', $collection) |
|
| 38 | + $aqb = AQB::for ('doc', $collection) |
|
| 39 | 39 | ->filter($filter) |
| 40 | 40 | ->limit(1) |
| 41 | 41 | ->return('true') |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | ['doc.'.$command->to], |
| 66 | 66 | ]; |
| 67 | 67 | |
| 68 | - $aqb = AQB::for('doc', $collection) |
|
| 68 | + $aqb = AQB::for ('doc', $collection) |
|
| 69 | 69 | ->filter($filter) |
| 70 | 70 | ->update( |
| 71 | 71 | 'doc', |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $filter[] = ['doc.'.$attribute, '!=', 'null', 'OR']; |
| 102 | 102 | $data[$attribute] = 'null'; |
| 103 | 103 | } |
| 104 | - $aqb = AQB::for('doc', $collection) |
|
| 104 | + $aqb = AQB::for ('doc', $collection) |
|
| 105 | 105 | ->filter($filter) |
| 106 | 106 | ->update('doc', $data, $collection) |
| 107 | 107 | ->options(['keepNull' => false]) |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | return true; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - if (! is_array(reset($values))) { |
|
| 45 | + if (!is_array(reset($values))) { |
|
| 46 | 46 | $values = [$values]; |
| 47 | 47 | } |
| 48 | 48 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | protected function updateTimestamps(array $values) |
| 75 | 75 | { |
| 76 | - if (! $this->model->usesTimestamps() || |
|
| 76 | + if (!$this->model->usesTimestamps() || |
|
| 77 | 77 | is_null($this->model->getUpdatedAtColumn()) || |
| 78 | 78 | is_null($this->model->getCreatedAtColumn())) { |
| 79 | 79 | return $values; |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $updatedAtColumn = $this->model->getUpdatedAtColumn(); |
| 83 | 83 | $createdAtColumn = $this->model->getCreatedAtColumn(); |
| 84 | 84 | $timestamps[$updatedAtColumn] = $timestamp; |
| 85 | - if (! isset($values[$createdAtColumn]) && $this->model->$createdAtColumn == '') { |
|
| 85 | + if (!isset($values[$createdAtColumn]) && $this->model->$createdAtColumn == '') { |
|
| 86 | 86 | $timestamps[$createdAtColumn] = $timestamp; |
| 87 | 87 | } |
| 88 | 88 | $values = array_merge( |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $this->connection = $connection; |
| 57 | 57 | $this->grammar = $grammar ?: $connection->getQueryGrammar(); |
| 58 | 58 | $this->processor = $processor ?: $connection->getPostProcessor(); |
| 59 | - if (! $aqb instanceof QueryBuilder) { |
|
| 59 | + if (!$aqb instanceof QueryBuilder) { |
|
| 60 | 60 | $aqb = new QueryBuilder(); |
| 61 | 61 | } |
| 62 | 62 | $this->aqb = $aqb; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | public function get($columns = ['*']) |
| 125 | 125 | { |
| 126 | - $results = collect($this->onceWithColumns(Arr::wrap($columns), function () { |
|
| 126 | + $results = collect($this->onceWithColumns(Arr::wrap($columns), function() { |
|
| 127 | 127 | return $this->runSelect(); |
| 128 | 128 | })); |
| 129 | 129 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | $results = $this->cloneWithout($this->unions ? [] : ['columns']) |
| 181 | 181 | ->setAggregate($function, $columns) |
| 182 | 182 | ->get($columns); |
| 183 | - if (! $results->isEmpty()) { |
|
| 183 | + if (!$results->isEmpty()) { |
|
| 184 | 184 | return $results[0]; |
| 185 | 185 | } |
| 186 | 186 | |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | 'type', 'column', 'operator', 'value', 'boolean' |
| 254 | 254 | ); |
| 255 | 255 | |
| 256 | - if (! $value instanceof Expression) { |
|
| 256 | + if (!$value instanceof Expression) { |
|
| 257 | 257 | $this->addBinding($value, 'where'); |
| 258 | 258 | } |
| 259 | 259 | |
@@ -268,8 +268,8 @@ discard block |
||
| 268 | 268 | */ |
| 269 | 269 | protected function invalidOperator($operator) |
| 270 | 270 | { |
| 271 | - return ! in_array(strtolower($operator), $this->operators, true) && |
|
| 272 | - ! isset($this->grammar->getOperators()[strtolower($operator)]); |
|
| 271 | + return !in_array(strtolower($operator), $this->operators, true) && |
|
| 272 | + !isset($this->grammar->getOperators()[strtolower($operator)]); |
|
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | /** |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function compileInsert(Builder $builder, array $values) |
| 110 | 110 | { |
| 111 | - if (! is_array(reset($values))) { |
|
| 111 | + if (!is_array(reset($values))) { |
|
| 112 | 112 | $values = [$values]; |
| 113 | 113 | } |
| 114 | 114 | |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | // see if that component exists. If it does we'll just call the compiler |
| 183 | 183 | // function for the component which is responsible for making the SQL. |
| 184 | 184 | |
| 185 | - if (isset($builder->$component) && ! is_null($builder->$component)) { |
|
| 185 | + if (isset($builder->$component) && !is_null($builder->$component)) { |
|
| 186 | 186 | $method = 'compile'.ucfirst($component); |
| 187 | 187 | |
| 188 | 188 | $builder = $this->$method($builder, $builder->$component); |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | */ |
| 243 | 243 | protected function compileWheresToArray($builder) |
| 244 | 244 | { |
| 245 | - $result = collect($builder->wheres)->map(function ($where) use ($builder) { |
|
| 245 | + $result = collect($builder->wheres)->map(function($where) use ($builder) { |
|
| 246 | 246 | // ArangoDB uses a double '=' for comparison |
| 247 | 247 | if ($where['operator'] == '=') { |
| 248 | 248 | $where['operator'] = '=='; |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | */ |
| 364 | 364 | protected function compileOrders(Builder $builder, $orders) |
| 365 | 365 | { |
| 366 | - if (! empty($orders)) { |
|
| 366 | + if (!empty($orders)) { |
|
| 367 | 367 | $builder->aqb = $builder->aqb->sort($this->compileOrdersToArray($builder, $orders)); |
| 368 | 368 | |
| 369 | 369 | return $builder; |
@@ -381,8 +381,8 @@ discard block |
||
| 381 | 381 | */ |
| 382 | 382 | protected function compileOrdersToArray(Builder $builder, $orders) |
| 383 | 383 | { |
| 384 | - return array_map(function ($order) use ($builder) { |
|
| 385 | - if (! isset($order['type']) || $order['type'] != 'Raw') { |
|
| 384 | + return array_map(function($order) use ($builder) { |
|
| 385 | + if (!isset($order['type']) || $order['type'] != 'Raw') { |
|
| 386 | 386 | $order['column'] = $this->prefixAlias($builder, $builder->from, $order['column']); |
| 387 | 387 | } |
| 388 | 388 | unset($order['type']); |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | $builder = $this->generateTableAlias($builder, $table); |
| 497 | 497 | $tableAlias = $builder->getAlias($table); |
| 498 | 498 | |
| 499 | - if (! is_null($_key)) { |
|
| 499 | + if (!is_null($_key)) { |
|
| 500 | 500 | $builder->aqb = $builder->aqb->remove((string) $_key, $table)->get(); |
| 501 | 501 | |
| 502 | 502 | return $builder; |