@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | if (is_string($as) && $this->isQueryable($column)) { |
| 128 | 128 | $this->selectSub($column, $as); |
| 129 | 129 | } |
| 130 | - if (! is_string($as) || ! $this->isQueryable($column)) { |
|
| 130 | + if (!is_string($as) || !$this->isQueryable($column)) { |
|
| 131 | 131 | $this->columns[$as] = $column; |
| 132 | 132 | } |
| 133 | 133 | } |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | */ |
| 190 | 190 | public function get($columns = ['*']) |
| 191 | 191 | { |
| 192 | - return collect($this->onceWithColumns(Arr::wrap($columns), function () { |
|
| 192 | + return collect($this->onceWithColumns(Arr::wrap($columns), function() { |
|
| 193 | 193 | return $this->runSelect(); |
| 194 | 194 | })); |
| 195 | 195 | } |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | |
| 387 | 387 | $this->joins[] = $join; |
| 388 | 388 | } |
| 389 | - if (! $first instanceof Closure) { |
|
| 389 | + if (!$first instanceof Closure) { |
|
| 390 | 390 | // If the column is simply a string, we can assume the join simply has a basic |
| 391 | 391 | // "on" clause with a single condition. So we will just build the join with |
| 392 | 392 | // this simple join clauses attached to it. There is not a join callback. |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | //fixme: Remove binding when implementing subqueries |
| 419 | 419 | $bindings = null; |
| 420 | 420 | |
| 421 | - $column = new Expression('(' . $query . ')'); |
|
| 421 | + $column = new Expression('('.$query.')'); |
|
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | $this->{$this->unions ? 'unionOrders' : 'orders'}[] = [ |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | protected function compileAggregate(Builder $builder, $aggregate) |
| 18 | 18 | { |
| 19 | - $method = 'compile' . ucfirst($aggregate['function']); |
|
| 19 | + $method = 'compile'.ucfirst($aggregate['function']); |
|
| 20 | 20 | |
| 21 | 21 | return $this->$method($builder, $aggregate); |
| 22 | 22 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | if (isset($results[1])) { |
| 59 | 59 | $results[1] = trim($results[1], '`'); |
| 60 | 60 | } |
| 61 | - if (! isset($results[1])) { |
|
| 61 | + if (!isset($results[1])) { |
|
| 62 | 62 | $results[1] = $results[0]; |
| 63 | 63 | } |
| 64 | 64 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | protected function generateTableAlias($table, $postfix = 'Doc') |
| 75 | 75 | { |
| 76 | - return Str::singular($table) . $postfix; |
|
| 76 | + return Str::singular($table).$postfix; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | protected function replaceTableForAlias($reference): string |
@@ -99,11 +99,11 @@ discard block |
||
| 99 | 99 | { |
| 100 | 100 | $alias = $this->getTableAlias($target); |
| 101 | 101 | |
| 102 | - if (Str::startsWith($value, $alias . '.')) { |
|
| 102 | + if (Str::startsWith($value, $alias.'.')) { |
|
| 103 | 103 | return $value; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - return $alias . '.' . $value; |
|
| 106 | + return $alias.'.'.$value; |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $references[0] = $tableAlias; |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - if ($tableAlias === null && ! $this->isTableAlias($references[0])) { |
|
| 165 | + if ($tableAlias === null && !$this->isTableAlias($references[0])) { |
|
| 166 | 166 | $tableAlias = $this->generateTableAlias($table); |
| 167 | 167 | array_unshift($references, $tableAlias); |
| 168 | 168 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | protected function compileWheresToArray($query) |
| 40 | 40 | { |
| 41 | - return collect($query->wheres)->map(function ($where) use ($query) { |
|
| 41 | + return collect($query->wheres)->map(function($where) use ($query) { |
|
| 42 | 42 | return $this->{"where{$where['type']}"}($query, $where); |
| 43 | 43 | })->all(); |
| 44 | 44 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | if (isset($where['operator'])) { |
| 81 | 81 | $where['operator'] = $this->translateOperator($where['operator']); |
| 82 | 82 | } |
| 83 | - if (! isset($where['operator'])) { |
|
| 83 | + if (!isset($where['operator'])) { |
|
| 84 | 84 | $where['operator'] = $this->getOperatorByWhereType($where['type']); |
| 85 | 85 | } |
| 86 | 86 | |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | |
| 298 | 298 | $predicate[0] = $this->normalizeColumn($query, $where['column']); |
| 299 | 299 | $predicate[1] = 'IN'; |
| 300 | - $predicate[2] = '[' . implode(', ', $where['values']) . ']'; |
|
| 300 | + $predicate[2] = '['.implode(', ', $where['values']).']'; |
|
| 301 | 301 | $predicate[3] = $where['boolean']; |
| 302 | 302 | |
| 303 | 303 | return $predicate; |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | |
| 338 | 338 | $predicate[0] = $this->normalizeColumn($query, $where['column']); |
| 339 | 339 | $predicate[1] = 'NOT IN'; |
| 340 | - $predicate[2] = '[' . implode(', ', $where['values']) . ']'; |
|
| 340 | + $predicate[2] = '['.implode(', ', $where['values']).']'; |
|
| 341 | 341 | $predicate[3] = $where['boolean']; |
| 342 | 342 | return $predicate; |
| 343 | 343 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | protected function compileJoins(Builder $builder, $joins) |
| 19 | 19 | { |
| 20 | 20 | foreach ($joins as $join) { |
| 21 | - $compileMethod = 'compile' . ucfirst($join->type) . 'Join'; |
|
| 21 | + $compileMethod = 'compile'.ucfirst($join->type).'Join'; |
|
| 22 | 22 | $builder = $this->$compileMethod($builder, $join); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | |
| 96 | 96 | protected function prefixTable($table) |
| 97 | 97 | { |
| 98 | - return $this->tablePrefix . $table; |
|
| 98 | + return $this->tablePrefix.$table; |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | // function for the component which is responsible for making the SQL. |
| 189 | 189 | |
| 190 | 190 | if (isset($builder->$component) && !is_null($builder->$component)) { |
| 191 | - $method = 'compile' . ucfirst($component); |
|
| 191 | + $method = 'compile'.ucfirst($component); |
|
| 192 | 192 | |
| 193 | 193 | $builder = $this->$method($builder, $builder->$component); |
| 194 | 194 | } |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | // Prepare columns |
| 318 | 318 | foreach ($columns as $column) { |
| 319 | 319 | // Extract rows |
| 320 | - if (substr($column, strlen($column) - 2) === '.*') { |
|
| 320 | + if (substr($column, strlen($column) - 2) === '.*') { |
|
| 321 | 321 | $table = substr($column, 0, strlen($column) - 2); |
| 322 | 322 | $returnDocs[] = $this->getTableAlias($table); |
| 323 | 323 | |
@@ -340,15 +340,15 @@ discard block |
||
| 340 | 340 | { |
| 341 | 341 | $values = []; |
| 342 | 342 | |
| 343 | - if (! empty($returnAttributes)) { |
|
| 343 | + if (!empty($returnAttributes)) { |
|
| 344 | 344 | $values = $returnAttributes; |
| 345 | 345 | } |
| 346 | 346 | |
| 347 | - if (! empty($returnAttributes) && ! empty($returnDocs)) { |
|
| 347 | + if (!empty($returnAttributes) && !empty($returnDocs)) { |
|
| 348 | 348 | $returnDocs[] = $returnAttributes; |
| 349 | 349 | } |
| 350 | 350 | |
| 351 | - if (! empty($returnDocs)) { |
|
| 351 | + if (!empty($returnDocs)) { |
|
| 352 | 352 | $values = $builder->aqb->merge(...$returnDocs); |
| 353 | 353 | } |
| 354 | 354 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | { |
| 31 | 31 | $this->beginTransaction(); |
| 32 | 32 | |
| 33 | - return tap($callback($this), function () use ($options, $attempts) { |
|
| 33 | + return tap($callback($this), function() use ($options, $attempts) { |
|
| 34 | 34 | $this->commit($options, $attempts); |
| 35 | 35 | }); |
| 36 | 36 | } |
@@ -81,10 +81,10 @@ discard block |
||
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | // $query = addslashes($query); |
| 84 | - $jsCommand = 'db._query(aql`' . $query . '`'; |
|
| 84 | + $jsCommand = 'db._query(aql`'.$query.'`'; |
|
| 85 | 85 | if (!empty($bindings)) { |
| 86 | 86 | $bindings = json_encode($bindings); |
| 87 | - $jsCommand .= ', ' . $bindings; |
|
| 87 | + $jsCommand .= ', '.$bindings; |
|
| 88 | 88 | } |
| 89 | 89 | $jsCommand .= ');'; |
| 90 | 90 | $command = new IlluminateFluent([ |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | if (isset($collections['read'])) { |
| 166 | 166 | $collections['read'] = array_merge($collections['read'], $extractedCollections); |
| 167 | 167 | } |
| 168 | - if (! isset($collections['read'])) { |
|
| 168 | + if (!isset($collections['read'])) { |
|
| 169 | 169 | $collections['read'] = $extractedCollections; |
| 170 | 170 | } |
| 171 | 171 | |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | if (isset($collections['write'])) { |
| 199 | 199 | $collections['write'] = array_merge($collections['write'], $extractedCollections); |
| 200 | 200 | } |
| 201 | - if (! isset($collections['write'])) { |
|
| 201 | + if (!isset($collections['write'])) { |
|
| 202 | 202 | $collections['write'] = $extractedCollections; |
| 203 | 203 | } |
| 204 | 204 | |
@@ -39,10 +39,10 @@ discard block |
||
| 39 | 39 | // Add database driver. |
| 40 | 40 | $this->app->resolving( |
| 41 | 41 | 'db', |
| 42 | - function ($db) { |
|
| 42 | + function($db) { |
|
| 43 | 43 | $db->extend( |
| 44 | 44 | 'arangodb', |
| 45 | - function ($config, $name) { |
|
| 45 | + function($config, $name) { |
|
| 46 | 46 | $config['name'] = $name; |
| 47 | 47 | $connection = new Connection($config); |
| 48 | 48 | $connection->setSchemaGrammar(new SchemaGrammar()); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | ); |
| 55 | 55 | |
| 56 | 56 | $this->app->resolving( |
| 57 | - function () { |
|
| 57 | + function() { |
|
| 58 | 58 | if (class_exists('Illuminate\Foundation\AliasLoader')) { |
| 59 | 59 | $loader = \Illuminate\Foundation\AliasLoader::getInstance(); |
| 60 | 60 | $loader->alias('Eloquent', 'LaravelFreelancerNL\Aranguent\Eloquent\Model'); |