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

@@ 331-347 (lines=17) @@
328
        return $counts;
329
    }
330
331
    public function viewsCategoryList($inherit = true) {
332
        $return = [];
333
        if ($inherit) {
334
            $return['inherit'] = 'Как у родителя';
335
        }
336
        $return['itemList'] = 'Список товаров';
337
        $conf = App::$primary->view->template->config;
338
        if (!empty($conf['files']['modules']['Ecommerce'])) {
339
            foreach ($conf['files']['modules']['Ecommerce'] as $file) {
340
                if ($file['type'] == 'Category') {
341
                    $return[$file['file']] = $file['name'];
342
                }
343
            }
344
        }
345
        return $return;
346
    }
347
348
    public function templatesCategoryList() {
349
        $return = [
350
            'inherit' => 'Как у родителя',