Completed
Push — master ( 407844...9daecf )
by Ivan
02:25
created
src/driver/oracle/Driver.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 
91 91
     public function begin() : bool
92 92
     {
93
-         return $this->transaction = true;
93
+            return $this->transaction = true;
94 94
     }
95 95
     public function commit() : bool
96 96
     {
Please login to merge, or discard this patch.
src/driver/oracle/Schema.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
                     }
119 119
                     return $new;
120 120
                 })
121
-                 as $relation
121
+                    as $relation
122 122
             ) {
123 123
                 $relations[$relation['CONSTRAINT_NAME']]['table'] = $relation['TABLE_NAME'];
124 124
                 $relations[$relation['CONSTRAINT_NAME']]['keymap'][$primary[(int)$relation['POSITION']-1]] = $relation['COLUMN_NAME'];
Please login to merge, or discard this patch.
src/driver/mysql/Driver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     {
38 38
         if ($this->lnk === null) {
39 39
             $this->lnk = new \mysqli(
40
-                (isset($this->connection['opts']['persist']) && $this->connection['opts']['persist'] ? 'p:' : '') .
40
+                (isset($this->connection['opts']['persist']) && $this->connection['opts']['persist'] ? 'p:' : '').
41 41
                     $this->connection['host'],
42 42
                 $this->connection['user'],
43 43
                 $this->connection['pass'],
Please login to merge, or discard this patch.
src/driver/mysql/Schema.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
             $comments = Collection::from(
25 25
                 $this->query(
26 26
                     "SELECT TABLE_NAME, TABLE_COMMENT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = ?",
27
-                    [ $this->connection['opts']['schema'] ?? $this->connection['name'] ]
27
+                    [$this->connection['opts']['schema'] ?? $this->connection['name']]
28 28
                 )
29 29
             )
30
-            ->mapKey(function ($v) {
30
+            ->mapKey(function($v) {
31 31
                 return $v['TABLE_NAME'];
32 32
             })
33 33
             ->pluck('TABLE_COMMENT')
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
             ->addColumns(
68 68
                 $columns
69 69
                     ->clone()
70
-                    ->mapKey(function ($v) { return $v['Field']; })
71
-                    ->map(function ($v) {
70
+                    ->mapKey(function($v) { return $v['Field']; })
71
+                    ->map(function($v) {
72 72
                         $v['length'] = null;
73 73
                         if (!isset($v['Type'])) {
74 74
                             return $v;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                             default:
91 91
                                 if (strpos($type, 'char') !== false && strpos($type, '(') !== false) {
92 92
                                     // extract length from varchar
93
-                                    $v['length'] = (int)explode(')', explode('(', $type)[1])[0];
93
+                                    $v['length'] = (int) explode(')', explode('(', $type)[1])[0];
94 94
                                     $v['length'] = $v['length'] > 0 ? $v['length'] : null;
95 95
                                 }
96 96
                                 break;
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             ->setPrimaryKey(
103 103
                 $columns
104 104
                     ->clone()
105
-                    ->filter(function ($v) { return $v['Key'] === 'PRI'; })
105
+                    ->filter(function($v) { return $v['Key'] === 'PRI'; })
106 106
                     ->pluck('Field')
107 107
                     ->toArray()
108 108
             )
@@ -129,10 +129,10 @@  discard block
 block discarded – undo
129 129
                 $usedcol = [];
130 130
                 if (count($columns)) {
131 131
                     foreach (Collection::from($relationsT[$data['table']] ?? [])
132
-                        ->filter(function ($v) use ($columns) {
132
+                        ->filter(function($v) use ($columns) {
133 133
                             return in_array($v['COLUMN_NAME'], $columns);
134 134
                         })
135
-                        ->map(function ($v) {
135
+                        ->map(function($v) {
136 136
                             $new = [];
137 137
                             foreach ($v as $kk => $vv) {
138 138
                                 $new[strtoupper($kk)] = $vv;
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
                     $relname = $foreign['table'];
151 151
                     $cntr = 1;
152 152
                     while ($definition->hasRelation($relname) || $definition->getName() == $relname) {
153
-                        $relname = $foreign['table'] . '_' . (++ $cntr);
153
+                        $relname = $foreign['table'].'_'.(++$cntr);
154 154
                     }
155 155
                     $definition->addRelation(
156 156
                         new TableRelation(
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                     $relname = $data['table'];
167 167
                     $cntr = 1;
168 168
                     while ($definition->hasRelation($relname) || $definition->getName() == $relname) {
169
-                        $relname = $data['table'] . '_' . (++ $cntr);
169
+                        $relname = $data['table'].'_'.(++$cntr);
170 170
                     }
171 171
                     $definition->addRelation(
172 172
                         new TableRelation(
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             // resulting in a "belongsTo" relationship
184 184
             $relations = [];
185 185
             foreach (Collection::from($relationsT[$table] ?? [])
186
-                ->map(function ($v) {
186
+                ->map(function($v) {
187 187
                     $new = [];
188 188
                     foreach ($v as $kk => $vv) {
189 189
                         $new[strtoupper($kk)] = $vv;
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                 $relname = $data['table'];
199 199
                 $cntr = 1;
200 200
                 while ($definition->hasRelation($relname) || $definition->getName() == $relname) {
201
-                    $relname = $data['table'] . '_' . (++ $cntr);
201
+                    $relname = $data['table'].'_'.(++$cntr);
202 202
                 }
203 203
                 $definition->addRelation(
204 204
                     new TableRelation(
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                 "SELECT table_name FROM information_schema.tables where table_schema = ?",
220 220
                 [$this->connection['opts']['schema'] ?? $this->connection['name']]
221 221
             ))
222
-            ->map(function ($v) {
222
+            ->map(function($v) {
223 223
                 $new = [];
224 224
                 foreach ($v as $kk => $vv) {
225 225
                     $new[strtoupper($kk)] = $vv;
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
                 return $new;
228 228
             })
229 229
             ->pluck('TABLE_NAME')
230
-            ->map(function ($v) {
230
+            ->map(function($v) {
231 231
                 return $this->table($v);
232 232
             })
233 233
             ->toArray();
Please login to merge, or discard this patch.