Code Duplication    Length = 10-10 lines in 2 locations

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

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

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

@@ 153-162 (lines=10) @@
150
        return $href . "/" . ($this->alias ? $this->alias : $this->pk());
151
    }
152
153
    public function resolveTemplate() {
154
        if ($this->template !== 'inherit') {
155
            return $this->template;
156
        } elseif ($this->template == 'inherit' && $this->category) {
157
            return $this->category->resolveTemplate(true);
158
        } else {
159
            return 'current';
160
        }
161
    }
162
163
    public function resolveViewer() {
164
        if ($this->viewer !== 'inherit') {
165
            return $this->viewer;