Code Duplication    Length = 5-5 lines in 2 locations

src/Eccube/Service/PluginService.php 1 location

@@ 312-316 (lines=5) @@
309
            // Proxyのクラスをロードせずにスキーマを更新するために、
310
            // インストール時には一時的なディレクトリにProxyを生成する
311
            $createOutputDir = false;
312
            if (is_null($tmpProxyOutputDir)) {
313
                $tmpProxyOutputDir = sys_get_temp_dir().'/proxy_'.StringUtil::random(12);
314
                @mkdir($tmpProxyOutputDir);
315
                $createOutputDir = true;
316
            }
317
318
            try {
319
                if (!$uninstall) {

src/Eccube/Service/SchemaService.php 1 location

@@ 54-58 (lines=5) @@
51
    public function executeCallback(callable $callback, $generatedFiles, $proxiesDirectory, $outputDir = null)
52
    {
53
        $createOutputDir = false;
54
        if (is_null($outputDir)) {
55
            $outputDir = sys_get_temp_dir().'/metadata_'.StringUtil::random(12);
56
            mkdir($outputDir);
57
            $createOutputDir = true;
58
        }
59
60
        try {
61
            $chain = $this->entityManager->getConfiguration()->getMetadataDriverImpl();