Code Duplication    Length = 5-5 lines in 5 locations

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

@@ 269-273 (lines=5) @@
266
        $pluginFileAfter = preg_replace($from, $year, $pluginFileAfter);
267
268
        $file->mkdir($codePath . '/ServiceProvider');
269
        if (is_dir($codePath . '/ServiceProvider')) {
270
            $fsList['dir'][$codePath . '/ServiceProvider'] = true;
271
        } else {
272
            $fsList['dir'][$codePath . '/ServiceProvider'] = false;
273
        }
274
275
        $srcPath = $codePath . '/ServiceProvider/' . $code . 'ServiceProvider.php';
276
        file_put_contents($srcPath, $pluginFileAfter);
@@ 295-299 (lines=5) @@
292
        $pluginFileAfter = preg_replace($from, mb_strtolower($code), $pluginFileAfter);
293
294
        $file->mkdir($codePath . '/Controller');
295
        if (is_dir($codePath . '/Controller')) {
296
            $fsList['dir'][$codePath . '/Controller'] = true;
297
        } else {
298
            $fsList['dir'][$codePath . '/Controller'] = false;
299
        }
300
301
        $srcPath = $codePath . '/Controller/ConfigController.php';
302
        file_put_contents($srcPath, $pluginFileAfter);
@@ 340-344 (lines=5) @@
337
        $pluginFileAfter = preg_replace($from, mb_strtolower($code), $pluginFileAfter);
338
339
        $file->mkdir($codePath . '/Form/Type');
340
        if (is_dir($codePath . '/Form/Type')) {
341
            $fsList['dir'][$codePath . '/Form/Type'] = true;
342
        } else {
343
            $fsList['dir'][$codePath . '/Form/Type'] = false;
344
        }
345
346
        $srcPath = $codePath . '/Form/Type/' . $code . 'ConfigType.php';
347
        file_put_contents($codePath . '/Form/Type/' . $code . 'ConfigType.php', $pluginFileAfter);
@@ 360-364 (lines=5) @@
357
        $pluginFileAfter = preg_replace($from, $code, $pluginFileBefore);
358
359
        $file->mkdir($codePath . '/Resource/template/admin');
360
        if (is_dir($codePath . '/Resource/template/admin')) {
361
            $fsList['dir'][$codePath . '/Resource/template/admin'] = true;
362
        } else {
363
            $fsList['dir'][$codePath . '/Resource/template/admin'] = false;
364
        }
365
366
        $srcPath = $codePath . '/Resource/template/admin/config.twig';
367
        file_put_contents($srcPath, $pluginFileAfter);
@@ 380-384 (lines=5) @@
377
        $pluginFileAfter = preg_replace($from, $code, $pluginFileBefore);
378
379
        $file->mkdir($codePath . '/Resource/template/admin');
380
        if (is_dir($codePath . '/Resource/template/admin')) {
381
            $fsList['dir'][$codePath . '/Resource/template/admin'] = true;
382
        } else {
383
            $fsList['dir'][$codePath . '/Resource/template/admin'] = false;
384
        }
385
386
        $srcPath = $codePath . '/Resource/template/index.twig';
387
        file_put_contents($srcPath, $pluginFileAfter);