@@ -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( |
@@ -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; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | $this->prefix = $prefix; |
110 | 110 | |
111 | - if (! is_null($callback)) { |
|
111 | + if (!is_null($callback)) { |
|
112 | 112 | $callback($this); |
113 | 113 | } |
114 | 114 | } |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | { |
125 | 125 | $this->connection = $connection; |
126 | 126 | |
127 | - if (! isset($grammar)) { |
|
127 | + if (!isset($grammar)) { |
|
128 | 128 | $this->grammar = $connection->getSchemaGrammar(); |
129 | 129 | } |
130 | 130 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | protected function creating() |
30 | 30 | { |
31 | - return collect($this->commands)->contains(function ($command) { |
|
31 | + return collect($this->commands)->contains(function($command) { |
|
32 | 32 | return $command->name === 'create'; |
33 | 33 | }); |
34 | 34 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | $collections = $this->collectionHandler->getAllCollections(['excludeSystem' => true]); |
52 | - if (! isset($collections[$this->table])) { |
|
52 | + if (!isset($collections[$this->table])) { |
|
53 | 53 | $this->collectionHandler->create($this->table, $options); |
54 | 54 | } |
55 | 55 | } |
@@ -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; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | public function get($columns = ['*']) |
145 | 145 | { |
146 | - $results = collect($this->onceWithColumns(Arr::wrap($columns), function () { |
|
146 | + $results = collect($this->onceWithColumns(Arr::wrap($columns), function() { |
|
147 | 147 | return $this->runSelect(); |
148 | 148 | })); |
149 | 149 | |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | |
204 | 204 | $this->aqb = new QueryBuilder(); |
205 | 205 | |
206 | - if (! $results->isEmpty()) { |
|
206 | + if (!$results->isEmpty()) { |
|
207 | 207 | return array_change_key_case((array) $results[0])['aggregate']; |
208 | 208 | } |
209 | 209 | |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | 'type', 'column', 'operator', 'value', 'boolean' |
277 | 277 | ); |
278 | 278 | |
279 | - if (! $value instanceof Expression) { |
|
279 | + if (!$value instanceof Expression) { |
|
280 | 280 | $this->addBinding($value, 'where'); |
281 | 281 | } |
282 | 282 | |
@@ -312,8 +312,8 @@ discard block |
||
312 | 312 | */ |
313 | 313 | protected function invalidOperator($operator) |
314 | 314 | { |
315 | - return ! in_array(strtolower($operator), $this->operators, true) && |
|
316 | - ! isset($this->grammar->getOperators()[strtoupper($operator)]); |
|
315 | + return !in_array(strtolower($operator), $this->operators, true) && |
|
316 | + !isset($this->grammar->getOperators()[strtoupper($operator)]); |
|
317 | 317 | } |
318 | 318 | |
319 | 319 | /** |