Code Duplication    Length = 6-6 lines in 2 locations

src/Eccube/Controller/Admin/Content/BlockController.php 1 location

@@ 124-129 (lines=6) @@
121
                $blockData = Str::convertLineFeed($blockData);
122
                $fs->dumpFile($filePath, $blockData);
123
                // 更新でファイル名を変更した場合、以前のファイルを削除
124
                if ($Block->getFileName() != $previous_filename && !is_null($previous_filename)) {
125
                    $oldFilePath = $tplDir . '/' . $previous_filename . '.twig';
126
                    if ($fs->exists($oldFilePath)) {
127
                        $fs->remove($oldFilePath);
128
                    }
129
                }
130
131
                \Eccube\Util\Cache::clear($app, false);
132

src/Eccube/Controller/Admin/Content/PageController.php 1 location

@@ 128-133 (lines=6) @@
125
                $fs->dumpFile($filePath, $pageData);
126
127
                // 更新でファイル名を変更した場合、以前のファイルを削除
128
                if ($PageLayout->getFileName() != $fileName && !is_null($fileName)) {
129
                    $oldFilePath = $templatePath.'/'.$fileName.'.twig';
130
                    if ($fs->exists($oldFilePath)) {
131
                        $fs->remove($oldFilePath);
132
                    }
133
                }
134
135
                $event = new EventArgs(
136
                    array(