Code Duplication    Length = 13-15 lines in 2 locations

typo3/sysext/install/Classes/Service/SilentConfigurationUpgradeService.php 2 locations

@@ 780-794 (lines=15) @@
777
    /**
778
     * Migrate the configuration setting DB/Connections/Default/driverOptions to array type.
779
     */
780
    protected function migrateDatabaseDriverOptions()
781
    {
782
        $confManager = $this->configurationManager;
783
        try {
784
            $options = $confManager->getLocalConfigurationValueByPath('DB/Connections/Default/driverOptions');
785
            if (!is_array($options)) {
786
                $confManager->setLocalConfigurationValueByPath(
787
                    'DB/Connections/Default/driverOptions',
788
                    ['flags' => (int)$options]
789
                );
790
            }
791
        } catch (\RuntimeException $e) {
792
            // no driver options found, nothing needs to be modified
793
        }
794
    }
795
796
    /**
797
     * Migrate the configuration setting BE/lang/debug if set in the LocalConfiguration.php file
@@ 799-811 (lines=13) @@
796
    /**
797
     * Migrate the configuration setting BE/lang/debug if set in the LocalConfiguration.php file
798
     */
799
    protected function migrateLangDebug()
800
    {
801
        $confManager = $this->configurationManager;
802
        try {
803
            $currentOption = $confManager->getLocalConfigurationValueByPath('BE/lang/debug');
804
            // check if the current option is set and boolean
805
            if (isset($currentOption) && is_bool($currentOption)) {
806
                $confManager->setLocalConfigurationValueByPath('BE/languageDebug', $currentOption);
807
            }
808
        } catch (\RuntimeException $e) {
809
            // no change inside the LocalConfiguration.php found, so nothing needs to be modified
810
        }
811
    }
812
813
    /**
814
     * Migrate single cache hash related options under "FE" into "FE/cacheHash"