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

@@ 584-590 (lines=7) @@
581
582
        $images = isset($fields['images']) ? $fields['images'] : (isset($fields['image']) ? $fields['image'] : false);
583
        if ($images !== false) {
584
            if (strpos($images, $multipleValuesDelimiter) > 0) {
585
                $images = explode($multipleValuesDelimiter, $images);
586
            } elseif (strpos($multipleValuesDelimiter, '/') === 0) {
587
                $images = preg_split($multipleValuesDelimiter, $images);
588
            } else {
589
                $images = [$images];
590
            }
591
            $input_array = [];
592
            foreach ($images as $image_src) {
593
                $input_array[] = [
@@ 637-643 (lines=7) @@
634
635
        }
636
        if ($categories !== false) {
637
            if (strpos($categories, $multipleValuesDelimiter) > 0) {
638
                $categories = explode($multipleValuesDelimiter, $categories);
639
            } elseif (strpos($multipleValuesDelimiter, '/') === 0) {
640
                $categories = preg_split($multipleValuesDelimiter, $categories);
641
            } else {
642
                $categories = [$categories];
643
            }
644
            $typecast = 'id';
645
646
            if (isset($additionalFields['categories'])) {