Code Duplication    Length = 21-21 lines in 2 locations

src/RunOpenCode/Backup/Destination/ReplicatedDestination.php 2 locations

@@ 56-76 (lines=21) @@
53
    /**
54
     * {@inheritdoc}
55
     */
56
    public function push(BackupInterface $backup)
57
    {
58
        $this->master->push($backup);
59
60
        try {
61
            $this->slave->push($backup);
62
        } catch (\Exception $e) {
63
64
            if ($this->atomic) {
65
                throw $e;
66
            } else {
67
                $this->getLogger()->error('Unable to backup to slave destination.', array(
68
                    'message' => $e->getMessage(),
69
                    'code' => $e->getCode(),
70
                    'file' => $e->getFile(),
71
                    'line' => $e->getLine(),
72
                    'trace' => $e->getTrace()
73
                ));
74
            }
75
        }
76
    }
77
78
    /**
79
     * {@inheritdoc}
@@ 97-117 (lines=21) @@
94
    /**
95
     * {@inheritdoc}
96
     */
97
    public function delete($name)
98
    {
99
        $this->master->delete($name);
100
101
        try {
102
            $this->slave->delete($name);
103
        } catch (\Exception $e) {
104
105
            if ($this->atomic) {
106
                throw $e;
107
            } elseif ($this->getLogger()) {
108
                $this->getLogger()->error(sprintf('Unable to delete backup "%s" from slave destination.', $name), array(
109
                    'message' => $e->getMessage(),
110
                    'code' => $e->getCode(),
111
                    'file' => $e->getFile(),
112
                    'line' => $e->getLine(),
113
                    'trace' => $e->getTrace()
114
                ));
115
            }
116
        }
117
    }
118
119
    /**
120
     * {@inheritdoc}