Code Duplication    Length = 5-5 lines in 2 locations

lib/net/nehmer/blog/handler/archive.php 2 locations

@@ 391-395 (lines=5) @@
388
     */
389
    private function _set_startend_from_year($year)
390
    {
391
        if (   ! is_numeric($year)
392
            || strlen($year) != 4)
393
        {
394
            throw new midcom_error_notfound("The year '{$year}' is not a valid year identifier.");
395
        }
396
397
        $now = new DateTime();
398
        if ($year > (int) $now->format('Y'))
@@ 420-424 (lines=5) @@
417
     */
418
    private function _set_startend_from_month($year, $month)
419
    {
420
        if (   ! is_numeric($year)
421
            || strlen($year) != 4)
422
        {
423
            throw new midcom_error_notfound("The year '{$year}' is not a valid year identifier.");
424
        }
425
426
        if (   ! is_numeric($month)
427
            || $month < 1