Code Duplication    Length = 6-6 lines in 2 locations

src/date/DateFormat.class.php 2 locations

@@ 671-676 (lines=6) @@
668
669
        $tlCount = count($this->tokenList);
670
        for ($i = 0; $i < $tlCount; ++$i) {
671
            if ($datePos >= strlen($dateString)) {
672
                if ($strict) {
673
                    throw new AgaviException('Input string "' . $dateString . '" is to short');
674
                }
675
                break;
676
            }
677
678
            $token = $this->tokenList[$i];
679
            $type = $this->getTokenType($token);
@@ 944-949 (lines=6) @@
941
        // so there aren't any strange effects when setting a new timezone
942
        // or a new date
943
        $cal->getTime();
944
        if ($strict) {
945
            // calculate the time to get errors for invalid dates
946
            if ($datePos < strlen($dateString)) {
947
                throw new AgaviException('Input string "' . $dateString . '" has characters after the date');
948
            }
949
        }
950
951
        return $cal;
952
    }