Passed
Push — master ( 8d031b...eddbb7 )
by Bas
22:43 queued 12s
created
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, '==', null],
64
+            ['doc.'.$command->from, '!=', null],
65
+            ['doc.'.$command->to, '==', null],
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.
src/Query/Builder.php 1 patch
Spacing   +9 added lines, -9 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
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      */
212 212
     public function generateTableAlias($table, $postfix = 'Doc')
213 213
     {
214
-        $alias = Str::singular($table) . $postfix;
214
+        $alias = Str::singular($table).$postfix;
215 215
         $this->registerAlias($table, $alias);
216 216
 
217 217
         return $alias;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public function registerAlias(string $table, string $alias): void
225 225
     {
226
-        if (! isset($this->aliasRegistry[$table])) {
226
+        if (!isset($this->aliasRegistry[$table])) {
227 227
             $this->aliasRegistry[$table] = $alias;
228 228
         }
229 229
     }
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 
272 272
         $this->aqb = new QueryBuilder();
273 273
 
274
-        if (! $results->isEmpty()) {
274
+        if (!$results->isEmpty()) {
275 275
             return array_change_key_case((array) $results[0])['aggregate'];
276 276
         }
277 277
 
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
             'boolean'
352 352
         );
353 353
 
354
-        if (! $value instanceof Expression) {
354
+        if (!$value instanceof Expression) {
355 355
             $this->addBinding($value, 'where');
356 356
         }
357 357
 
@@ -387,8 +387,8 @@  discard block
 block discarded – undo
387 387
      */
388 388
     protected function invalidOperator($operator)
389 389
     {
390
-        return ! in_array(strtolower($operator), $this->operators, true) &&
391
-            ! isset($this->grammar->getOperators()[strtoupper($operator)]);
390
+        return !in_array(strtolower($operator), $this->operators, true) &&
391
+            !isset($this->grammar->getOperators()[strtoupper($operator)]);
392 392
     }
393 393
 
394 394
     /**
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
         if ($this->isQueryable($column)) {
467 467
             [$query, $bindings] = $this->createSub($column);
468 468
 
469
-            $column = new Expression('(' . $query . ')');
469
+            $column = new Expression('('.$query.')');
470 470
         }
471 471
 
472 472
         $this->{$this->unions ? 'unionOrders' : 'orders'}[] = [
Please login to merge, or discard this patch.
src/Query/Grammar.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -94,14 +94,14 @@  discard block
 block discarded – undo
94 94
      */
95 95
     protected function generateTableAlias($builder, $table, $postfix = 'Doc')
96 96
     {
97
-        $builder->registerAlias($table, Str::singular($table) . $postfix);
97
+        $builder->registerAlias($table, Str::singular($table).$postfix);
98 98
 
99 99
         return $builder;
100 100
     }
101 101
 
102 102
     protected function prefixTable($table)
103 103
     {
104
-        return $this->tablePrefix . $table;
104
+        return $this->tablePrefix.$table;
105 105
     }
106 106
 
107 107
     /**
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
             // see if that component exists. If it does we'll just call the compiler
188 188
             // function for the component which is responsible for making the SQL.
189 189
 
190
-            if (isset($builder->$component) && ! is_null($builder->$component)) {
191
-                $method = 'compile' . ucfirst($component);
190
+            if (isset($builder->$component) && !is_null($builder->$component)) {
191
+                $method = 'compile'.ucfirst($component);
192 192
 
193 193
                 $builder = $this->$method($builder, $builder->$component);
194 194
             }
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     protected function compileJoins(Builder $builder, $joins)
226 226
     {
227 227
         foreach ($joins as $join) {
228
-            $compileMethod = 'compile' . ucfirst($join->type) . 'Join';
228
+            $compileMethod = 'compile'.ucfirst($join->type).'Join';
229 229
             $builder = $this->$compileMethod($builder, $join);
230 230
         }
231 231
 
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
      */
323 323
     protected function compileWheresToArray($builder)
324 324
     {
325
-        $result = collect($builder->wheres)->map(function ($where) use ($builder) {
325
+        $result = collect($builder->wheres)->map(function($where) use ($builder) {
326 326
 
327 327
             if (isset($where['operator'])) {
328 328
                 $where['operator'] = $this->translateOperator($where['operator']);
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
                 } else {
337 337
                     $where['column'] = $this->prefixAlias($builder, $builder->from, $where['column']);
338 338
                 }
339
-                $cleanWhere[0] = $where['column'] ;
339
+                $cleanWhere[0] = $where['column'];
340 340
             }
341 341
 
342 342
             if (isset($where['first'])) {
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
      */
372 372
     protected function compileAggregate(Builder $builder, $aggregate)
373 373
     {
374
-        $method = 'compile' . ucfirst($aggregate['function']);
374
+        $method = 'compile'.ucfirst($aggregate['function']);
375 375
 
376 376
         return $this->$method($builder, $aggregate);
377 377
     }
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
      */
463 463
     protected function compileOrders(Builder $builder, $orders)
464 464
     {
465
-        if (! empty($orders)) {
465
+        if (!empty($orders)) {
466 466
             $orders = $this->compileOrdersToFlatArray($builder, $orders);
467 467
             $builder->aqb = $builder->aqb->sort(...$orders);
468 468
 
@@ -484,14 +484,14 @@  discard block
 block discarded – undo
484 484
         $flatOrders = [];
485 485
 
486 486
         foreach ($orders as $order) {
487
-            if (! isset($order['type']) || $order['type'] != 'Raw') {
487
+            if (!isset($order['type']) || $order['type'] != 'Raw') {
488 488
                 $order['column'] = $this->prefixAlias($builder, $builder->from, $order['column']);
489 489
             }
490 490
 
491
-            $flatOrders[] =  $order['column'] ;
491
+            $flatOrders[] = $order['column'];
492 492
 
493 493
             if (isset($order['direction'])) {
494
-                $flatOrders[] =  $order['direction'] ;
494
+                $flatOrders[] = $order['direction'];
495 495
             }
496 496
         }
497 497
 
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
         $doc = $builder->getAlias($builder->from);
547 547
         foreach ($columns as $column) {
548 548
             if ($column != null && $column != '*') {
549
-                $values[$column] = $doc . '.' . $column;
549
+                $values[$column] = $doc.'.'.$column;
550 550
             }
551 551
         }
552 552
         if ($builder->aggregate !== null) {
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
 
556 556
         if (empty($values)) {
557 557
             $values = $doc;
558
-            if (is_array($builder->joins) && ! empty($builder->joins)) {
558
+            if (is_array($builder->joins) && !empty($builder->joins)) {
559 559
                 $values = $this->mergeJoinResults($builder, $values);
560 560
             }
561 561
         }
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
         $builder = $this->generateTableAlias($builder, $table);
613 613
         $tableAlias = $builder->getAlias($table);
614 614
 
615
-        if (! is_null($_key)) {
615
+        if (!is_null($_key)) {
616 616
             $builder->aqb = $builder->aqb->remove((string) $_key, $table)->get();
617 617
 
618 618
             return $builder;
@@ -673,10 +673,10 @@  discard block
 block discarded – undo
673 673
     {
674 674
         $alias = $builder->getAlias($target);
675 675
 
676
-        if (Str::startsWith($value, $alias . '.')) {
676
+        if (Str::startsWith($value, $alias.'.')) {
677 677
             return $value;
678 678
         }
679 679
 
680
-        return $alias . '.' . $value;
680
+        return $alias.'.'.$value;
681 681
     }
682 682
 }
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
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     protected function updateTimestamps(array $values)
64 64
     {
65 65
         if (
66
-            ! $this->model->usesTimestamps() ||
66
+            !$this->model->usesTimestamps() ||
67 67
             is_null($this->model->getUpdatedAtColumn()) ||
68 68
             is_null($this->model->getCreatedAtColumn())
69 69
         ) {
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $timestamps[$updatedAtColumn] = $timestamp;
75 75
 
76 76
         $createdAtColumn = $this->model->getCreatedAtColumn();
77
-        if (! isset($values[$createdAtColumn]) && ! isset($this->model->$createdAtColumn)) {
77
+        if (!isset($values[$createdAtColumn]) && !isset($this->model->$createdAtColumn)) {
78 78
             $timestamps[$createdAtColumn] = $timestamp;
79 79
         }
80 80
 
Please login to merge, or discard this patch.