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

@@ 363-379 (lines=17) @@
360
        return $counts;
361
    }
362
363
    public function viewsCategoryList($inherit = true) {
364
        $return = [];
365
        if ($inherit) {
366
            $return['inherit'] = 'Как у родителя';
367
        }
368
        $return['itemList'] = 'Список товаров';
369
        $conf = App::$primary->view->template->config;
370
        if (!empty($conf['files']['modules']['Ecommerce'])) {
371
            foreach ($conf['files']['modules']['Ecommerce'] as $file) {
372
                if ($file['type'] == 'Category') {
373
                    $return[$file['file']] = $file['name'];
374
                }
375
            }
376
        }
377
        return $return;
378
    }
379
380
    public function templatesCategoryList() {
381
        $return = [
382
            'inherit' => 'Как у родителя',