@@ -188,7 +188,7 @@ |
||
188 | 188 | { |
189 | 189 | $statements = []; |
190 | 190 | foreach ($modificationsBetweenTable as $modifications) { |
191 | - foreach ((array)$modifications as $modification) { |
|
191 | + foreach ((array) $modifications as $modification) { |
|
192 | 192 | $statements[] = $modification; |
193 | 193 | } |
194 | 194 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | if (isset($row['collate'])) { |
55 | 55 | $table->setCollate($dataTable['collate']); |
56 | 56 | } |
57 | - foreach ((array)$dataTable['columns'] as $columnName => $row) { |
|
57 | + foreach ((array) $dataTable['columns'] as $columnName => $row) { |
|
58 | 58 | $column = new MysqlDatabaseColumn($columnName, $row['type'], $row['length'], $row['nullable'], $row['defaultValue'], $row['extra']); |
59 | 59 | if (isset($row['collate'])) { |
60 | 60 | $column->setCollate($row['collate']); |
@@ -62,13 +62,13 @@ discard block |
||
62 | 62 | $table->addColumn($column); |
63 | 63 | |
64 | 64 | } |
65 | - foreach ((array)$dataTable['indexes'] as $row) { |
|
65 | + foreach ((array) $dataTable['indexes'] as $row) { |
|
66 | 66 | $table->addIndex($row['columns'], $row['name']); |
67 | 67 | } |
68 | 68 | if (isset($dataTable['primary'])) { |
69 | - $table->addPrimary((array)$dataTable['primary']); |
|
69 | + $table->addPrimary((array) $dataTable['primary']); |
|
70 | 70 | } |
71 | - foreach ((array)$dataTable['uniques'] as $row) { |
|
71 | + foreach ((array) $dataTable['uniques'] as $row) { |
|
72 | 72 | $table->addUnique($row['columns'], $row['name']); |
73 | 73 | } |
74 | 74 | $tables[] = $table; |
@@ -128,11 +128,11 @@ discard block |
||
128 | 128 | $export = []; |
129 | 129 | foreach ($data as $nomTable => $table) { |
130 | 130 | $dataTable = $resolverTable->resolve($table); |
131 | - foreach ((array)$dataTable['columns'] as $columnName => $column) { |
|
131 | + foreach ((array) $dataTable['columns'] as $columnName => $column) { |
|
132 | 132 | $dataTable['columns'][$columnName] = $resolverColumns->resolve($column); |
133 | 133 | } |
134 | 134 | foreach (['indexes', 'uniques'] as $indexKey) { |
135 | - foreach ((array)$dataTable[$indexKey] as $keyIndex => $index) { |
|
135 | + foreach ((array) $dataTable[$indexKey] as $keyIndex => $index) { |
|
136 | 136 | $dataTable[$indexKey][$keyIndex] = $resolverIndex->resolve($index); |
137 | 137 | } |
138 | 138 | } |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | { |
195 | 195 | $statements = []; |
196 | 196 | foreach ($modificationsBetweenTable as $modifications) { |
197 | - foreach ((array)$modifications as $modification) { |
|
197 | + foreach ((array) $modifications as $modification) { |
|
198 | 198 | $statements[] = $modification; |
199 | 199 | } |
200 | 200 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | } |
210 | 210 | $tmp = []; |
211 | 211 | foreach ($modifications as $modification) { |
212 | - $tmp[] = trim(str_replace(['ALTER TABLE `' . $this->getTable() . '` ADD COLUMN', 'ALTER TABLE `' . $this->getTable() . '` ADD ', ';',], '', $modification)); |
|
212 | + $tmp[] = trim(str_replace(['ALTER TABLE `' . $this->getTable() . '` ADD COLUMN', 'ALTER TABLE `' . $this->getTable() . '` ADD ', ';', ], '', $modification)); |
|
213 | 213 | } |
214 | 214 | $collate = $this->getCollate() == '' ? '' : sprintf("COLLATE='%s'", $this->getCollate()); |
215 | 215 |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | { |
75 | 75 | $isEnum = explode('enum', $this->type); |
76 | 76 | if (!empty($isEnum)) { |
77 | - $numberElements = substr_count(str_replace(['(', ')', "'",], '', $isEnum[1]), ',') + 1; |
|
77 | + $numberElements = substr_count(str_replace(['(', ')', "'", ], '', $isEnum[1]), ',') + 1; |
|
78 | 78 | if ($numberElements == 2) { |
79 | 79 | $this->type = 'tinyint'; |
80 | 80 | $this->length = 1; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $collate = $this->getCollate() == '' ? '' : sprintf("COLLATE '%s'", $this->getCollate()); |
107 | 107 | $modification = sprintf('ALTER TABLE `%s` ADD COLUMN `%s` %s %s NULL %s %s %s;', $this->getTable(), $this->getName(), $this->getColonneType(), $null, $default, $this->getExtra(), $collate); |
108 | 108 | |
109 | - return [str_replace([' ', ' ',], ' ', $modification)]; |
|
109 | + return [str_replace([' ', ' ', ], ' ', $modification)]; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
@@ -180,6 +180,6 @@ discard block |
||
180 | 180 | $collate = $this->getCollate() == '' ? '' : sprintf("COLLATE '%s'", $this->getCollate()); |
181 | 181 | $modification = sprintf('ALTER TABLE `%s` CHANGE COLUMN %s %s %s %s NULL %s %s %s;', $this->getTable(), $columnName, $columnName, $this->getColonneType(), $null, $default, $this->getExtra(), $collate); |
182 | 182 | |
183 | - return [str_replace([' ', ' ',], ' ', $modification)]; |
|
183 | + return [str_replace([' ', ' ', ], ' ', $modification)]; |
|
184 | 184 | } |
185 | 185 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | public function log($level, $message, array $context = []) |
20 | 20 | { |
21 | - if($this->logger){ |
|
21 | + if ($this->logger) { |
|
22 | 22 | $this->logger->log($level, $message, $context); |
23 | 23 | } |
24 | 24 | } |