Completed
Push — master ( 37635b...73994c )
by Ivan
02:45
created
src/driver/pdo/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
                     isset($this->connection['opts']) ? $this->connection['opts'] : []
45 45
                 );
46 46
             } catch (\PDOException $e) {
47
-                throw new DBException('Connect error: ' . $e->getMessage());
47
+                throw new DBException('Connect error: '.$e->getMessage());
48 48
             }
49 49
         }
50 50
     }
Please login to merge, or discard this patch.
src/schema/Table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     public function setPrimaryKey($column) : Table
79 79
     {
80 80
         if (!is_array($column)) {
81
-            $column = [ $column ];
81
+            $column = [$column];
82 82
         }
83 83
         $this->data['primary'] = $column;
84 84
         return $this;
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         }
166 166
 
167 167
         if (!isset($name)) {
168
-            $name = $toTable->getName() . '_' . implode('_', array_keys($keymap));
168
+            $name = $toTable->getName().'_'.implode('_', array_keys($keymap));
169 169
         }
170 170
         $this->addRelation(new TableRelation(
171 171
             $name,
Please login to merge, or discard this patch.
src/driver/mysql/Statement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
             }
84 84
         }
85 85
         if (!$this->statement->execute()) {
86
-            throw new DBException('Prepared execute error: ' . $this->statement->error);
86
+            throw new DBException('Prepared execute error: '.$this->statement->error);
87 87
         }
88 88
         return new Result($this->statement);
89 89
     }
Please login to merge, or discard this patch.
src/DB.php 1 patch
Spacing   +13 added lines, -15 removed lines patch added patch discarded remove patch
@@ -74,8 +74,7 @@  discard block
 block discarded – undo
74 74
         }
75 75
         $connection['name'] = $connectionString;
76 76
         $connection['type'] = isset($aliases[$connection['type']]) ?
77
-            $aliases[$connection['type']] :
78
-            $connection['type'];
77
+            $aliases[$connection['type']] : $connection['type'];
79 78
         $tmp = '\\vakata\\database\\driver\\'.strtolower($connection['type']).'\\Driver';
80 79
         return new $tmp($connection);
81 80
     }
@@ -95,7 +94,7 @@  discard block
 block discarded – undo
95 94
         $new = '';
96 95
         $par = array_values($par);
97 96
         if (substr_count($sql, '?') === 2 && !is_array($par[0])) {
98
-            $par = [ $par ];
97
+            $par = [$par];
99 98
         }
100 99
         $parts = explode('??', $sql);
101 100
         $index = 0;
@@ -105,7 +104,7 @@  discard block
 block discarded – undo
105 104
             $index += count($tmp) - 1;
106 105
             if (isset($par[$index])) {
107 106
                 if (!is_array($par[$index])) {
108
-                    $par[$index] = [ $par[$index] ];
107
+                    $par[$index] = [$par[$index]];
109 108
                 }
110 109
                 $params = $par[$index];
111 110
                 array_splice($par, $index, 1, $params);
@@ -113,7 +112,7 @@  discard block
 block discarded – undo
113 112
                 $new .= implode(',', array_fill(0, count($params), '?'));
114 113
             }
115 114
         }
116
-        return [ $new, $par ];
115
+        return [$new, $par];
117 116
     }
