GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 7-7 lines in 2 locations

application/modules/shop/models/Product.php 2 locations

@@ 656-662 (lines=7) @@
653
            } elseif ($typecast === 'slug') {
654
                $categories = array_map('trim', $categories);
655
                $categoryIds = [];
656
                foreach ($categories as $part) {
657
                    $cat = Category::findBySlug($part, 1, -1);
658
                    if (is_object($cat)) {
659
                        $categoryIds[] = $cat->id;
660
                    }
661
                    unset($cat);
662
                }
663
                $categories = array_map('intval', $categoryIds);
664
            } elseif ($typecast === 'name') {
665
                $categories = array_map('trim', $categories);
@@ 667-673 (lines=7) @@
664
            } elseif ($typecast === 'name') {
665
                $categories = array_map('trim', $categories);
666
                $categoryIds = [];
667
                foreach ($categories as $part) {
668
                    $cat = Category::findByName($part, 1, -1);
669
                    if (is_object($cat)) {
670
                        $categoryIds[] = $cat->id;
671
                    }
672
                    unset($cat);
673
                }
674
                $categories = array_map('intval', $categoryIds);
675
            } else {
676
                // that's unusual behavior