Code Duplication    Length = 5-5 lines in 5 locations

src/Eccube/Command/GeneratorCommand/PluginGenerator.php 5 locations

@@ 298-302 (lines=5) @@
295
        $pluginFileAfter = preg_replace($from, $year, $pluginFileAfter);
296
297
        $file->mkdir($codePath.'/ServiceProvider');
298
        if (is_dir($codePath.'/ServiceProvider')) {
299
            $fsList['dir'][$codePath.'/ServiceProvider'] = true;
300
        } else {
301
            $fsList['dir'][$codePath.'/ServiceProvider'] = false;
302
        }
303
304
        $srcPath = $codePath.'/ServiceProvider/'.$code.'ServiceProvider.php';
305
        file_put_contents($srcPath, $pluginFileAfter);
@@ 324-328 (lines=5) @@
321
        $pluginFileAfter = preg_replace($from, mb_strtolower($code), $pluginFileAfter);
322
323
        $file->mkdir($codePath.'/Controller');
324
        if (is_dir($codePath.'/Controller')) {
325
            $fsList['dir'][$codePath.'/Controller'] = true;
326
        } else {
327
            $fsList['dir'][$codePath.'/Controller'] = false;
328
        }
329
330
        $srcPath = $codePath.'/Controller/ConfigController.php';
331
        file_put_contents($srcPath, $pluginFileAfter);
@@ 369-373 (lines=5) @@
366
        $pluginFileAfter = preg_replace($from, mb_strtolower($code), $pluginFileAfter);
367
368
        $file->mkdir($codePath.'/Form/Type');
369
        if (is_dir($codePath.'/Form/Type')) {
370
            $fsList['dir'][$codePath.'/Form/Type'] = true;
371
        } else {
372
            $fsList['dir'][$codePath.'/Form/Type'] = false;
373
        }
374
375
        $srcPath = $codePath.'/Form/Type/'.$code.'ConfigType.php';
376
        file_put_contents($codePath.'/Form/Type/'.$code.'ConfigType.php', $pluginFileAfter);
@@ 389-393 (lines=5) @@
386
        $pluginFileAfter = preg_replace($from, $code, $pluginFileBefore);
387
388
        $file->mkdir($codePath.'/Resource/template/admin');
389
        if (is_dir($codePath.'/Resource/template/admin')) {
390
            $fsList['dir'][$codePath.'/Resource/template/admin'] = true;
391
        } else {
392
            $fsList['dir'][$codePath.'/Resource/template/admin'] = false;
393
        }
394
395
        $srcPath = $codePath.'/Resource/template/admin/config.twig';
396
        file_put_contents($srcPath, $pluginFileAfter);
@@ 409-413 (lines=5) @@
406
        $pluginFileAfter = preg_replace($from, mb_strtolower($code), $pluginFileBefore);
407
408
        $file->mkdir($codePath.'/Resource/template/admin');
409
        if (is_dir($codePath.'/Resource/template/admin')) {
410
            $fsList['dir'][$codePath.'/Resource/template/admin'] = true;
411
        } else {
412
            $fsList['dir'][$codePath.'/Resource/template/admin'] = false;
413
        }
414
415
        $srcPath = $codePath.'/Resource/template/index.twig';
416
        file_put_contents($srcPath, $pluginFileAfter);