Passed
Push — 0.8.x ( 68625b...156d51 )
by Alexander
06:01 queued 03:01
created
src/components/Database/Schema/Builders/PostgresBuilder.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     public function createDatabase($name): bool
39 39
     {
40 40
         return $this->connection->statement(
41
-           $this->grammar->compileCreateDatabase($name, $this->connection)
41
+            $this->grammar->compileCreateDatabase($name, $this->connection)
42 42
         );
43 43
     }
44 44
     
@@ -152,10 +152,10 @@  discard block
 block discarded – undo
152 152
     public function getAllTables()
153 153
     {
154 154
         return $this->connection->select(
155
-                      $this->grammar->compileGetAllTables(
156
-                             $this->connection->getConfig('schema')
157
-                      )
158
-               );
155
+                        $this->grammar->compileGetAllTables(
156
+                                $this->connection->getConfig('schema')
157
+                        )
158
+                );
159 159
     }
160 160
     
161 161
     /**
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
     public function getAllViews()
167 167
     {
168 168
         return $this->connection->select(
169
-                      $this->grammar->compileGetAllViews(
170
-                             $this->connection->getConfig('schema')
171
-                      )
172
-               );
169
+                        $this->grammar->compileGetAllViews(
170
+                                $this->connection->getConfig('schema')
171
+                        )
172
+                );
173 173
     }
174 174
 }
175 175
\ No newline at end of file
Please login to merge, or discard this patch.
src/components/Database/Schema/Grammars/MySqlGrammar.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -957,7 +957,7 @@
 block discarded – undo
957 957
      */
958 958
     protected function modifyDefault(Dataprint $dataprint, Flowing $column)
959 959
     {
960
-        if ( ! is_null($column->default))  {
960
+        if ( ! is_null($column->default)) {
961 961
             return " default ".$this->getDefaultValue($column->default);
962 962
         }
963 963
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -885,7 +885,9 @@
 block discarded – undo
885 885
      */
886 886
     protected function modifyUnsigned(Dataprint $dataprint, Flowing $column): string
887 887
     {
888
-        if ($column->unsigned) return ' unsigned';
888
+        if ($column->unsigned) {
889
+            return ' unsigned';
890
+        }
889 891
     }
890 892
 
891 893
     /**
Please login to merge, or discard this patch.
src/components/Database/Schema/Grammars/PostgresGrammar.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         return sprintf('create database %s enconding %s',
59 59
                     $this->wrapValue($name),
60 60
                     $this->wrapValue($connection->getConfig('charset')),
61
-               );
61
+                );
62 62
     }
63 63
 
64 64
     /**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                     $dataprint->temporary ? 'create temporary' : 'create',
108 108
                     $this->wrapTable($dataprint),
109 109
                     implode(', ', $this->getColumns($dataprint))
110
-               );
110
+                );
111 111
     }
112 112
     
113 113
     /**
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         return sprintf('alter table %s %s',
124 124
                     $this->wrapTable($dataprint),
125 125
                     implode(', ', $this->prefixArray('add column', $this->getColumns($dataprint)))
126
-               );
126
+                );
127 127
     }
128 128
     
129 129
     /**
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                     $this->wrapTable($dataprint),
156 156
                     $this->wrap($command->index),
157 157
                     $this->columnize($command->columns)
158
-               );
158
+                );
159 159
     }
160 160
     
161 161
     /**
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                     $this->wrapTable($dataprint),
174 174
                     $command->option ? ' using '.$command->option : '',
175 175
                     $this->columnize($command->columns)
176
-               );        
176
+                );        
177 177
     }
178 178
     
179 179
     /**
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
                     $this->wrap($command->index),
191 191
                     $this->wrapTable($dataprint),
192 192
                     implode(' || ', $command->columns)
193
-               );        
193
+                );        
194 194
     }
195 195
     
196 196
     /**
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
         return sprintf('alter table %s rename to %s',
386 386
                     $this->wrap($command->from),
387 387
                     $this->wrap($command->to)
388
-               );
388
+                );
389 389
     }
390 390
     
391 391
     /**
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
                     $this->wrapTable($dataprint),
471 471
                     $this->wrap($command->column->name),
472 472
                     "'".str_replace("'", "''", $command->value)."'"
473
-               );
473
+                );
474 474
     }
475 475
     
476 476
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -873,7 +873,7 @@
 block discarded – undo
873 873
      */
874 874
     protected function modifyDefault(Dataprint $dataprint, Flowing $column)
875 875
     {
876
-        if ( ! is_null($column->default))  {
876
+        if ( ! is_null($column->default)) {
877 877
             return ' default '.$this->getDefaultValue($column->default);
878 878
         }
879 879
     }
Please login to merge, or discard this patch.
src/components/Database/Schema/Grammars/SQLiteGrammar.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                     implode(', ', $this->getColumns($dataprint)),
85 85
                     (string) $this->addForeignKeys($dataprint),
86 86
                     (string) $this->addPrimaryKeys($dataprint)
87
-               );
87
+                );
88 88
     }
