Passed
Branch master (95ff30)
by P.R.
04:33
created
src/MySql/Metadata/ColumnMetadata.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
     {
103 103
       $parts[] = 'default '.$this->getProperty('column_default');
104 104
     }
105
-    elseif($this->getProperty('column_type')=='timestamp')
105
+    elseif ($this->getProperty('column_type')=='timestamp')
106 106
     {
107 107
       // Prevent automatic updates of timestamp columns.
108 108
       $parts[] = 'default now()';
Please login to merge, or discard this patch.
src/MySql/Audit.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
       {
177 177
         $this->io->writeln(sprintf('<info>Found new table %s</info>', $table['table_name']));
178 178
         $this->config['tables'][$table['table_name']] = ['audit' => null,
179
-                                                         'alias' => null,
180
-                                                         'skip'  => null];
179
+                                                          'alias' => null,
180
+                                                          'skip'  => null];
181 181
       }
182 182
     }
183 183
   }
@@ -244,11 +244,11 @@  discard block
 block discarded – undo
244 244
         $configTable = new TableMetadata($metadata, $tableColumns);
245 245
 
246 246
         $currentTable = new AuditTable($this->io,
247
-                                       $configTable,
248
-                                       $this->config['database']['audit_schema'],
249
-                                       $this->auditColumnsMetadata,
250
-                                       $this->config['tables'][$table['table_name']]['alias'],
251
-                                       $this->config['tables'][$table['table_name']]['skip']);
247
+                                        $configTable,
248
+                                        $this->config['database']['audit_schema'],
249
+                                        $this->auditColumnsMetadata,
250
+                                        $this->config['tables'][$table['table_name']]['alias'],
251
+                                        $this->config['tables'][$table['table_name']]['skip']);
252 252
 
253 253
         // Ensure the audit table exists.
254 254
         if (AuditDataLayer::searchInRowSet('table_name', $table['table_name'], $this->auditSchemaTables)===null)
@@ -275,11 +275,11 @@  discard block
 block discarded – undo
275 275
         $configTable = new TableMetadata($metadata, []);
276 276
 
277 277
         $currentTable = new AuditTable($this->io,
278
-                                       $configTable,
279
-                                       $this->config['database']['audit_schema'],
280
-                                       $this->auditColumnsMetadata,
281
-                                       '',
282
-                                       '');
278
+                                        $configTable,
279
+                                        $this->config['database']['audit_schema'],
280
+                                        $this->auditColumnsMetadata,
281
+                                        '',
282
+                                        '');
283 283
 
284 284
         $currentTable->dropAuditTriggers($this->config['database']['data_schema'], $table['table_name']);
285 285
       }
Please login to merge, or discard this patch.
src/MySql/AuditTable.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
   public function createAuditTable()
109 109
   {
110 110
     $this->io->logInfo('Creating audit table <dbo>%s.%s<dbo>',
111
-                       $this->auditSchemaName,
112
-                       $this->configTable->getTableName());
111
+                        $this->auditSchemaName,
112
+                        $this->configTable->getTableName());
113 113
 
114 114
     // In the audit table all columns from the data table must be nullable.
115 115
     $dataTableColumnsDatabase = clone($this->dataTableColumnsDatabase);
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 
118 118
     $columns = TableColumnsMetadata::combine($this->auditColumns, $dataTableColumnsDatabase);
119 119
     AuditDataLayer::createAuditTable($this->configTable->getSchemaName(),
120
-                                     $this->auditSchemaName,
121
-                                     $this->configTable->getTableName(),
122
-                                     $columns);
120
+                                      $this->auditSchemaName,
121
+                                      $this->configTable->getTableName(),
122
+                                      $columns);
123 123
   }
124 124
 
125 125
   //--------------------------------------------------------------------------------------------------------------------
@@ -266,14 +266,14 @@  discard block
 block discarded – undo
266 266
                           $this->configTable->getTableName());
