Completed
Push — master ( 89deac...cf3c32 )
by Bas
02:49
created
src/Query/Grammar.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             // see if that component exists. If it does we'll just call the compiler
146 146
             // function for the component which is responsible for making the SQL.
147 147
 
148
-            if (isset($builder->$component) && ! is_null($builder->$component)) {
148
+            if (isset($builder->$component) && !is_null($builder->$component)) {
149 149
                 $method = 'compile'.ucfirst($component);
150 150
 
151 151
                 $builder = $this->$method($builder, $builder->$component);
@@ -204,13 +204,13 @@  discard block
 block discarded – undo
204 204
      */
205 205
     protected function compileWheresToArray($builder)
206 206
     {
207
-        $result = collect($builder->wheres)->map(function ($where) use ($builder) {
207
+        $result = collect($builder->wheres)->map(function($where) use ($builder) {
208 208
             // ArangoDB uses a double '=' for comparison
209 209
             if ($where['operator'] == '=') {
210 210
                 $where['operator'] = '==';
211 211
             }
212 212
             //Prefix table alias on the column
213
-            $where['column'] = $this->prefixAlias($builder, $builder->from, $where['column'] );
213
+            $where['column'] = $this->prefixAlias($builder, $builder->from, $where['column']);
214 214
 
215 215
             return [
216 216
                 $where['column'],
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      */
232 232
     protected function compileOrders(Builder $builder, $orders)
233 233
     {
234
-        if (! empty($orders)) {
234
+        if (!empty($orders)) {
235 235
             $builder->aqb = $builder->aqb->sort($this->compileOrdersToArray($builder, $orders));
236 236
             return $builder;
237 237
         }
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
      */
249 249
     protected function compileOrdersToArray(Builder $builder, $orders)
250 250
     {
251
-        return array_map(function ($order) {
251
+        return array_map(function($order) {
252 252
             return $order['sql'] ?? $this->prefixTable($order['column']).' '.$order['direction'];
253 253
         }, $orders);
254 254
     }
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
     protected function compileLimit(Builder $builder, $limit)
279 279
     {
280 280
         if ($this->offset !== null) {
281
-            $builder->aqb = $builder->aqb->limit((int)$this->offset, (int)$limit);
281
+            $builder->aqb = $builder->aqb->limit((int) $this->offset, (int) $limit);
282 282
             return $builder;
283 283
         }
284 284
         $builder->aqb = $builder->aqb->limit((int) $limit);
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
         $builder = $this->generateTableAlias($builder, $table);
352 352
         $tableAlias = $builder->getAlias($table);
353 353
 
354
-        if (! is_null($_key)) {
354
+        if (!is_null($_key)) {
355 355
             $builder->aqb = $builder->aqb->remove((string) $_key, $table)->get();
356 356
             return $builder;
357 357
         }
Please login to merge, or discard this patch.
src/Query/Builder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
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
         $this->aqb = new QueryBuilder();
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function update(array $values)
135 135
     {
136
-        $response =  $this->connection->update($this->grammar->compileUpdate($this, $values)->aqb);
136
+        $response = $this->connection->update($this->grammar->compileUpdate($this, $values)->aqb);
137 137
         $this->aqb = new QueryBuilder();
138 138
         return $response;
139 139
     }
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
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             $filter[] = ['doc.'.$attribute, '!=', 'null'];
36 36
         }
37 37
 
38
-        $aqb = AQB::for('doc', $collection)
38
+        $aqb = AQB::for ('doc', $collection)
39 39
             ->filter($filter)
40 40
             ->limit(1)
41 41
             ->return('true')
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             ['doc.'.$command->to],
66 66
         ];
67 67
 
68
-        $aqb = AQB::for('doc', $collection)
68
+        $aqb = AQB::for ('doc', $collection)
69 69
             ->filter($filter)
70 70
             ->update(
71 71
                 'doc',
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                     $command->to => 'doc.'.$command->from,
75 75
                 ],
76 76
                 $collection)
77
-            ->options( ['keepNull' => true])
77
+            ->options(['keepNull' => true])
78 78
             ->get();
79 79
 
80 80
         $command->aqb = $aqb;
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
             $filter[] = ['doc.'.$attribute, '!=', 'null', 'OR'];
102 102
             $data[$attribute] = 'null';
103 103
         }
104
-        $aqb = AQB::for('doc', $collection)
105
-            ->filter($filter )
104
+        $aqb = AQB::for ('doc', $collection)
105
+            ->filter($filter)
106 106
             ->update('doc', $data, $collection)
107 107
             ->options(['keepNull' => false])
108 108
             ->get();
Please login to merge, or discard this patch.
src/Providers/CommandServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Eloquent/Builder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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])) {
87
+        if (!isset($values[$createdAtColumn])) {
88 88
             $timestamps[$createdAtColumn] = $timestamp;
89 89
         }
90 90
         $values = array_merge(
Please login to merge, or discard this patch.