Code Duplication    Length = 22-22 lines in 2 locations

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

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