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

@@ 375-391 (lines=17) @@
372
        return $counts;
373
    }
374
375
    public function viewsCategoryList($inherit = true)
376
    {
377
        $return = [];
378
        if ($inherit) {
379
            $return['inherit'] = 'Как у родителя';
380
        }
381
        $return['itemList'] = 'Список товаров';
382
        $conf = App::$primary->view->template->config;
383
        if (!empty($conf['files']['modules']['Ecommerce'])) {
384
            foreach ($conf['files']['modules']['Ecommerce'] as $file) {
385
                if ($file['type'] == 'Category') {
386
                    $return[$file['file']] = $file['name'];
387
                }
388
            }
389
        }
390
        return $return;
391
    }
392
393
    public function templatesCategoryList()
394
    {