Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 81-90 (lines=10) @@
78
        }
79
    }
80
81
    public function resolveViewer()
82
    {
83
        if ($this->viewer !== 'inherit') {
84
            return $this->viewer;
85
        } elseif ($this->viewer == 'inherit' && $this->category) {
86
            return $this->category->resolveViewer(true);
87
        } else {
88
            return (!empty(App::$cur->ecommerce->config['defaultCategoryView']) ? App::$cur->ecommerce->config['defaultCategoryView'] : 'itemList');
89
        }
90
    }
91
92
}
93

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

@@ 136-145 (lines=10) @@
133
        }
134
    }
135
136
    public function resolveViewer()
137
    {
138
        if ($this->viewer !== 'inherit') {
139
            return $this->viewer;
140
        } elseif ($this->viewer == 'inherit' && $this->category) {
141
            return $this->category->resolveViewer(true);
142
        } else {
143
            return (!empty(\App::$cur->ecommerce->config['defaultCategoryView']) ? \App::$cur->ecommerce->config['defaultCategoryView'] : 'itemList');
144
        }
145
    }
146
147
}
148