118 117
     /**
119 118
      * Run a query (prepare & execute).
@@ -145,7 +144,7 @@  discard block
 block discarded – undo
145 144
     {
146 145
         $coll = Collection::from($this->query($sql, $par));
147 146
         if (($keys = $this->driver->option('mode')) && in_array($keys, ['strtoupper', 'strtolower'])) {
148
-            $coll->map(function ($v) use ($keys) {
147
+            $coll->map(function($v) use ($keys) {
149 148
                 $new = [];
150 149
                 foreach ($v as $k => $vv) {
151 150
                     $new[call_user_func($keys, $k)] = $vv;
@@ -154,13 +153,13 @@  discard block
 block discarded – undo
154 153
             });
155 154
         }
156 155
         if ($key !== null) {
157
-            $coll->mapKey(function ($v) use ($key) { return $v[$key]; });
156
+            $coll->mapKey(function($v) use ($key) { return $v[$key]; });
158 157
         }
159 158
         if ($skip) {
160
-            $coll->map(function ($v) use ($key) { unset($v[$key]); return $v; });
159
+            $coll->map(function($v) use ($key) { unset($v[$key]); return $v; });
161 160
         }
162 161
         if ($opti) {
163
-            $coll->map(function ($v) { return count($v) === 1 ? current($v) : $v; });
162
+            $coll->map(function($v) { return count($v) === 1 ? current($v) : $v; });
164 163
         }
165 164
         return $coll;
166 165
     }
@@ -233,8 +232,7 @@  discard block
 block discarded – undo
233 232
     public function definition(string $table, bool $detectRelations = true) : Table
234 233
     {
235 234
         return isset($this->tables[$table]) ?
236
-            $this->tables[$table] :
237
-            $this->driver->table($table, $detectRelations);
235
+            $this->tables[$table] : $this->driver->table($table, $detectRelations);
238 236
     }
239 237
     /**
240 238
      * Parse all tables from the database.
@@ -251,12 +249,12 @@  discard block
 block discarded – undo
251 249
      */
252 250
     public function getSchema($asPlainArray = true)