89 89
     
90 90
     /**
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
                     $this->columnize($foreign->columns),
127 127
                     $this->wrapTable($foreign->on),
128 128
                     $this->columnize((array) $foreign->references)
129
-               );
129
+                );
130 130
     }
131 131
     
132 132
     /**
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
                     $this->wrap($command->index),
176 176
                     $this->wrapTable($dataprint),
177 177
                     $this->columnize($command->columns)
178
-               );
178
+                );
179 179
     }
180 180
     
181 181
     /**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                     $this->wrap($command->index),
193 193
                     $this->wrapTable($dataprint),
194 194
                     $this->columnize($command->columns)
195
-               );        
195
+                );        
196 196
     }
197 197
     
198 198
     /**
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
         return sprintf('alter table %s rename to %s',
339 339
                     $this->wrap($command->from),
340 340
                     $this->wrap($command->to)
341
-               );
341
+                );
342 342
     }
343 343
     
344 344
     /**
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
         return sprintf('varchar check ("%s" in (%s))',
631 631
                     $column->name,
632 632
                     $this->quoteString($column->allowed)
633
-               );
633
+                );
634 634
     }
635 635
 
636 636
     /**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     {
99 99
         $foreigns = $this->getCommandsByName($dataprint, 'foreign');
100 100
         
101
-        return collect($foreigns)->reduce(function ($sql, $foreign) {
101
+        return collect($foreigns)->reduce(function($sql, $foreign) {
102 102
             $sql .= $this->getForeignKey($foreign);
103 103
             
104 104
             if ( ! is_null($foreign->onDelete)) {
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     {
156 156
         $columns = $this->prefixArray('add column', $this->getColumns($dataprint));
157 157
 
158
-        return collect($columns)->map(function ($column) use ($dataprint) {
158
+        return collect($columns)->map(function($column) use ($dataprint) {
159 159
             return 'alter table '.$this->wrapTable($dataprint).' '.$column;
160 160
         })->all();
161 161
         
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
      */
802 802
     protected function modifyDefault(Dataprint $dataprint, Flowing $column)
803 803
     {
804
-        if ( ! is_null($column->default))  {
804
+        if ( ! is_null($column->default)) {
805 805
             return ' default '.$this->getDefaultValue($column->default);
806 806
         }
807 807
     }
Please login to merge, or discard this patch.
src/components/Database/Schema/Grammars/SqlServerGrammar.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         return sprintf('alter table %s add %s',
126 126
                     $this->wrapTable($dataprint),
127 127
                     implode(', ', $this->getColumns($dataprint))
128
-               );        
128
+                );        
129 129
     }
130 130
 
131 131
     /**
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                     $this->wrapTable($dataprint),
143 143
                     $this->wrap($command->index),
144 144
                     $this->columnize($command->columns)
145
-               );
145
+                );
146 146
     }
147 147
     
148 148
     /**
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                     $this->wrap($command->index),
160 160
                     $this->wrapTable($dataprint),
161 161
                     $this->columnize($command->columns)
162
-               );
162
+                );
163 163
     }
164 164
     
165 165
     /**
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
                     $this->wrap($command->index),
177 177
                     $this->wrapTable($dataprint),
178 178
                     $this->columnize($command->columns)
179
-               );        
179
+                );        
180 180
     }
181 181
     
182 182
     /**
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                     $this->wrap($command->index),
194 194
                     $this->wrapTable($dataprint),
195 195
                     $this->columnize($command->columns)
196
-               );
196
+                );
197 197
     }
198 198
     
199 199
     /**
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
         return sprintf('if exists (select * from sys.sysobjects where id = object_id(%s, \'U\')) drop table %s',
223 223
                     "'".str_replace("'", "''", $this->getTablePrefix().$dataprint->getTable())."'",
224 224
                     $this->wrapTable($dataprint)
225
-               );
225
+                );
226 226
     }
227 227
     
228 228
     /**
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         return sprintf("sp_rename N'%s', %s, N'INDEX'",
340 340
                     $this->wrap($dataprint->getTable().'.'.$command->from),
341 341
                     $this->wrap($command->to)
342
-               );
342
+                );
343 343
     }
344 344
     
345 345
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -873,7 +873,7 @@
 block discarded – undo
873 873
      */
874 874
     protected function modifyDefault(Dataprint $dataprint, Flowing $column)
