Code Duplication    Length = 9-9 lines in 2 locations

eccube_install.php 1 location

@@ 454-462 (lines=9) @@
451
452
        $value = env($key);
453
454
        if (is_bool($value)
455
            || is_null($value)
456
            || is_array($value)
457
            || is_numeric($value)
458
        ) {
459
            $value = var_export($value, true);
460
        } else {
461
            $value = "'".$value."'";
462
        }
463
464
        $pattern = sprintf($patternFormat, $key);
465
        $replacement = sprintf($replacementFormat, $key, $value);

src/Eccube/Controller/Install/InstallController.php 1 location

@@ 726-734 (lines=9) @@
723
        }
724
725
        foreach ($values as &$value) {
726
            if (is_bool($value)
727
                || is_null($value)
728
                || is_array($value)
729
                || is_numeric($value)
730
            ) {
731
                $value = var_export($value, true);
732
            } else {
733
                $value = "'".$value."'";
734
            }
735
        }
736
737
        $dir = $this->configDir;