Code Duplication    Length = 9-11 lines in 2 locations

src/Ifsnop/Mysqldump/Mysqldump.php 2 locations

@@ 1053-1063 (lines=11) @@
1050
     * @param string $c
1051
     * @return CompressBzip2|CompressGzip|CompressNone
1052
     */
1053
    public static function create($c)
1054
    {
1055
        $c = ucfirst(strtolower($c));
1056
        if (! CompressMethod::isValid($c)) {
1057
            throw new Exception("Compression method ($c) is not defined yet");
1058
        }
1059
1060
        $method =  __NAMESPACE__ . "\\" . "Compress" . $c;
1061
1062
        return new $method;
1063
    }
1064
}
1065
1066
class CompressBzip2 extends CompressManagerFactory
@@ 1207-1215 (lines=9) @@
1204
     * @param string $c Type of database factory to create (Mysql, Sqlite,...)
1205
     * @param PDO $dbHandler
1206
     */
1207
    public static function create($c, $dbHandler = null, $dumpSettings = array())
1208
    {
1209
        $c = ucfirst(strtolower($c));
1210
        if (! TypeAdapter::isValid($c)) {
1211
            throw new Exception("Database type support for ($c) not yet available");
1212
        }
1213
        $method =  __NAMESPACE__ . "\\" . "TypeAdapter" . $c;
1214
        return new $method($dbHandler, $dumpSettings);
1215
    }
1216
1217
    public function __construct($dbHandler = null, $dumpSettings = array())
1218
    {