@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | protected function registerRepository() |
58 | 58 | { |
59 | - $this->app->singleton('migration.repository', function ($app) { |
|
59 | + $this->app->singleton('migration.repository', function($app) { |
|
60 | 60 | $collection = $app['config']['database.migrations']; |
61 | 61 | |
62 | 62 | return new DatabaseMigrationRepository($app['db'], $collection); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | protected function registerCreator() |
67 | 67 | { |
68 | - $this->app->singleton('migration.creator', function ($app) { |
|
68 | + $this->app->singleton('migration.creator', function($app) { |
|
69 | 69 | return new MigrationCreator($app['files']); |
70 | 70 | }); |
71 | 71 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | protected function registerMigrateMakeCommand() |
79 | 79 | { |
80 | - $this->app->singleton('command.migrate.make', function ($app) { |
|
80 | + $this->app->singleton('command.migrate.make', function($app) { |
|
81 | 81 | $creator = $app['migration.creator']; |
82 | 82 | |
83 | 83 | $composer = $app['composer']; |
@@ -88,14 +88,14 @@ discard block |
||
88 | 88 | |
89 | 89 | protected function registerAranguentConvertMigrationsCommand() |
90 | 90 | { |
91 | - $this->app->singleton('command.aranguent.convert-migrations', function ($app) { |
|
91 | + $this->app->singleton('command.aranguent.convert-migrations', function($app) { |
|
92 | 92 | return new AranguentConvertMigrationsCommand($app['migrator']); |
93 | 93 | }); |
94 | 94 | } |
95 | 95 | |
96 | 96 | protected function registerMakeModelCommand() |
97 | 97 | { |
98 | - $this->app->singleton('command.model.aranguent', function ($app) { |
|
98 | + $this->app->singleton('command.model.aranguent', function($app) { |
|
99 | 99 | return new ModelAranguentCommand($app['files']); |
100 | 100 | }); |
101 | 101 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | return true; |
45 | 45 | } |
46 | 46 | |
47 | - if (! is_array(reset($values))) { |
|
47 | + if (!is_array(reset($values))) { |
|
48 | 48 | $values = [$values]; |
49 | 49 | } |
50 | 50 | |
@@ -75,16 +75,16 @@ discard block |
||
75 | 75 | */ |
76 | 76 | protected function updateTimestamps(array $values) |
77 | 77 | { |
78 | - if (! $this->model->usesTimestamps() || |
|
78 | + if (!$this->model->usesTimestamps() || |
|
79 | 79 | is_null($this->model->getUpdatedAtColumn()) || |
80 | 80 | is_null($this->model->getCreatedAtColumn())) { |
81 | 81 | return $values; |
82 | 82 | } |
83 | - $timestamp = $this->model->freshTimestampString(); |
|
83 | + $timestamp = $this->model->freshTimestampString(); |
|
84 | 84 | $updatedAtColumn = $this->model->getUpdatedAtColumn(); |
85 | 85 | $createdAtColumn = $this->model->getCreatedAtColumn(); |
86 | 86 | $timestamps[$updatedAtColumn] = $timestamp; |
87 | - if (! isset($values[$createdAtColumn]) && $this->model->$createdAtColumn == '') { |
|
87 | + if (!isset($values[$createdAtColumn]) && $this->model->$createdAtColumn == '') { |
|
88 | 88 | $timestamps[$createdAtColumn] = $timestamp; |
89 | 89 | } |
90 | 90 | $values = array_merge( |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public function get($columns = ['*']) |
120 | 120 | { |
121 | - $results = collect($this->onceWithColumns(Arr::wrap($columns), function () { |
|
121 | + $results = collect($this->onceWithColumns(Arr::wrap($columns), function() { |
|
122 | 122 | return $this->runSelect(); |
123 | 123 | })); |
124 | 124 | return $results; |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | */ |
133 | 133 | public function update(array $values) |
134 | 134 | { |
135 | - $response = $this->connection->update($this->grammar->compileUpdate($this, $values)->aqb); |
|
135 | + $response = $this->connection->update($this->grammar->compileUpdate($this, $values)->aqb); |
|
136 | 136 | $this->aqb = new QueryBuilder(); |
137 | 137 | return $response; |
138 | 138 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $results = $this->cloneWithout($this->unions ? [] : ['columns']) |
173 | 173 | ->setAggregate($function, $columns) |
174 | 174 | ->get($columns); |
175 | - if (! $results->isEmpty()) { |
|
175 | + if (!$results->isEmpty()) { |
|
176 | 176 | return $results[0]; |
177 | 177 | } |
178 | 178 | return false; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | // see if that component exists. If it does we'll just call the compiler |
168 | 168 | // function for the component which is responsible for making the SQL. |
169 | 169 | |
170 | - if (isset($builder->$component) && ! is_null($builder->$component)) { |
|
170 | + if (isset($builder->$component) && !is_null($builder->$component)) { |
|
171 | 171 | $method = 'compile'.ucfirst($component); |
172 | 172 | |
173 | 173 | $builder = $this->$method($builder, $builder->$component); |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | */ |
227 | 227 | protected function compileWheresToArray($builder) |
228 | 228 | { |
229 | - $result = collect($builder->wheres)->map(function ($where) use ($builder) { |
|
229 | + $result = collect($builder->wheres)->map(function($where) use ($builder) { |
|
230 | 230 | // ArangoDB uses a double '=' for comparison |
231 | 231 | if ($where['operator'] == '=') { |
232 | 232 | $where['operator'] = '=='; |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | $where['operator'] = $this->translateOperator($where['operator']); |
235 | 235 | |
236 | 236 | //Prefix table alias on the column |
237 | - $where['column'] = $this->prefixAlias($builder, $builder->from, $where['column'] ); |
|
237 | + $where['column'] = $this->prefixAlias($builder, $builder->from, $where['column']); |
|
238 | 238 | |
239 | 239 | return [ |
240 | 240 | $where['column'], |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | */ |
343 | 343 | protected function compileOrders(Builder $builder, $orders) |
344 | 344 | { |
345 | - if (! empty($orders)) { |
|
345 | + if (!empty($orders)) { |
|
346 | 346 | $builder->aqb = $builder->aqb->sort($this->compileOrdersToArray($builder, $orders)); |
347 | 347 | return $builder; |
348 | 348 | } |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | */ |
360 | 360 | protected function compileOrdersToArray(Builder $builder, $orders) |
361 | 361 | { |
362 | - return array_map(function ($order) { |
|
362 | + return array_map(function($order) { |
|
363 | 363 | return $order['sql'] ?? $this->prefixTable($order['column']).' '.$order['direction']; |
364 | 364 | }, $orders); |
365 | 365 | } |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | protected function compileLimit(Builder $builder, $limit) |
390 | 390 | { |
391 | 391 | if ($this->offset !== null) { |
392 | - $builder->aqb = $builder->aqb->limit((int)$this->offset, (int)$limit); |
|
392 | + $builder->aqb = $builder->aqb->limit((int) $this->offset, (int) $limit); |
|
393 | 393 | return $builder; |
394 | 394 | } |
395 | 395 | $builder->aqb = $builder->aqb->limit((int) $limit); |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | $builder = $this->generateTableAlias($builder, $table); |
469 | 469 | $tableAlias = $builder->getAlias($table); |
470 | 470 | |
471 | - if (! is_null($_key)) { |
|
471 | + if (!is_null($_key)) { |
|
472 | 472 | $builder->aqb = $builder->aqb->remove((string) $_key, $table)->get(); |
473 | 473 | return $builder; |
474 | 474 | } |