@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $database = $dbal->database($this->option('database')); |
45 | 45 | $schema = $database->table($this->argument('table'))->getSchema(); |
46 | 46 | |
47 | - if (!$schema->exists()) { |
|
47 | + if (!$schema->exists()){ |
|
48 | 48 | throw new DBALException( |
49 | 49 | "Table {$database->getName()}.{$this->argument('table')} does not exists." |
50 | 50 | ); |
@@ -58,11 +58,11 @@ discard block |
||
58 | 58 | |
59 | 59 | $this->describeColumns($schema); |
60 | 60 | |
61 | - if (!empty($indexes = $schema->getIndexes())) { |
|
61 | + if (!empty($indexes = $schema->getIndexes())){ |
|
62 | 62 | $this->describeIndexes($database, $indexes); |
63 | 63 | } |
64 | 64 | |
65 | - if (!empty($foreignKeys = $schema->getForeignKeys())) { |
|
65 | + if (!empty($foreignKeys = $schema->getForeignKeys())){ |
|
66 | 66 | $this->describeForeignKeys($database, $foreignKeys); |
67 | 67 | } |
68 | 68 | |
@@ -84,10 +84,10 @@ discard block |
||
84 | 84 | ] |
85 | 85 | ); |
86 | 86 | |
87 | - foreach ($schema->getColumns() as $column) { |
|
87 | + foreach ($schema->getColumns() as $column){ |
|
88 | 88 | $name = $column->getName(); |
89 | 89 | |
90 | - if (in_array($column->getName(), $schema->getPrimaryKeys(), true)) { |
|
90 | + if (in_array($column->getName(), $schema->getPrimaryKeys(), true)){ |
|
91 | 91 | $name = "<fg=magenta>{$name}</fg=magenta>"; |
92 | 92 | } |
93 | 93 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | ); |
121 | 121 | |
122 | 122 | $indexesTable = $this->table(['Name:', 'Type:', 'Columns:']); |
123 | - foreach ($indexes as $index) { |
|
123 | + foreach ($indexes as $index){ |
|
124 | 124 | $indexesTable->addRow( |
125 | 125 | [ |
126 | 126 | $index->getName(), |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | ] |
156 | 156 | ); |
157 | 157 | |
158 | - foreach ($foreignKeys as $reference) { |
|
158 | + foreach ($foreignKeys as $reference){ |
|
159 | 159 | $foreignTable->addRow( |
160 | 160 | [ |
161 | 161 | $reference->getName(), |
@@ -180,13 +180,13 @@ discard block |
||
180 | 180 | { |
181 | 181 | $defaultValue = $column->getDefaultValue(); |
182 | 182 | |
183 | - if ($defaultValue instanceof FragmentInterface) { |
|
183 | + if ($defaultValue instanceof FragmentInterface){ |
|
184 | 184 | $value = $driver->getQueryCompiler()->compile(new QueryParameters(), '', $defaultValue); |
185 | 185 | |
186 | 186 | return "<info>{$value}</info>"; |
187 | 187 | } |
188 | 188 | |
189 | - if ($defaultValue instanceof \DateTimeInterface) { |
|
189 | + if ($defaultValue instanceof \DateTimeInterface){ |
|
190 | 190 | $defaultValue = $defaultValue->format('c'); |
191 | 191 | } |
192 | 192 | |
@@ -203,11 +203,11 @@ discard block |
||
203 | 203 | |
204 | 204 | $abstractType = $column->getAbstractType(); |
205 | 205 | |
206 | - if ($column->getSize()) { |
|
206 | + if ($column->getSize()){ |
|
207 | 207 | $type .= " ({$column->getSize()})"; |
208 | 208 | } |
209 | 209 | |
210 | - if ($abstractType === 'decimal') { |
|
210 | + if ($abstractType === 'decimal'){ |
|
211 | 211 | $type .= " ({$column->getPrecision()}, {$column->getScale()})"; |
212 | 212 | } |
213 | 213 | |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | { |
223 | 223 | $abstractType = $column->getAbstractType(); |
224 | 224 | |
225 | - if (in_array($abstractType, ['primary', 'bigPrimary'])) { |
|
225 | + if (in_array($abstractType, ['primary', 'bigPrimary'])){ |
|
226 | 226 | $abstractType = "<fg=magenta>{$abstractType}</fg=magenta>"; |
227 | 227 | } |
228 | 228 |