Code Duplication    Length = 14-16 lines in 2 locations

src/Phinx/Db/Adapter/MysqlAdapter.php 2 locations

@@ 1094-1109 (lines=16) @@
1091
     * @param string $tableName Table name
1092
     * @return array
1093
     */
1094
    public function describeTable($tableName)
1095
    {
1096
        $options = $this->getOptions();
1097
1098
        // mysql specific
1099
        $sql = sprintf(
1100
            "SELECT *
1101
             FROM information_schema.tables
1102
             WHERE table_schema = '%s'
1103
             AND table_name = '%s'",
1104
            $options['name'],
1105
            $tableName
1106
        );
1107
1108
        return $this->fetchRow($sql);
1109
    }
1110
1111
    /**
1112
     * Returns MySQL column types (inherited and MySQL specified).
@@ 188-201 (lines=14) @@
185
    /**
186
     * {@inheritdoc}
187
     */
188
    public function hasTable($tableName)
189
    {
190
        $options = $this->getOptions();
191
192
        $exists = $this->fetchRow(sprintf(
193
            "SELECT TABLE_NAME
194
            FROM INFORMATION_SCHEMA.TABLES
195
            WHERE TABLE_SCHEMA = '%s' AND TABLE_NAME = '%s'",
196
            $options['name'],
197
            $tableName
198
        ));
199
200
        return !empty($exists);
201
    }
202
203
    /**
204
     * {@inheritdoc}