@@ -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; |
@@ -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 | } |