Code Duplication    Length = 17-17 lines in 2 locations

system/modules/Callbacks/Callbacks.php 1 location

@@ 57-73 (lines=17) @@
54
        }
55
    }
56
57
    public function viewsCategoryList($inherit = true) {
58
        $return = [];
59
        if ($inherit) {
60
            $return['inherit'] = 'Как у родителя';
61
        }
62
        $return['index'] = 'Обычная странциа';
63
        $conf = App::$primary->view->template->config;
64
        if (!empty($conf['files']['modules']['Callbacks'])) {
65
            foreach ($conf['files']['modules']['Callbacks'] as $file) {
66
                if ($file['type'] == 'Category') {
67
                    $return[$file['file']] = $file['name'];
68
                }
69
            }
70
        }
71
        return $return;
72
    }
73
74
    public function templatesCategoryList() {
75
        $return = [
76
            'inherit' => 'Как у родителя',

system/modules/Ecommerce/Ecommerce.php 1 location

@@ 231-247 (lines=17) @@
228
        return $counts;
229
    }
230
231
    public function viewsCategoryList($inherit = true) {
232
        $return = [];
233
        if ($inherit) {
234
            $return['inherit'] = 'Как у родителя';
235
        }
236
        $return['itemList'] = 'Список товаров';
237
        $conf = App::$primary->view->template->config;
238
        if (!empty($conf['files']['modules']['Ecommerce'])) {
239
            foreach ($conf['files']['modules']['Ecommerce'] as $file) {
240
                if ($file['type'] == 'Category') {
241
                    $return[$file['file']] = $file['name'];
242
                }
243
            }
244
        }
245
        return $return;
246
    }
247
248
    public function templatesCategoryList() {
249
        $return = [
250
            'inherit' => 'Как у родителя',