253 251
     {
254
-        return !$asPlainArray ? $this->tables : array_map(function ($table) {
252
+        return !$asPlainArray ? $this->tables : array_map(function($table) {
255 253
             return [
256 254
                 'name' => $table->getName(),
257 255
                 'pkey' => $table->getPrimaryKey(),
258 256
                 'comment' => $table->getComment(),
259
-                'columns' => array_map(function ($column) {
257
+                'columns' => array_map(function($column) {
260 258
                     return [
261 259
                         'name' => $column->getName(),
262 260
                         'type' => $column->getType(),
@@ -266,13 +264,13 @@  discard block
 block discarded – undo
266 264
                         'nullable' => $column->isNullable()
267 265
                     ];
268 266
                 }, $table->getFullColumns()),
269
-                'relations' => array_map(function ($rel) {
267
+                'relations' => array_map(function($rel) {
270 268
                     $relation = clone $rel;
271 269
                     $relation->table = $relation->table->getName();
272 270
                     if ($relation->pivot) {
273 271
                         $relation->pivot = $relation->pivot->getName();
274 272
                     }
275
-                    return (array)$relation;
273
+                    return (array) $relation;
276 274
                 }, $table->getRelations())
277 275
             ];
278 276
         }, $this->tables);
Please login to merge, or discard this patch.
src/driver/odbc/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
     }
75 75
     public function next()
76 76
     {
77
-        $this->fetched ++;
77
+        $this->fetched++;
78 78
         $temp = \odbc_fetch_row($this->statement);
79 79
         if (!$temp) {
80 80
             $this->last = false;
Please login to merge, or discard this patch.
src/schema/TableQueryIterator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 $fields = [];
71 71
                 $exists = false;
72 72
                 foreach ($relation->table->getColumns() as $column) {
73
-                    $nm = $name . static::SEP . $column;
73
+                    $nm = $name.static::SEP.$column;
74 74
                     if (isset($this->aliases[$nm])) {
75 75
                         $nm = $this->aliases[$nm];
76 76
                     }
@@ -84,16 +84,16 @@  discard block
 block discarded – undo
84 84
                 $parts = explode(static::SEP, $name);
85 85
                 $name  = array_pop($parts);
86 86
                 if (!$exists && !count($parts) && !isset($temp[$name])) {
87
-                    $temp[$name] = $relation->many ? [ '___clean' => true ] : null;
87
+                    $temp[$name] = $relation->many ? ['___clean' => true] : null;
88 88
                 }
89 89
                 if ($exists) {
90
-                    $full  = '';
90
+                    $full = '';
91 91
                     foreach ($parts as $item) {
92
-                        $full = $full ? $full . static::SEP . $item : $item;
92
+                        $full = $full ? $full.static::SEP.$item : $item;
93 93
                         $temp = &$temp[$item];
94 94
                         $rpk = [];
95 95
                         foreach ($this->relations[$full][0]->table->getPrimaryKey() as $pkey) {
96
-                            $nm = $full . static::SEP . $pkey;
96
+                            $nm = $full.static::SEP.$pkey;
97 97
                             if (isset($this->aliases[$nm])) {
98 98
                                 $nm = $this->aliases[$nm];
99 99
                             }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                         $temp = &$temp[json_encode($rpk)];
103 103
                     }
104 104
                     if (!isset($temp[$name])) {
105
-                        $temp[$name] = $relation->many ? [ '___clean' => true ] : null;
105
+                        $temp[$name] = $relation->many ? ['___clean' => true] : null;
106 106
                     }
107 107
                     $temp = &$temp[$name];
108 108
                     if ($relation->many) {
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                 return;
161 161
             }
162 162
         }
163
-        $this->fetched ++;
163
+        $this->fetched++;
164 164
         while ($this->result->valid()) {
165 165
             $row = $this->result->current();
166 166
             $pk = [];
Please login to merge, or discard this patch.
src/schema/TableColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
             $instance->setLength($data['length']);
52 52
         }
53 53
         if ($instance->getBasicType() === 'enum' && strpos($instance->getType(), 'enum(') === 0) {
54
-            $temp = array_map(function ($v) {
54
+            $temp = array_map(function($v) {
55 55
                 return str_replace("''", "'", $v);
56 56
             }, explode("','", substr($instance->getType(), 6, -2)));
57 57
             $instance->setValues($temp);
Please login to merge, or discard this patch.
src/driver/mysql/Driver.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         if ($this->lnk === null) {
37 37
             $this->lnk = new \mysqli(
38
-                (isset($this->connection['opts']['persist']) && $this->connection['opts']['persist'] ? 'p:' : '') .
38
+                (isset($this->connection['opts']['persist']) && $this->connection['opts']['persist'] ? 'p:' : '').
39 39
                     $this->connection['host'],
40 40
                 $this->connection['user'],
41 41
                 $this->connection['pass'],
@@ -111,10 +111,10 @@  discard block
 block discarded – undo
111 111
             $comments = Collection::from(
112 112
                 $this->query(
113 113
                     "SELECT TABLE_NAME, TABLE_COMMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = ?",
114
-                    [ $this->connection['name'] ]
114
+                    [$this->connection['name']]
115 115
                 )
116 116
             )
117
-            ->mapKey(function ($v) {
117
+            ->mapKey(function($v) {
118 118
                 return $v['TABLE_NAME'];
119 119
             })
120 120
             ->pluck('TABLE_COMMENT')
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                      WHERE
134 134
                         TABLE_SCHEMA = ? AND TABLE_NAME IS NOT NULL AND
135 135
                         REFERENCED_TABLE_SCHEMA = ? AND REFERENCED_TABLE_NAME IS NOT NULL",
136
-                    [ $this->connection['name'], $this->connection['name'] ]
136
+                    [$this->connection['name'], $this->connection['name']]
137 137
                 )
138 138
             )->toArray();
139 139
             foreach ($col as $row) {
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
             ->addColumns(
152 152
                 $columns
153 153
                     ->clone()
154
-                    ->mapKey(function ($v) { return $v['Field']; })
155
-                    ->map(function ($v) {
154
+                    ->mapKey(function($v) { return $v['Field']; })
155
+                    ->map(function($v) {
156 156
                         $v['length'] = null;
157 157
                         if (!isset($v['Type'])) {
158 158
                             return $v;
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
                             default:
175 175
                                 if (strpos($type, 'char') !== false && strpos($type, '(') !== false) {
176 176
                                     // extract length from varchar
177
-                                    $v['length'] = (int)explode(')', explode('(', $type)[1])[0];
177
+                                    $v['length'] = (int) explode(')', explode('(', $type)[1])[0];
178 178
                                     $v['length'] = $v['length'] > 0 ? $v['length'] : null;
179 179
                                 }
180 180
                                 break;
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             ->setPrimaryKey(
187 187
                 $columns
188 188
                     ->clone()
189
-                    ->filter(function ($v) { return $v['Key'] === 'PRI'; })
189
+                    ->filter(function($v) { return $v['Key'] === 'PRI'; })
190 190
                     ->pluck('Field')
191 191
                     ->toArray()
192 192
             )
@@ -213,10 +213,10 @@  discard block
 block discarded – undo
213 213
                 $usedcol = [];
214 214
                 if (count($columns)) {
215 215
                     foreach (Collection::from($relationsT[$data['table']] ?? [])
216
-                        ->filter(function ($v) use ($columns) {
216
+                        ->filter(function($v) use ($columns) {
217 217
                             return in_array($v['COLUMN_NAME'], $columns);
218 218
                         })
219
-                        ->map(function ($v) {
219
+                        ->map(function($v) {
220 220
                             $new = [];
221 221
                             foreach ($v as $kk => $vv) {
222 222
                                 $new[strtoupper($kk)] = $vv;
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                     $relname = $foreign['table'];
235 235
                     $cntr = 1;
236 236
                     while ($definition->hasRelation($relname) || $definition->getName() == $relname) {
237
-                        $relname = $foreign['table'] . '_' . (++ $cntr);
237
+                        $relname = $foreign['table'].'_'.(++$cntr);
238 238
                     }
239 239
                     $definition->addRelation(
240 240
                         new TableRelation(
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
                     $relname = $data['table'];
251 251
                     $cntr = 1;
252 252
                     while ($definition->hasRelation($relname) || $definition->getName() == $relname) {
253
-                        $relname = $data['table'] . '_' . (++ $cntr);
253
+                        $relname = $data['table'].'_'.(++$cntr);
254 254
                     }
255 255
                     $definition->addRelation(
256 256
                         new TableRelation(
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
             // resulting in a "belongsTo" relationship
268 268
             $relations = [];
269 269
             foreach (Collection::from($relationsT[$table] ?? [])
270
-                ->map(function ($v) {
270
+                ->map(function($v) {
271 271
                     $new = [];
272 272
                     foreach ($v as $kk => $vv) {
273 273
                         $new[strtoupper($kk)] = $vv;
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
                 $relname = $data['table'];
283 283
                 $cntr = 1;
284 284
                 while ($definition->hasRelation($relname) || $definition->getName() == $relname) {
285
-                    $relname = $data['table'] . '_' . (++ $cntr);
285
+                    $relname = $data['table'].'_'.(++$cntr);
286 286
                 }
287 287
                 $definition->addRelation(
288 288
                     new TableRelation(
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
                 "SELECT table_name FROM information_schema.tables where table_schema = ?",
304 304
                 [$this->connection['name']]
305 305
             ))
306
-            ->map(function ($v) {
306
+            ->map(function($v) {
307 307
                 $new = [];
308 308
                 foreach ($v as $kk => $vv) {
309 309
                     $new[strtoupper($kk)] = $vv;
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
                 return $new;
312 312
             })
313 313
             ->pluck('TABLE_NAME')
314
-            ->map(function ($v) {
314
+            ->map(function($v) {
315 315
                 return $this->table($v);
316 316
             })
317 317
             ->toArray();
Please login to merge, or discard this patch.
src/driver/oracle/Driver.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -138,17 +138,17 @@  discard block
 block discarded – undo
138 138
         $columns = Collection::from($this
139 139
             ->query(
140 140
                 "SELECT * FROM all_tab_cols WHERE table_name = ? AND owner = ?",
141
-                [ strtoupper($table), $this->name() ]
141
+                [strtoupper($table), $this->name()]
142 142
             ))
143
-            ->map(function ($v) {
143
+            ->map(function($v) {
144 144
                 $new = [];
145 145
                 foreach ($v as $kk => $vv) {
146 146
                     $new[strtoupper($kk)] = $vv;
147 147
                 }
148 148
                 return $new;
149 149
             })
150
-            ->mapKey(function ($v) { return $v['COLUMN_NAME']; })
151
-            ->map(function ($v) {
150
+            ->mapKey(function($v) { return $v['COLUMN_NAME']; })
151
+            ->map(function($v) {
152 152
                 $v['length'] = null;
153 153
                 if (!isset($v['DATA_TYPE'])) {
154 154
                     return $v;
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                     default:
161 161
                         if (strpos($type, 'char') !== false && strpos($type, '(') !== false) {
162 162
                             // extract length from varchar
163
-                            $v['length'] = (int)explode(')', (explode('(', $type)[1] ?? ''))[0];
163
+                            $v['length'] = (int) explode(')', (explode('(', $type)[1] ?? ''))[0];
164 164
                             $v['length'] = $v['length'] > 0 ? $v['length'] : null;
165 165
                         }
166 166
                         break;
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
             ->query(
177 177
                 "SELECT constraint_name FROM all_constraints
178 178
                 WHERE table_name = ? AND constraint_type = ? AND owner = ?",
179
-                [ strtoupper($table), 'P', $owner ]
179
+                [strtoupper($table), 'P', $owner]
180 180
             ))
181
-            ->map(function ($v) {
181
+            ->map(function($v) {
182 182
                 $new = [];
183 183
                 foreach ($v as $kk => $vv) {
184 184
                     $new[strtoupper($kk)] = $vv;
@@ -193,9 +193,9 @@  discard block
 block discarded – undo
193 193
                 ->query(
194 194
                     "SELECT column_name FROM all_cons_columns
195 195
                     WHERE table_name = ? AND constraint_name = ? AND owner = ?",
196
-                    [ strtoupper($table), $pkname, $owner ]
196
+                    [strtoupper($table), $pkname, $owner]
197 197
                 ))
198
-                ->map(function ($v) {
198
+                ->map(function($v) {
199 199
                     $new = [];
200 200
                     foreach ($v as $kk => $vv) {
201 201
                         $new[strtoupper($kk)] = $vv;
@@ -222,9 +222,9 @@  discard block
 block discarded – undo
222 222
                     LEFT JOIN all_cons_columns cc ON cc.OWNER = ac.OWNER AND cc.CONSTRAINT_NAME = ac.CONSTRAINT_NAME
223 223
                     WHERE ac.OWNER = ? AND ac.R_OWNER = ? AND ac.R_CONSTRAINT_NAME = ? AND ac.CONSTRAINT_TYPE = ?
224 224
                     ORDER BY cc.POSITION",
225
-                    [ $owner, $owner, $pkname, 'R' ]
225
+                    [$owner, $owner, $pkname, 'R']
226 226
                 ))
227
-                ->map(function ($v) {
227
+                ->map(function($v) {
228 228
                     $new = [];
229 229
                     foreach ($v as $kk => $vv) {
230 230
                         $new[strtoupper($kk)] = $vv;
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                  as $relation
235 235
             ) {
236 236
                 $relations[$relation['CONSTRAINT_NAME']]['table'] = $relation['TABLE_NAME'];
237
-                $relations[$relation['CONSTRAINT_NAME']]['keymap'][$primary[(int)$relation['POSITION']-1]] = $relation['COLUMN_NAME'];
237
+                $relations[$relation['CONSTRAINT_NAME']]['keymap'][$primary[(int) $relation['POSITION'] - 1]] = $relation['COLUMN_NAME'];
238 238
             }
239 239
             foreach ($relations as $data) {
240 240
                 $rtable = $this->table($data['table'], true);
@@ -258,9 +258,9 @@  discard block
 block discarded – undo
258 258
                                 ac.OWNER = ? AND ac.R_OWNER = ? AND ac.TABLE_NAME = ? AND ac.CONSTRAINT_TYPE = ? AND
259 259
                                 cc.COLUMN_NAME IN (??)
260 260
                             ORDER BY POSITION",
261
-                            [ $owner, $owner, $data['table'], 'R', $columns ]
261
+                            [$owner, $owner, $data['table'], 'R', $columns]
262 262
                         ))
263
-                        ->map(function ($v) {
263
+                        ->map(function($v) {
264 264
                             $new = [];
265 265
                             foreach ($v as $kk => $vv) {
266 266
                                 $new[strtoupper($kk)] = $vv;
@@ -278,9 +278,9 @@  discard block
 block discarded – undo
278 278
                     $rcolumns = Collection::from($this
279 279
                         ->query(
280 280
                             "SELECT COLUMN_NAME FROM all_cons_columns WHERE OWNER = ? AND CONSTRAINT_NAME = ? ORDER BY POSITION",
281
-                            [ $owner, current($foreign['keymap']) ]
281
+                            [$owner, current($foreign['keymap'])]
282 282
                         ))
283
-                        ->map(function ($v) {
283
+                        ->map(function($v) {
284 284
                             $new = [];
285 285
                             foreach ($v as $kk => $vv) {
286 286
                                 $new[strtoupper($kk)] = $vv;
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
                     $relname = $foreign['table'];
296 296
                     $cntr = 1;
297 297
                     while ($definition->hasRelation($relname) || $definition->getName() == $relname) {
298
-                        $relname = $foreign['table'] . '_' . (++ $cntr);
298
+                        $relname = $foreign['table'].'_'.(++$cntr);
299 299
                     }
300 300
                     $definition->addRelation(
301 301
                         new TableRelation(
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
                     $relname = $data['table'];
312 312
                     $cntr = 1;
313 313
                     while ($definition->hasRelation($relname) || $definition->getName() == $relname) {
314
-                        $relname = $data['table'] . '_' . (++ $cntr);
314
+                        $relname = $data['table'].'_'.(++$cntr);
315 315
                     }
316 316
                     $definition->addRelation(
317 317
                         new TableRelation(
@@ -335,9 +335,9 @@  discard block
 block discarded – undo
335 335
                     LEFT JOIN all_cons_columns cc ON cc.OWNER = ac.OWNER AND cc.CONSTRAINT_NAME = ac.CONSTRAINT_NAME
336 336
                     WHERE ac.OWNER = ? AND ac.R_OWNER = ? AND ac.TABLE_NAME = ? AND ac.CONSTRAINT_TYPE = ?
337 337
                     ORDER BY cc.POSITION",
338
-                    [ $owner, $owner, strtoupper($table), 'R' ]
338
+                    [$owner, $owner, strtoupper($table), 'R']
339 339
                 ))
340
-                ->map(function ($v) {
340
+                ->map(function($v) {
341 341
                     $new = [];
342 342
                     foreach ($v as $kk => $vv) {
343 343
                         $new[strtoupper($kk)] = $vv;
@@ -353,9 +353,9 @@  discard block
 block discarded – undo
353 353
                 $rcolumns = Collection::from($this
354 354
                     ->query(
355 355
                         "SELECT COLUMN_NAME FROM all_cons_columns WHERE OWNER = ? AND CONSTRAINT_NAME = ? ORDER BY POSITION",
356
-                        [ $owner, current($data['keymap']) ]
356
+                        [$owner, current($data['keymap'])]
357 357
                     ))
358
-                    ->map(function ($v) {
358
+                    ->map(function($v) {
359 359
                         $new = [];
360 360
                         foreach ($v as $kk => $vv) {
361 361
                             $new[strtoupper($kk)] = $vv;
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                 $relname = $data['table'];
371 371
                 $cntr = 1;
372 372
                 while ($definition->hasRelation($relname) || $definition->getName() == $relname) {
373
-                    $relname = $data['table'] . '_' . (++ $cntr);
373
+                    $relname = $data['table'].'_'.(++$cntr);
374 374
                 }
375 375
                 $definition->addRelation(
376 376
                     new TableRelation(
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
                 "SELECT TABLE_NAME FROM ALL_TABLES where OWNER = ?",
392 392
                 [$this->connection['name']]
393 393
             ))
394
-            ->map(function ($v) {
394
+            ->map(function($v) {
395 395
                 $new = [];
396 396
                 foreach ($v as $kk => $vv) {
397 397
                     $new[strtoupper($kk)] = $vv;
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
                 return $new;
400 400
             })
401 401
             ->pluck('TABLE_NAME')
402
-            ->map(function ($v) {
402
+            ->map(function($v) {
403 403
                 return $this->table($v);
404 404
             })
405 405
             ->toArray();
Please login to merge, or discard this patch.