Code Duplication    Length = 10-10 lines in 3 locations

system/modules/Callbacks/models/Category.php 1 location

@@ 70-79 (lines=10) @@
67
        ];
68
    }
69
70
    public function resolveTemplate()
71
    {
72
        if ($this->template !== 'inherit') {
73
            return $this->template;
74
        } elseif ($this->template == 'inherit' && $this->category) {
75
            return $this->category->resolveTemplate(true);
76
        } else {
77
            return 'current';
78
        }
79
    }
80
81
    public function resolveViewer()
82
    {

system/modules/Materials/models/Material.php 1 location

@@ 144-153 (lines=10) @@
141
        return $href . "/" . ($this->alias ? $this->alias : $this->pk());
142
    }
143
144
    public function resolveTemplate()
145
    {
146
        if ($this->template !== 'inherit') {
147
            return $this->template;
148
        } elseif ($this->template == 'inherit' && $this->category) {
149
            return $this->category->resolveTemplate(true);
150
        } else {
151
            return 'current';
152
        }
153
    }
154
155
    public function resolveViewer()
156
    {

system/modules/Ecommerce/models/Category.php 1 location

@@ 110-119 (lines=10) @@
107
        ];
108
    }
109
110
    public function resolveTemplate()
111
    {
112
        if ($this->template !== 'inherit') {
113
            return $this->template;
114
        } elseif ($this->template == 'inherit' && $this->category) {
115
            return $this->category->resolveTemplate(true);
116
        } else {
117
            return 'current';
118
        }
119
    }
120
121
    public function resolveViewer()
122
    {