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

@@ 375-390 (lines=16) @@
372
        return $return;
373
    }
374
375
    public function templatesCategoryList()
376
    {
377
        $return = [
378
            'inherit' => 'Как у родителя',
379
            'current' => 'Текущая тема'
380
        ];
381
382
        $conf = App::$primary->view->template->config;
383
384
        if (!empty($conf['files']['aditionTemplateFiels'])) {
385
            foreach ($conf['files']['aditionTemplateFiels'] as $file) {
386
                $return[$file['file']] = '- ' . $file['name'];
387
            }
388
        }
389
        return $return;
390
    }
391
392
    public function cartStatusDetector($event)
393
    {