Code Duplication    Length = 8-8 lines in 2 locations

src/MySql/Sql/CreateAuditTable.php 1 location

@@ 88-95 (lines=8) @@
85
86
    // Create SQL for columns.
87
    $code->append('(');
88
    foreach ($columns as $column)
89
    {
90
      $code->append(sprintf($format, '`'.$column['column_name'].'`', $column['column_type']), false);
91
      if (end($columns)!==$column)
92
      {
93
        $code->appendToLastLine(',');
94
      }
95
    }
96
97
    // Create SQL for table options.
98
    $tableOptions = DataLayer::getTableOptions($this->dataSchemaName, $this->tableName);

src/MySql/DataLayer.php 1 location

@@ 309-316 (lines=8) @@
306
  {
307
    $sql = new CompoundSyntaxStore();
308
    $sql->append(sprintf('create temporary table `%s`.`%s` (', $schemaName, $tableName));
309
    foreach ($auditColumns as $column)
310
    {
311
      $sql->append(sprintf('%s %s', $column['column_name'], $column['column_type']));
312
      if (end($auditColumns)!==$column)
313
      {
314
        $sql->appendToLastLine(',');
315
      }
316
    }
317
    $sql->append(')');
318
319
    self::$dl->executeNone($sql->getCode());