875 875
     {
876
-        if ( ! is_null($column->default))  {
876
+        if ( ! is_null($column->default)) {
877 877
             return ' default '.$this->getDefaultValue($column->default);
878 878
         }
879 879
     }
Please login to merge, or discard this patch.
src/components/Database/Schema/Dataprint.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,9 @@
 block discarded – undo
116 116
         $this->table = $table;
117 117
         $this->prefix = $prefix;
118 118
 
119
-        if ( ! is_null($callback)) $callback($this);
119
+        if ( ! is_null($callback)) {
120
+            $callback($this);
121
+        }
120 122
     }
121 123
 
122 124
     /**
Please login to merge, or discard this patch.
src/components/Database/Grammar.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
                         ? $this->wrapTable($segment)
122 122
                         : $this->wrapValue($segment);
123 123
                     }
124
-               )->implode('.');
124
+                )->implode('.');
125 125
     }
126 126
 
127 127
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
      */
117 117
     protected function wrapSegments($segments): string
118 118
     {
119
-        return collect($segments)->map(function ($segment, $key) use ($segments) {
119
+        return collect($segments)->map(function($segment, $key) use ($segments) {
120 120
                     return $key == 0 && count($segments) > 1
121 121
                         ? $this->wrapTable($segment)
122 122
                         : $this->wrapValue($segment);
Please login to merge, or discard this patch.
src/components/Database/Connections/Connection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
      */
269 269
     public function select(string $query, array $bindings = [], bool $useReadPdo = true): array
270 270
     {
271
-        return $this->run($query, $bindings, function ($query, $bindings) use ($useReadPdo) {
271
+        return $this->run($query, $bindings, function($query, $bindings) use ($useReadPdo) {
272 272
             if ($this->pretending()) {
273 273
                 return [];
274 274
             }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
      */
335 335
     public function statement(string $query, array $bindings = []): bool
336 336
     {
337
-        return $this->run($query, $bindings, function ($query, $bindings) {
337
+        return $this->run($query, $bindings, function($query, $bindings) {
338 338
             if ($this->pretending()) {
339 339
                 return true;
340 340
             }
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
      */
358 358
     public function affectingStatement(string $query, array $bindings = []): int
359 359
     {
360
-        return $this->run($query, $bindings, function ($query, $bindings) {
360
+        return $this->run($query, $bindings, function($query, $bindings) {
361 361
             if ($this->pretending()) {
362 362
                 return 0;
363 363
             }
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
      */
384 384
     public function prepend(Closure $callback): array
385 385
     {
386
-        return $this->withFreshQueryLog(function () use ($callback) {
386
+        return $this->withFreshQueryLog(function() use ($callback) {
387 387
             $this->pretending = true;
388 388
 
389 389
             $callback($this);
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
      * 
402 402
      * @return array|Closure
403 403
      */
404
-    protected function withFreshQueryLog(Closure $callback): array|Closure
404
+    protected function withFreshQueryLog(Closure $callback): array | Closure
405 405
     {
406 406
         $loggingQueries = $this->loggingQueries;
407 407
         
Please login to merge, or discard this patch.
src/components/Database/Query/Builder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
     {
318 318
         $this->addSelect(new Expression($expression));
319 319
 
320
-        if (! empty($bindings)) {
320
+        if ( ! empty($bindings)) {
321 321
             $this->addBinding($bindings, 'select');
322 322
         }
323 323
 
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
      */
430 430
     protected function addArrayWheres($column, $boolean, $method = 'where'): static
431 431
     {
432
-        return $this->whereNested(function ($query) use ($column, $method, $boolean) {
432
+        return $this->whereNested(function($query) use ($column, $method, $boolean) {
433 433
             foreach ((array) $column as $key => $value) {
434 434
                 if (is_numeric($key) && is_array($value)) {
435 435
                     $query->{$method}(...array_values($value));
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
             'boolean' => $boolean
567 567
         ];
568 568
 
569
-        $this->addBinding((array) $bindings,  'where');
569
+        $this->addBinding((array) $bindings, 'where');
570 570
 
571 571
         return $this;
572 572
     }
@@ -1361,7 +1361,7 @@  discard block
 block discarded – undo
1361 1361
      */
1362 1362
     public function get($columns = ['*'])
1363 1363
     {
1364
-        return collect($this->getFresh(Arr::wrap($columns), function () {
1364
+        return collect($this->getFresh(Arr::wrap($columns), function() {
1365 1365
             return $this->getWithStatement();
1366 1366
         }));
1367 1367
     }
@@ -1491,7 +1491,7 @@  discard block
 block discarded – undo
1491 1491
 
1492 1492
         $this->columns = $previous;
1493 1493
 
1494
-        if (isset($results[0]))  {
1494
+        if (isset($results[0])) {
1495 1495
             $result = array_change_key_case((array) $results[0]);
1496 1496
         }
1497 1497
 
Please login to merge, or discard this patch.