Code Duplication    Length = 16-16 lines in 4 locations

system/modules/Callbacks/Callbacks.php 1 location

@@ 76-91 (lines=16) @@
73
        return $return;
74
    }
75
76
    public function templatesCategoryList()
77
    {
78
        $return = [
79
            'inherit' => 'Как у родителя',
80
            'current' => 'Текущая тема'
81
        ];
82
83
        $conf = App::$primary->view->template->config;
84
85
        if (!empty($conf['files']['aditionTemplateFiels'])) {
86
            foreach ($conf['files']['aditionTemplateFiels'] as $file) {
87
                $return[$file['file']] = '- ' . $file['name'];
88
            }
89
        }
90
        return $return;
91
    }
92
93
}
94

system/modules/Ecommerce/Ecommerce.php 1 location

@@ 434-449 (lines=16) @@
431
        return $return;
432
    }
433
434
    public function templatesCategoryList()
435
    {
436
        $return = [
437
            'inherit' => 'Как у родителя',
438
            'current' => 'Текущая тема'
439
        ];
440
441
        $conf = App::$primary->view->template->config;
442
443
        if (!empty($conf['files']['aditionTemplateFiels'])) {
444
            foreach ($conf['files']['aditionTemplateFiels'] as $file) {
445
                $return[$file['file']] = '- ' . $file['name'];
446
            }
447
        }
448
        return $return;
449
    }
450
451
    public function cartStatusDetector($event)
452
    {

system/modules/Materials/Materials.php 2 locations

@@ 33-48 (lines=16) @@
30
        return $return;
31
    }
32
33
    public function templatesList()
34
    {
35
        $return = [
36
            'inherit' => 'Как у родителя',
37
            'current' => 'Текущая тема'
38
        ];
39
40
        $conf = App::$primary->view->template->config;
41
42
        if (!empty($conf['files']['aditionTemplateFiels'])) {
43
            foreach ($conf['files']['aditionTemplateFiels'] as $file) {
44
                $return[$file['file']] = '- ' . $file['name'];
45
            }
46
        }
47
        return $return;
48
    }
49
50
    public function viewsCategoryList()
51
    {
@@ 69-84 (lines=16) @@
66
        return $return;
67
    }
68
69
    public function templatesCategoryList()
70
    {
71
        $return = [
72
            'inherit' => 'Как у родителя',
73
            'current' => 'Текущая тема'
74
        ];
75
76
        $conf = App::$primary->view->template->config;
77
78
        if (!empty($conf['files']['aditionTemplateFiels'])) {
79
            foreach ($conf['files']['aditionTemplateFiels'] as $file) {
80
                $return[$file['file']] = '- ' . $file['name'];
81
            }
82
        }
83
        return $return;
84
    }
85
86
    function sitemap()
87
    {