Passed
Push — master ( 5b6060...56feb5 )
by Bas
03:56 queued 11s
created
src/Schema/Concerns/Columns.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     {
17 17
         $parameters = [];
18 18
         $parameters['handler'] = 'aql';
19
-        $parameters['explanation'] = "Checking if any document within the table has the '" . implode(', ', (array) $column) . "' column(s).";
19
+        $parameters['explanation'] = "Checking if any document within the table has the '".implode(', ', (array) $column)."' column(s).";
20 20
         $parameters['column'] = $column;
21 21
 
22 22
         return $this->addCommand('hasAttribute', $parameters);
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $parameters = [];
54 54
         $parameters['handler'] = 'aql';
55 55
         $parameters['attributes'] = $columns;
56
-        $parameters['explanation'] = 'Drop the following column(s): ' . implode(',', $columns) . '.';
56
+        $parameters['explanation'] = 'Drop the following column(s): '.implode(',', $columns).'.';
57 57
 
58 58
         return $this->addCommand('dropAttribute', compact('parameters'));
59 59
     }
Please login to merge, or discard this patch.
src/Schema/Blueprint.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function compileAqlCommand($command)
147 147
     {
148
-        $compileMethod = 'compile' . ucfirst($command->name);
148
+        $compileMethod = 'compile'.ucfirst($command->name);
149 149
         if (method_exists($this->grammar, $compileMethod)) {
150 150
             return $this->grammar->$compileMethod($this->table, $command);
151 151
         }
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function executeCommand($command)
160 160
     {
161
-        $executeNamedMethod = 'execute' . ucfirst($command->name) . 'Command';
162
-        $executeHandlerMethod = 'execute' . ucfirst($command->handler) . 'Command';
161
+        $executeNamedMethod = 'execute'.ucfirst($command->name).'Command';
162
+        $executeHandlerMethod = 'execute'.ucfirst($command->handler).'Command';
163 163
         if (method_exists($this, $executeNamedMethod)) {
164 164
             $this->$executeNamedMethod($command);
165 165
         } elseif (method_exists($this, $executeHandlerMethod)) {
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     public function executeCollectionCommand($command)
181 181
     {
182 182
         if ($this->connection->pretending()) {
183
-            $this->connection->logQuery('/* ' . $command->explanation . " */\n", []);
183
+            $this->connection->logQuery('/* '.$command->explanation." */\n", []);
184 184
 
185 185
             return;
186 186
         }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
     public function executeIgnoreCommand($command)
200 200
     {
201 201
         if ($this->connection->pretending()) {
202
-            $this->connection->logQuery('/* ' . $command->explanation . " */\n", []);
202
+            $this->connection->logQuery('/* '.$command->explanation." */\n", []);
203 203
 
204 204
             return;
205 205
         }
Please login to merge, or discard this patch.
src/Console/ModelAranguentCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
     protected function getStub()
25 25
     {
26 26
         if ($this->option('pivot')) {
27
-            return __DIR__ . '/stubs/pivot.model.stub';
27
+            return __DIR__.'/stubs/pivot.model.stub';
28 28
         }
29 29
 
30
-        return __DIR__ . '/stubs/model.stub';
30
+        return __DIR__.'/stubs/model.stub';
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/Query/Builder.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $this->connection = $connection;
58 58
         $this->grammar = $grammar ?: $connection->getQueryGrammar();
59 59
         $this->processor = $processor ?: $connection->getPostProcessor();
60
-        if (! $aqb instanceof QueryBuilder) {
60
+        if (!$aqb instanceof QueryBuilder) {
61 61
             $aqb = new QueryBuilder();
62 62
         }
63 63
         $this->aqb = $aqb;
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      */
169 169
     public function get($columns = ['*'])
170 170
     {
171
-        $results = collect($this->onceWithColumns(Arr::wrap($columns), function () {
171
+        $results = collect($this->onceWithColumns(Arr::wrap($columns), function() {
172 172
             return $this->runSelect();
173 173
         }));
174 174
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
      */
210 210
     public function registerAlias(string $table, string $alias): void
211 211
     {
212
-        if (! isset($this->aliasRegistry[$table])) {
212
+        if (!isset($this->aliasRegistry[$table])) {
213 213
             $this->aliasRegistry[$table] = $alias;
214 214
         }
215 215
     }
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 
242 242
         $this->aqb = new QueryBuilder();
243 243
 
244
-        if (! $results->isEmpty()) {
244
+        if (!$results->isEmpty()) {
245 245
             return array_change_key_case((array) $results[0])['aggregate'];
246 246
         }
247 247
 
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
             'boolean'
323 323
         );
324 324
 
325
-        if (! $value instanceof Expression) {
325
+        if (!$value instanceof Expression) {
326 326
             $this->addBinding($value, 'where');
327 327
         }
328 328
 
@@ -358,8 +358,8 @@  discard block
 block discarded – undo
358 358
      */
359 359
     protected function invalidOperator($operator)
360 360
     {
361
-        return ! in_array(strtolower($operator), $this->operators, true) &&
362
-            ! isset($this->grammar->getOperators()[strtoupper($operator)]);
361
+        return !in_array(strtolower($operator), $this->operators, true) &&
362
+            !isset($this->grammar->getOperators()[strtoupper($operator)]);
363 363
     }
364 364
 
365 365
     /**
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
         if ($this->isQueryable($column)) {
390 390
             [$query, $bindings] = $this->createSub($column);
391 391
 
392
-            $column = new Expression('(' . $query . ')');
392
+            $column = new Expression('('.$query.')');
393 393
         }
394 394
 
395 395
         $this->{$this->unions ? 'unionOrders' : 'orders'}[] = [
Please login to merge, or discard this patch.
src/Concerns/ManagesTransactions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $this->beginTransaction();
31 31
 
32
-        return tap($callback($this), function () use ($options, $attempts) {
32
+        return tap($callback($this), function() use ($options, $attempts) {
33 33
             $this->commit($options, $attempts);
34 34
         });
35 35
     }
@@ -79,10 +79,10 @@  discard block
 block discarded – undo
79 79
         }
80 80
 
81 81
 //        $query = addslashes($query);
82
-        $jsCommand = 'db._query(aql`' . $query . '`';
83
-        if (! empty($bindings)) {
82
+        $jsCommand = 'db._query(aql`'.$query.'`';
83
+        if (!empty($bindings)) {
84 84
             $bindings = json_encode($bindings);
85
-            $jsCommand .= ', ' . $bindings;
85
+            $jsCommand .= ', '.$bindings;
86 86
         }
87 87
         $jsCommand .= ');';
88 88
         $command = new IlluminateFluent([
@@ -209,10 +209,10 @@  discard block
 block discarded – undo
209 209
      */
210 210
     public function commit($options = [], $attempts = 1)
211 211
     {
212
-        if (! $this->transactions > 0) {
212
+        if (!$this->transactions > 0) {
213 213
             throw new \Exception('Transaction committed before starting one.');
214 214
         }
215
-        if (! isset($this->transactionCommands[$this->transactions]) || empty($this->transactionCommands[$this->transactions])) {
215
+        if (!isset($this->transactionCommands[$this->transactions]) || empty($this->transactionCommands[$this->transactions])) {
216 216
             throw new \Exception('Cannot commit an empty transaction.');
217 217
         }
218 218
 
Please login to merge, or discard this patch.
src/AranguentServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
54 54
         );
55 55
 
56 56
         $this->app->resolving(
57
-            function ($app) {
57
+            function($app) {
58 58
                 if (class_exists('Illuminate\Foundation\AliasLoader')) {
59 59
                     $loader = \Illuminate\Foundation\AliasLoader::getInstance();
60 60
                     $loader->alias('Eloquent', 'LaravelFreelancerNL\Aranguent\Eloquent\Model');
Please login to merge, or discard this patch.
src/Eloquent/Builder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     protected function updateTimestamps(array $values)
64 64
     {
65
-        if (! $this->model->usesTimestamps() ||
65
+        if (!$this->model->usesTimestamps() ||
66 66
             is_null($this->model->getUpdatedAtColumn()) ||
67 67
             is_null($this->model->getCreatedAtColumn())) {
68 68
             return $values;
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $timestamps[$updatedAtColumn] = $timestamp;
73 73
 
74 74
         $createdAtColumn = $this->model->getCreatedAtColumn();
75
-        if (! isset($values[$createdAtColumn]) && ! isset($this->model->$createdAtColumn)) {
75
+        if (!isset($values[$createdAtColumn]) && !isset($this->model->$createdAtColumn)) {
76 76
             $timestamps[$createdAtColumn] = $timestamp;
77 77
         }
78 78
 
Please login to merge, or discard this patch.
src/Query/Grammar.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
      */
94 94
     protected function generateTableAlias($builder, $table, $postfix = 'Doc')
95 95
     {
96
-        $builder->registerAlias($table, Str::singular($table) . $postfix);
96
+        $builder->registerAlias($table, Str::singular($table).$postfix);
97 97
 
98 98
         return $builder;
99 99
     }
100 100
 
101 101
     protected function prefixTable($table)
102 102
     {
103
-        return $this->tablePrefix . $table;
103
+        return $this->tablePrefix.$table;
104 104
     }
105 105
 
106 106
     /**
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
             // see if that component exists. If it does we'll just call the compiler
187 187
             // function for the component which is responsible for making the SQL.
188 188
 
189
-            if (isset($builder->$component) && ! is_null($builder->$component)) {
190
-                $method = 'compile' . ucfirst($component);
189
+            if (isset($builder->$component) && !is_null($builder->$component)) {
190
+                $method = 'compile'.ucfirst($component);
191 191
 
192 192
                 $builder = $this->$method($builder, $builder->$component);
193 193
             }
@@ -223,12 +223,12 @@  discard block
 block discarded – undo
223 223
      */
224 224
     protected function compileJoins(Builder $query, $joins)
225 225
     {
226
-        return collect($joins)->map(function ($join) use ($query) {
226
+        return collect($joins)->map(function($join) use ($query) {
227 227
             $table = $this->wrapTable($join->table);
228 228
 
229
-            $nestedJoins = is_null($join->joins) ? '' : ' ' . $this->compileJoins($query, $join->joins);
229
+            $nestedJoins = is_null($join->joins) ? '' : ' '.$this->compileJoins($query, $join->joins);
230 230
 
231
-            $tableAndNestedJoins = is_null($join->joins) ? $table : '(' . $nestedJoins . ')';
231
+            $tableAndNestedJoins = is_null($join->joins) ? $table : '('.$nestedJoins.')';
232 232
 
233 233
             return trim("{$join->type} join {$tableAndNestedJoins} {$this->compileWheres($join)}");
234 234
         })->implode(' ');
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      */
268 268
     protected function compileWheresToArray($builder)
269 269
     {
270
-        $result = collect($builder->wheres)->map(function ($where) use ($builder) {
270
+        $result = collect($builder->wheres)->map(function($where) use ($builder) {
271 271
             if (isset($where['operator'])) {
272 272
                 $where['operator'] = $this->translateOperator($where['operator']);
273 273
             } else {
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
      */
305 305
     protected function compileAggregate(Builder $builder, $aggregate)
306 306
     {
307
-        $method = 'compile' . ucfirst($aggregate['function']);
307
+        $method = 'compile'.ucfirst($aggregate['function']);
308 308
 
309 309
         return $this->$method($builder, $aggregate);
310 310
     }
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
      */
396 396
     protected function compileOrders(Builder $builder, $orders)
397 397
     {
398
-        if (! empty($orders)) {
398
+        if (!empty($orders)) {
399 399
             $builder->aqb = $builder->aqb->sort($this->compileOrdersToArray($builder, $orders));
400 400
 
401 401
             return $builder;
@@ -413,8 +413,8 @@  discard block
 block discarded – undo
413 413
      */
414 414
     protected function compileOrdersToArray(Builder $builder, $orders)
415 415
     {
416
-        return array_map(function ($order) use ($builder) {
417
-            if (! isset($order['type']) || $order['type'] != 'Raw') {
416
+        return array_map(function($order) use ($builder) {
417
+            if (!isset($order['type']) || $order['type'] != 'Raw') {
418 418
                 $order['column'] = $this->prefixAlias($builder, $builder->from, $order['column']);
419 419
             }
420 420
             unset($order['type']);
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
         $doc = $builder->getAlias($builder->from);
472 472
         foreach ($columns as $column) {
473 473
             if ($column != null && $column != '*') {
474
-                $values[$column] = $doc . '.' . $column;
474
+                $values[$column] = $doc.'.'.$column;
475 475
             }
476 476
         }
477 477
         if ($builder->aggregate !== null) {
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
         $builder = $this->generateTableAlias($builder, $table);
522 522
         $tableAlias = $builder->getAlias($table);
523 523
 
524
-        if (! is_null($_key)) {
524
+        if (!is_null($_key)) {
525 525
             $builder->aqb = $builder->aqb->remove((string) $_key, $table)->get();
526 526
 
527 527
             return $builder;
@@ -582,10 +582,10 @@  discard block
 block discarded – undo
582 582
     {
583 583
         $alias = $builder->getAlias($target);
584 584
 
585
-        if (Str::startsWith($value, $alias . '.')) {
585
+        if (Str::startsWith($value, $alias.'.')) {
586 586
             return $value;
587 587
         }
588 588
 
589
-        return $alias . '.' . $value;
589
+        return $alias.'.'.$value;
590 590
     }
591 591
 }
Please login to merge, or discard this patch.
src/Schema/Grammar.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
         $filter = [];
34 34
         foreach ($command->attribute as $attribute) {
35
-            $filter[] = ['doc.' . $attribute, '!=', 'null'];
35
+            $filter[] = ['doc.'.$attribute, '!=', 'null'];
36 36
         }
37 37
 
38 38
         $aqb = (new QueryBuilder())->for('doc', $collection)
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
         $bindings['to'] = $this->wrapBindVar($command->from);
62 62
 
63 63
         $filter = [
64
-            ['doc.' . $command->from, '!=', 'null'],
65
-            ['doc.' . $command->to],
64
+            ['doc.'.$command->from, '!=', 'null'],
65
+            ['doc.'.$command->to],
66 66
         ];
67 67
 
68 68
         $aqb = (new QueryBuilder())->for('doc', $collection)
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 'doc',
72 72
                 [
73 73
                     $command->from => 'null',
74
-                    $command->to => 'doc.' . $command->from,
74
+                    $command->to => 'doc.'.$command->from,
75 75
                 ],
76 76
                 $collection
77 77
             )
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
         $data = [];
101 101
         foreach ($command->attributes as $attribute) {
102
-            $filter[] = ['doc.' . $attribute, '!=', 'null', 'OR'];
102
+            $filter[] = ['doc.'.$attribute, '!=', 'null', 'OR'];
103 103
             $data[$attribute] = 'null';
104 104
         }
105 105
         $aqb = (new QueryBuilder())->for('doc', $collection)
Please login to merge, or discard this patch.