Code Duplication    Length = 9-11 lines in 2 locations

src/Ifsnop/Mysqldump/Mysqldump.php 2 locations

@@ 1066-1076 (lines=11) @@
1063
     * @param string $c
1064
     * @return CompressBzip2|CompressGzip|CompressNone
1065
     */
1066
    public static function create($c)
1067
    {
1068
        $c = ucfirst(strtolower($c));
1069
        if (! CompressMethod::isValid($c)) {
1070
            throw new Exception("Compression method ($c) is not defined yet");
1071
        }
1072
1073
        $method =  __NAMESPACE__ . "\\" . "Compress" . $c;
1074
1075
        return new $method;
1076
    }
1077
}
1078
1079
class CompressBzip2 extends CompressManagerFactory
@@ 1217-1225 (lines=9) @@
1214
     * @param string $c Type of database factory to create (Mysql, Sqlite,...)
1215
     * @param PDO $dbHandler
1216
     */
1217
    public static function create($c, $dbHandler = null)
1218
    {
1219
        $c = ucfirst(strtolower($c));
1220
        if (! TypeAdapter::isValid($c)) {
1221
            throw new Exception("Database type support for ($c) not yet available");
1222
        }
1223
        $method =  __NAMESPACE__ . "\\" . "TypeAdapter" . $c;
1224
        return new $method($dbHandler);
1225
    }
1226
1227
    /**
1228
     * function databases Add sql to create and use database