Code Duplication    Length = 9-12 lines in 2 locations

src/Runner/Backup.php 1 location

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

src/Runner/Simulate.php 1 location

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