Code Duplication    Length = 9-9 lines in 2 locations

src/DBBackupFile.php 2 locations

@@ 57-65 (lines=9) @@
54
        return $this->path;
55
    }
56
57
    public function move(string $destination) : BackupFile
58
    {
59
        if (!@rename($this->path, $destination)) {
60
            $error = error_get_last();
61
            $message = strip_tags($error['message']);
62
            throw new Exception("The backup file cannot be moved [{$message}]");
63
        }
64
        return new DBBackupFile($destination);
65
    }
66
67
    public function copy(string $destination) : BackupFile
68
    {
@@ 67-75 (lines=9) @@
64
        return new DBBackupFile($destination);
65
    }
66
67
    public function copy(string $destination) : BackupFile
68
    {
69
        if (!@copy($this->path, $destination)) {
70
            $error = error_get_last();
71
            $message = strip_tags($error['message']);
72
            throw new Exception("The backup file cannot be copied [{$message}]");
73
        } 
74
        return new DBBackupFile($destination);
75
    }
76
} // END class BasicBackupFileNameGenerator