Code Duplication    Length = 37-37 lines in 2 locations

src/Eccube/Command/PluginCommand/EntityFromDbGenerator.php 1 location

@@ 146-182 (lines=37) @@
143
        return $ret;
144
    }
145
146
    protected function initFildset()
147
    {
148
        $this->paramList = array(
149
            'pluginCode' => array(
150
                'no' => 1,
151
                'label' => '[+]Plugin Code: ',
152
                'value' => null,
153
                'name' => '[+]Please enter Plugin Code (only pascal case letters numbers are allowed)',
154
                'validation' => array(
155
                    'isRequired' => true,
156
                    'inArray' => $this->getPluginList()
157
                )
158
            ),
159
            'tableList' => array(
160
                'no' => 2,
161
                'label' => '[+]Table name: ',
162
                'value' => array(),
163
                'name' => '[+]Please enter table name',
164
                'validation' => array(
165
                    'isRequired' => false,
166
                    'inArray' => $this->getTableList()
167
                )
168
            ),
169
            'supportFlag' => array(
170
                'no' => 3,
171
                'label' => '[+]Old version support: ',
172
                'value' => null,
173
                'name' => '[+]Do you want to support old versions too? [y/n]',
174
                'show' => array(
175
                    1 => 'Yes', 0 => 'No'),
176
                'validation' => array(
177
                    'isRequired' => true,
178
                    'choice' => array('y' => 1, 'n' => 0)
179
                )
180
            )
181
        );
182
    }
183
184
    private function getTableList()
185
    {

src/Eccube/Command/PluginCommand/EntityFromYamlGenerator.php 1 location

@@ 158-194 (lines=37) @@
155
        }
156
    }
157
158
    protected function initFildset()
159
    {
160
        $this->paramList = array(
161
            'pluginCode' => array(
162
                'no' => 1,
163
                 'label' => '[+]Plugin Code: ',
164
                'value' => null,
165
                'name' => '[+]Please enter Plugin Name (only pascal case letters numbers are allowed)',
166
                'validation' => array(
167
                    'isRequired' => true,
168
                    'inArray' => $this->getPluginList()
169
                )
170
            ),
171
            'entityList' => array(
172
                'no' => 2,
173
                'label' => '[+]Yaml file name: ',
174
                'value' => array(),
175
                'name' => '[+]Plese enter yaml file name',
176
                'validation' => array(
177
                    'isRequired' => false,
178
                    'inArray' => 'getEntityList'
179
                )
180
            ),
181
            'supportFlag' => array(
182
                'no' => 3,
183
                'label' => '[+]Old version support: ',
184
                'value' => null,
185
                'name' => '[+]Do you want to support old versions too? [y/n]',
186
                'show' => array(
187
                    1 => 'Yes', 0 => 'No'),
188
                'validation' => array(
189
                    'isRequired' => true,
190
                    'choice' => array('y' => 1, 'n' => 0)
191
                )
192
            )
193
        );
194
    }
195
196
    protected function getEntityList()
197
    {