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

@@ 393-408 (lines=16) @@
390
        return $return;
391
    }
392
393
    public function templatesCategoryList()
394
    {
395
        $return = [
396
            'inherit' => 'Как у родителя',
397
            'current' => 'Текущая тема'
398
        ];
399
400
        $conf = App::$primary->view->template->config;
401
402
        if (!empty($conf['files']['aditionTemplateFiels'])) {
403
            foreach ($conf['files']['aditionTemplateFiels'] as $file) {
404
                $return[$file['file']] = '- ' . $file['name'];
405
            }
406
        }
407
        return $return;
408
    }
409
410
    public function cartStatusDetector($event)
411
    {