Code Duplication    Length = 4-6 lines in 2 locations

src/date/TimeZoneDataParser.class.php 2 locations

@@ 306-309 (lines=4) @@
303
            $dstOff = $rule['rule']['save'];
304
            $isEndless = $rule['rule']['endYear'] == self::MAX_YEAR_VALUE;
305
306
            if ($until !== null) {
307
                $untilDate = $this->dateStrToArray($until);
308
                $untilTime = $this->getOnDate($untilDate['year'], $untilDate['month'], array('type' => 'date', 'date' => $untilDate['day'], 'day' => null), array('secondsInDay' => $untilDate['time']['seconds'], 'type' => $untilDate['time']['type']), $gmtOff, $dstOff);
309
            }
310
311
            switch ($rule['rule']['at']['type']) {
312
                case 'wallclock':
@@ 407-412 (lines=6) @@
404
405
                    $lastRuleEndTime = $untilTime;
406
                } else {
407
                    if ($until) {
408
                        $untilDate = $this->dateStrToArray($until);
409
                        $untilDateTime = $this->getOnDate($untilDate['year'], $untilDate['month'], array('type' => 'date', 'date' => $untilDate['day'], 'day' => null), array('secondsInDay' => $untilDate['time']['seconds'], 'type' => $untilDate['time']['type']), $gmtOff, $dstOff);
410
                    } else {
411
                        $untilDateTime = null;
412
                    }
413
414
                    if ($lastRuleEndTime !== null) {
415
                        $myRules[] = array('time' => $lastRuleEndTime, 'rawOffset' => $gmtOff, 'dstOffset' => $dstOff, 'name' => $format);