Code Duplication    Length = 13-13 lines in 2 locations

app/code/community/Nexcessnet/Turpentine/Model/Varnish/Configurator/Version3.php 1 location

@@ 35-47 (lines=13) @@
32
     * @param bool $doClean if true, VCL will be cleaned (whitespaces stripped, etc.)
33
     * @return string
34
     */
35
    public function generate($doClean = true) {
36
        // first, check if a custom template is set
37
        $customTemplate = $this->_getCustomTemplateFilename();
38
        if ($customTemplate) { 
39
            $tplFile = $customTemplate;
40
        } else { 
41
            $tplFile = $this->_getVclTemplateFilename(self::VCL_TEMPLATE_FILE);
42
        }
43
        $vcl = $this->_formatTemplate(file_get_contents($tplFile),
44
            $this->_getTemplateVars());
45
        return $doClean ? $this->_cleanVcl($vcl) : $vcl;
46
    }
47
48
    protected function _getAdvancedSessionValidation() {
49
        $validation = '';
50
        foreach ($this->_getAdvancedSessionValidationTargets() as $target) {

app/code/community/Nexcessnet/Turpentine/Model/Varnish/Configurator/Version4.php 1 location

@@ 35-47 (lines=13) @@
32
     * @param bool $doClean if true, VCL will be cleaned (whitespaces stripped, etc.)
33
     * @return string
34
     */
35
    public function generate($doClean = true) {
36
        // first, check if a custom template is set
37
        $customTemplate = $this->_getCustomTemplateFilename();
38
        if ($customTemplate) { 
39
            $tplFile = $customTemplate;
40
        } else { 
41
            $tplFile = $this->_getVclTemplateFilename(self::VCL_TEMPLATE_FILE);
42
        }
43
        $vcl = $this->_formatTemplate(file_get_contents($tplFile),
44
            $this->_getTemplateVars());
45
        return $doClean ? $this->_cleanVcl($vcl) : $vcl;
46
    }
47
48
    // TODO: Check this
49
    protected function _getAdvancedSessionValidation() {
50
        $validation = '';