Code Duplication    Length = 9-9 lines in 2 locations

src/Log/ResultFormatter/Template.php 2 locations

@@ 81-89 (lines=9) @@
78
     *
79
     * @param \phpbu\App\Result $result
80
     */
81
    private function handleErrors(Result $result)
82
    {
83
        $errorTpl = $this->extractSubTemplate($this->template, 'error');
84
85
        if (!empty($errorTpl)) {
86
            $errorLoopMarkup = $this->renderErrors($errorTpl, $result->getErrors());
87
            $this->renderLoop('error', $errorLoopMarkup);
88
        }
89
    }
90
91
    /**
92
     * Handles backup sub template rendreing if necessary.
@@ 97-105 (lines=9) @@
94
     *
95
     * @param \phpbu\App\Result $result
96
     */
97
    private function handleBackups(Result $result)
98
    {
99
        $backupTpl = $this->extractSubTemplate($this->template, 'backup');
100
101
        if (!empty($backupTpl)) {
102
            $backupLoopMarkup = $this->renderBackups($backupTpl, $result->getBackups());
103
            $this->renderLoop('backup', $backupLoopMarkup);
104
        }
105
    }
106
107
    /**
108
     * Extract loop template.