267 267
 
268 268
     AuditDataLayer::createAuditTrigger($this->configTable->getSchemaName(),
269
-                                       $this->auditSchemaName,
270
-                                       $this->configTable->getTableName(),
271
-                                       $triggerName,
272
-                                       $action,
273
-                                       $this->auditColumns,
274
-                                       $this->dataTableColumnsDatabase,
275
-                                       $skipVariable,
276
-                                       $additionSql);
269
+                                        $this->auditSchemaName,
270
+                                        $this->configTable->getTableName(),
271
+                                        $triggerName,
272
+                                        $action,
273
+                                        $this->auditColumns,
274
+                                        $this->dataTableColumnsDatabase,
275
+                                        $skipVariable,
276
+                                        $additionSql);
277 277
   }
278 278
 
279 279
   //--------------------------------------------------------------------------------------------------------------------
@@ -372,23 +372,23 @@  discard block
 block discarded – undo
372 372
     foreach ($newColumns->getColumns() as $column)
373 373
     {
374 374
       $this->io->logInfo('New column <dbo>%s.%s</dbo>',
375
-                         $this->configTable->getTableName(),
376
-                         $column->getName());
375
+                          $this->configTable->getTableName(),
376
+                          $column->getName());
377 377
     }
378 378
 
379 379
     foreach ($obsoleteColumns->getColumns() as $column)
380 380
     {
381 381
       $this->io->logInfo('Obsolete column <dbo>%s.%s</dbo>',
382
-                         $this->configTable->getTableName(),
383
-                         $column->getName());
382
+                          $this->configTable->getTableName(),
383
+                          $column->getName());
384 384
     }
385 385
 
386 386
     foreach ($alteredColumns->getColumns() as $column)
387 387
     {
388 388
       $this->io->logInfo('Type of <dbo>%s.%s</dbo> has been altered to <dbo>%s</dbo>',
389
-                         $this->configTable->getTableName(),
390
-                         $column->getName(),
391
-                         $column->getProperty('column_type'));
389
+                          $this->configTable->getTableName(),
390
+                          $column->getName(),
391
+                          $column->getProperty('column_type'));
392 392
     }
393 393
   }
394 394
 
Please login to merge, or discard this patch.
src/MySql/AlterAuditTable.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
       $maxLength = $diff->getLongestColumnNameLength();
102 102
 
103 103
       $this->codeStore->append(sprintf('alter table `%s`.`%s`',
104
-                                       $this->config['database']['audit_schema'],
105
-                                       $auditTable->getTableName()));
104
+                                        $this->config['database']['audit_schema'],
105
+                                        $auditTable->getTableName()));
106 106
 
107 107
       $first = true;
108 108
       foreach ($diff->getColumns() as $column)
@@ -113,11 +113,11 @@  discard block
 block discarded – undo
113 113
         if (!$first) $this->codeStore->appendToLastLine(',');
114 114
 
115 115
         $this->codeStore->append(sprintf('change column `%s`%s`%s`%s%s',
116
-                                         $name,
117
-                                         $filler,
118
-                                         $name,
119
-                                         $filler,
120
-                                         $column->getColumnDefinition()));
116
+                                          $name,
117
+                                          $filler,
118
+                                          $name,
119
+                                          $filler,
120
+                                          $column->getColumnDefinition()));
121 121
 
122 122
         $first = false;
123 123
       }
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
       }
164 164
 
165 165
       $this->codeStore->append(sprintf('alter table `%s`.`%s` %s;',
166
-                                       $this->config['database']['audit_schema'],
167
-                                       $auditTable->getTableName(),
168
-                                       implode(' ', $parts)));
166
+                                        $this->config['database']['audit_schema'],
167
+                                        $auditTable->getTableName(),
168
+                                        implode(' ', $parts)));
169 169
       $this->codeStore->append('');
170 170
     }
171 171
   }
Please login to merge, or discard this patch.