Code Duplication    Length = 12-14 lines in 3 locations

src/Eccube/Command/ConfigCommand.php 3 locations

@@ 115-128 (lines=14) @@
112
            $config = array();
113
            $app->parseConfig($filter, $config);
114
115
            if (!empty($config)) {
116
                // ymlファイル名が指定された場合、ymlファイルの内容を出力
117
                $output->writeln("YML File Name : <info>{$filter}</info>");
118
                foreach ($config as $key => $item) {
119
                    if (is_array($item)) {
120
                        $output->writeln("<comment>{$key}</comment> :");
121
                        $recursive($item);
122
                    } else {
123
                        $output->writeln("<comment>{$key}</comment> : <info>{$item}</info>");
124
                    }
125
                }
126
127
                return;
128
            }
129
130
            if (!isset($app['config'][$filter])) {
131
                $output->writeln('Not Found filter : $app[\'config\'][\'<error>'.$filter.'</error>\']');
@@ 139-150 (lines=12) @@
136
            $config = $app['config'][$filter];
137
138
            $output->writeln('$app[\'config\'][\'<comment>'.$filter.'</comment>\']');
139
            if (is_array($config)) {
140
                foreach ($config as $key => $item) {
141
                    if (is_array($item)) {
142
                        $output->writeln("<comment>{$key}</comment> :");
143
                        $recursive($item);
144
                    } else {
145
                        $output->writeln("<comment>{$key}</comment> : <info>{$item}</info>");
146
                    }
147
                }
148
            } else {
149
                $output->writeln("<comment>{$filter}</comment> : <info>{$config}</info>");
150
            }
151
        } else {
152
            // $app['config']の内容を全て出力する
153
            $config = $app['config'];
@@ 151-163 (lines=13) @@
148
            } else {
149
                $output->writeln("<comment>{$filter}</comment> : <info>{$config}</info>");
150
            }
151
        } else {
152
            // $app['config']の内容を全て出力する
153
            $config = $app['config'];
154
155
            foreach ($config as $key => $item) {
156
                if (is_array($item)) {
157
                    $output->writeln("<comment>{$key}</comment> :");
158
                    $recursive($item);
159
                } else {
160
                    $output->writeln("<comment>{$key}</comment> : <info>{$item}</info>");
161
                }
162
            }
163
        }
164
    }
165
}
166