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

@@ 645-651 (lines=7) @@
642
            } elseif ($typecast === 'slug') {
643
                $categories = array_map('trim', $categories);
644
                $categoryIds = [];
645
                foreach ($categories as $part) {
646
                    $cat = Category::findBySlug($part, 1, -1);
647
                    if (is_object($cat)) {
648
                        $categoryIds[] = $cat->id;
649
                    }
650
                    unset($cat);
651
                }
652
                $categories = array_map('intval', $categoryIds);
653
            } elseif ($typecast === 'name') {
654
                $categories = array_map('trim', $categories);
@@ 656-662 (lines=7) @@
653
            } elseif ($typecast === 'name') {
654
                $categories = array_map('trim', $categories);
655
                $categoryIds = [];
656
                foreach ($categories as $part) {
657
                    $cat = Category::findByName($part, 1, -1);
658
                    if (is_object($cat)) {
659
                        $categoryIds[] = $cat->id;
660
                    }
661
                    unset($cat);
662
                }
663
                $categories = array_map('intval', $categoryIds);
664
            } else {
665
                // that's unusual behavior