Code Duplication    Length = 4-8 lines in 3 locations

src/lib/Zikula/Bundle/CoreInstallerBundle/Helper/ControllerHelper.php 3 locations

@@ 51-54 (lines=4) @@
48
            $currentSetting = ini_get('mbstring.internal_encoding');
49
            $warnings[] = __f('Could not use %1$s to set the %2$s to the value of %3$s. The install or upgrade process may fail at your current setting of %4$s.', ['ini_set', 'mbstring.internal_encoding', 'UTF-8', $currentSetting]);
50
        }
51
        if (false === ini_set('default_charset', 'UTF-8')) {
52
            $currentSetting = ini_get('default_charset');
53
            $warnings[] = __f('Could not use %1$s to set the %2$s to the value of %3$s. The install or upgrade process may fail at your current setting of %4$s.', ['ini_set', 'default_charset', 'UTF-8', $currentSetting]);
54
        }
55
        if (false === mb_regex_encoding('UTF-8')) {
56
            $currentSetting = mb_regex_encoding();
57
            $warnings[] = __f('Could not set %1$s to the value of %2$s. The install or upgrade process may fail at your current setting of %3$s.', ['mb_regex_encoding', 'UTF-8', $currentSetting]);
@@ 59-62 (lines=4) @@
56
            $currentSetting = mb_regex_encoding();
57
            $warnings[] = __f('Could not set %1$s to the value of %2$s. The install or upgrade process may fail at your current setting of %3$s.', ['mb_regex_encoding', 'UTF-8', $currentSetting]);
58
        }
59
        if (false === ini_set('memory_limit', '128M')) {
60
            $currentSetting = ini_get('memory_limit');
61
            $warnings[] = __f('Could not use %1$s to set the %2$s to the value of %3$s. The install or upgrade process may fail at your current setting of %4$s.', ['ini_set', 'memory_limit', '128M', $currentSetting]);
62
        }
63
        if (false === ini_set('max_execution_time', 86400)) {
64
            // 86400 = 24 hours
65
            $currentSetting = ini_get('max_execution_time');
@@ 63-70 (lines=8) @@
60
            $currentSetting = ini_get('memory_limit');
61
            $warnings[] = __f('Could not use %1$s to set the %2$s to the value of %3$s. The install or upgrade process may fail at your current setting of %4$s.', ['ini_set', 'memory_limit', '128M', $currentSetting]);
62
        }
63
        if (false === ini_set('max_execution_time', 86400)) {
64
            // 86400 = 24 hours
65
            $currentSetting = ini_get('max_execution_time');
66
            if ($currentSetting > 0) {
67
                // 0 = unlimited time
68
                $warnings[] = __f('Could not use %1$s to set the %2$s to the value of %3$s. The install or upgrade process may fail at your current setting of %4$s.', ['ini_set', 'max_execution_time', '86400', $currentSetting]);
69
            }
70
        }
71
72
        return $warnings;
73
    }