Code Duplication    Length = 5-5 lines in 2 locations

src/Charcoal/Source/DatabaseSource.php 2 locations

@@ 245-249 (lines=5) @@
242
        $dbh    = $this->db();
243
        $table  = $this->table();
244
        $driver = $dbh->getAttribute(PDO::ATTR_DRIVER_NAME);
245
        if ($driver === self::SQLITE_DRIVER_NAME) {
246
            $query = 'SELECT name FROM sqlite_master WHERE type = "table" AND name = "'.$table.'";';
247
        } else {
248
            $query = 'SHOW TABLES LIKE "'.$table.'"';
249
        }
250
251
        $this->logger->debug($query);
252
        $sth    = $dbh->query($query);
@@ 268-272 (lines=5) @@
265
        $dbh    = $this->db();
266
        $table  = $this->table();
267
        $driver = $dbh->getAttribute(PDO::ATTR_DRIVER_NAME);
268
        if ($driver === self::SQLITE_DRIVER_NAME) {
269
            $query = 'PRAGMA table_info("'.$table.'") ';
270
        } else {
271
            $query = 'SHOW COLUMNS FROM `'.$table.'`';
272
        }
273
274
        $this->logger->debug($query);
275
        $sth = $dbh->query($query);