Code Duplication    Length = 16-16 lines in 4 locations

system/modules/Materials/Materials.php 2 locations

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

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

@@ 425-440 (lines=16) @@
422
        return $return;
423
    }
424
425
    public function templatesCategoryList()
426
    {
427
        $return = [
428
            'inherit' => 'Как у родителя',
429
            'current' => 'Текущая тема'
430
        ];
431
432
        $conf = App::$primary->view->template->config;
433
434
        if (!empty($conf['files']['aditionTemplateFiels'])) {
435
            foreach ($conf['files']['aditionTemplateFiels'] as $file) {
436
                $return[$file['file']] = '- ' . $file['name'];
437
            }
438
        }
439
        return $return;
440
    }
441
442
    public function cartStatusDetector($event)
443
    {