Code Duplication    Length = 9-11 lines in 2 locations

src/Ifsnop/Mysqldump/Mysqldump.php 2 locations

@@ 1059-1069 (lines=11) @@
1056
     * @param string $c
1057
     * @return CompressBzip2|CompressGzip|CompressNone
1058
     */
1059
    public static function create($c)
1060
    {
1061
        $c = ucfirst(strtolower($c));
1062
        if (! CompressMethod::isValid($c)) {
1063
            throw new Exception("Compression method ($c) is not defined yet");
1064
        }
1065
1066
        $method =  __NAMESPACE__ . "\\" . "Compress" . $c;
1067
1068
        return new $method;
1069
    }
1070
}
1071
1072
class CompressBzip2 extends CompressManagerFactory
@@ 1210-1218 (lines=9) @@
1207
     * @param string $c Type of database factory to create (Mysql, Sqlite,...)
1208
     * @param PDO $dbHandler
1209
     */
1210
    public static function create($c, $dbHandler = null)
1211
    {
1212
        $c = ucfirst(strtolower($c));
1213
        if (! TypeAdapter::isValid($c)) {
1214
            throw new Exception("Database type support for ($c) not yet available");
1215
        }
1216
        $method =  __NAMESPACE__ . "\\" . "TypeAdapter" . $c;
1217
        return new $method($dbHandler);
1218
    }
1219
1220
    /**
1221
     * function databases Add sql to create and use database