Code Duplication    Length = 5-5 lines in 5 locations

application/modules/sitemap/sitemap.php 5 locations

@@ 342-346 (lines=5) @@
339
            }
340
341
            // create date
342
            if ($category['updated'] > 0) {
343
                $date = date('Y-m-d', $category['updated']);
344
            } else {
345
                $date = date('Y-m-d', $category['created']);
346
            }
347
348
            if ($this->not_blocked_url($category['path_url'])) {
349
@@ 443-447 (lines=5) @@
440
            }
441
442
            // create date
443
            if ($page['updated'] > 0) {
444
                $date = date('Y-m-d', $page['updated']);
445
            } else {
446
                $date = date('Y-m-d', $page['created']);
447
            }
448
449
            if ($page['cat_url'] == '') {
450
                $c_priority = $this->cats_priority;
@@ 509-513 (lines=5) @@
506
                    }
507
508
                    // create date
509
                    if ($shopCategory['updated'] > 0) {
510
                        $date = date('Y-m-d', $shopCategory['updated']);
511
                    } else {
512
                        $date = date('Y-m-d', $shopCategory['created']);
513
                    }
514
515
                    $this->items[] = [
516
                                      'loc'        => site_url($url),
@@ 543-547 (lines=5) @@
540
            $url = site_url($localeSegment . 'shop/brand/' . $shopbr['url']);
541
            if ($this->not_blocked_url($localeSegment . 'shop/brand/' . $shopbr['url'])) {
542
                // create date
543
                if ($shopbr['updated'] > 0) {
544
                    $date = date('Y-m-d', $shopbr['updated']);
545
                } else {
546
                    $date = date('Y-m-d', $shopbr['created']);
547
                }
548
                $this->items[] = [
549
                                  'loc'        => $url,
550
                                  'changefreq' => $this->brands_changefreq,
@@ 576-580 (lines=5) @@
573
574
                if ($this->not_blocked_url($localeSegment . Route::createRouteUrl($shopprod['url'], $shopprod['parent_url'], Route::TYPE_PRODUCT))) {
575
576
                    if ($shopprod['updated'] > 0) {
577
                        $date = date('Y-m-d', $shopprod['updated']);
578
                    } else {
579
                        $date = date('Y-m-d', $shopprod['created']);
580
                    }
581
                    $this->items[] = [
582
                                      'loc'        => $url,
583
                                      'changefreq' => $this->products_changefreq,