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
}
86

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

@@ 318-333 (lines=16) @@
315
        return $return;
316
    }
317
318
    public function templatesCategoryList()
319
    {
320
        $return = [
321
            'inherit' => 'Как у родителя',
322
            'current' => 'Текущая тема'
323
        ];
324
325
        $conf = App::$primary->view->template->config;
326
327
        if (!empty($conf['files']['aditionTemplateFiels'])) {
328
            foreach ($conf['files']['aditionTemplateFiels'] as $file) {
329
                $return[$file['file']] = '- ' . $file['name'];
330
            }
331
        }
332
        return $return;
333
    }
334
335
    public function cartStatusDetector($event)
336
    {