Code Duplication    Length = 11-11 lines in 2 locations

htdocs/xoops_lib/Xoops/Locale.php 2 locations

@@ 125-135 (lines=11) @@
122
     *
123
     * @return \DateTimeZone
124
     */
125
    public static function getDefaultTimeZone()
126
    {
127
        if (null === static::$defaultTimeZone) {
128
            $tz = \Xoops::getInstance()->getConfig('default_TZ');
129
            if (is_numeric($tz)) {
130
                $tz = 'UTC';
131
            }
132
            static::$defaultTimeZone = static::newDateTimeZone($tz);
133
        }
134
        return static::$defaultTimeZone;
135
    }
136
137
    /**
138
     * Get the server timezone as set in server_TZ config
@@ 142-152 (lines=11) @@
139
     *
140
     * @return \DateTimeZone
141
     */
142
    public static function getSystemTimeZone()
143
    {
144
        if (null === static::$systemTimeZone) {
145
            $tz = \Xoops::getInstance()->getConfig('server_TZ');
146
            if (is_numeric($tz)) {
147
                $tz = 'UTC';
148
            }
149
            static::$systemTimeZone = static::newDateTimeZone($tz);
150
        }
151
        return static::$systemTimeZone;
152
    }
153
154
    /**
155
     * @param string $name Name of language file to be loaded, without extension