Code Duplication    Length = 17-17 lines in 2 locations

system/modules/Callbacks/Callbacks.php 1 location

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

system/modules/Ecommerce/Ecommerce.php 1 location

@@ 300-316 (lines=17) @@
297
        return $counts;
298
    }
299
300
    public function viewsCategoryList($inherit = true)
301
    {
302
        $return = [];
303
        if ($inherit) {
304
            $return['inherit'] = 'Как у родителя';
305
        }
306
        $return['itemList'] = 'Список товаров';
307
        $conf = App::$primary->view->template->config;
308
        if (!empty($conf['files']['modules']['Ecommerce'])) {
309
            foreach ($conf['files']['modules']['Ecommerce'] as $file) {
310
                if ($file['type'] == 'Category') {
311
                    $return[$file['file']] = $file['name'];
312
                }
313
            }
314
        }
315
        return $return;
316
    }
317
318
    public function templatesCategoryList()
319
    {