Code Duplication    Length = 9-11 lines in 2 locations

src/Ifsnop/Mysqldump/Mysqldump.php 2 locations

@@ 997-1007 (lines=11) @@
994
     * @param string $c
995
     * @return CompressBzip2|CompressGzip|CompressNone
996
     */
997
    public static function create($c)
998
    {
999
        $c = ucfirst(strtolower($c));
1000
        if (! CompressMethod::isValid($c)) {
1001
            throw new Exception("Compression method ($c) is not defined yet");
1002
        }
1003
1004
        $method =  __NAMESPACE__ . "\\" . "Compress" . $c;
1005
1006
        return new $method;
1007
    }
1008
}
1009
1010
class CompressBzip2 extends CompressManagerFactory
@@ 1148-1156 (lines=9) @@
1145
     * @param string $c Type of database factory to create (Mysql, Sqlite,...)
1146
     * @param PDO $dbHandler
1147
     */
1148
    public static function create($c, $dbHandler = null)
1149
    {
1150
        $c = ucfirst(strtolower($c));
1151
        if (! TypeAdapter::isValid($c)) {
1152
            throw new Exception("Database type support for ($c) not yet available");
1153
        }
1154
        $method =  __NAMESPACE__ . "\\" . "TypeAdapter" . $c;
1155
        return new $method($dbHandler);
1156
    }
1157
1158
    /**
1159
     * function databases Add sql to create and use database