Code Duplication    Length = 9-11 lines in 2 locations

src/Ifsnop/Mysqldump/Mysqldump.php 2 locations

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