Code Duplication    Length = 9-12 lines in 2 locations

src/Runner/Backup.php 1 location

@@ 120-128 (lines=9) @@
117
     * @param  \phpbu\App\Backup\Target        $target
118
     * @throws \Exception
119
     */
120
    protected function executeSource(Configuration\Backup $conf, Target $target)
121
    {
122
        $this->result->backupStart($conf);
123
        $source = $this->factory->createSource($conf->getSource()->type, $conf->getSource()->options);
124
        $status = $source->backup($target, $this->result);
125
        $this->compress($status, $target, $this->result);
126
        $this->result->backupEnd($conf);
127
    }
128
129
    /**
130
     * Execute checks.
131
     *

src/Runner/Simulate.php 1 location

@@ 69-80 (lines=12) @@
66
     * @param  \phpbu\App\Backup\Target        $target
67
     * @throws \Exception
68
     */
69
    protected function simulateSource(Configuration\Backup $conf, Target $target)
70
    {
71
        $this->result->backupStart($conf);
72
        $source = $this->factory->createSource($conf->getSource()->type, $conf->getSource()->options);
73
74
        if ($source instanceof Source\Simulator) {
75
            $status = $source->simulate($target, $this->result);
76
            $this->compress($status, $target, $this->result);
77
        }
78
        $this->result->backupEnd($conf);
79
    }
80
81
    /**
82
     * Simulate checks.
83
     *