Code Duplication    Length = 5-5 lines in 5 locations

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

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