Code Duplication    Length = 5-5 lines in 3 locations

src/Eccube/Controller/Admin/Setting/System/SecurityController.php 2 locations

@@ 55-59 (lines=5) @@
52
                $adminRoot = $app['config']['admin_route'];
53
54
                $configFile = $app['config']['root_dir'].'/app/config/eccube/config';
55
                if (file_exists($configFile.'.php')) {
56
                    $config = require $configFile.'.php';
57
                } elseif (file_exists($configFile.'.yml')) {
58
                    $config = Yaml::parse(file_get_contents($configFile.'.yml'));
59
                }
60
61
                // trim処理
62
                $allowHost = Str::convertLineFeed($data['admin_allow_host']);
@@ 96-100 (lines=5) @@
93
                    // admin_routeが変更されればpath.(yml|php)を更新
94
                    $pathFile = $app['config']['root_dir'].'/app/config/eccube/path';
95
96
                    if (file_exists($pathFile.'.php')) {
97
                        $config = require $pathFile.'.php';
98
                    } elseif (file_exists($pathFile.'.yml')) {
99
                        $config = Yaml::parse(file_get_contents($pathFile.'.yml'));
100
                    }
101
102
                    $config['admin_route'] = $data['admin_route_dir'];
103

src/Eccube/Controller/Admin/Store/TemplateController.php 1 location

@@ 71-75 (lines=5) @@
68
69
                // path.(yml|php)の再構築
70
                $file = $app['config']['root_dir'].'/app/config/eccube/path';
71
                if (file_exists($file.'.php')) {
72
                    $config = require $file.'.php';
73
                } elseif (file_exists($file.'.yml')) {
74
                    $config = Yaml::parse(file_get_contents($file.'.yml'));
75
                }
76
77
                $templateCode = $Template->getCode();
78
                $config['template_code'] = $templateCode;