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

@@ 573-579 (lines=7) @@
570
571
        $images = isset($fields['images']) ? $fields['images'] : (isset($fields['image']) ? $fields['image'] : false);
572
        if ($images !== false) {
573
            if (strpos($images, $multipleValuesDelimiter) > 0) {
574
                $images = explode($multipleValuesDelimiter, $images);
575
            } elseif (strpos($multipleValuesDelimiter, '/') === 0) {
576
                $images = preg_split($multipleValuesDelimiter, $images);
577
            } else {
578
                $images = [$images];
579
            }
580
            $input_array = [];
581
            foreach ($images as $image_src) {
582
                $input_array[] = [
@@ 626-632 (lines=7) @@
623
624
        }
625
        if ($categories !== false) {
626
            if (strpos($categories, $multipleValuesDelimiter) > 0) {
627
                $categories = explode($multipleValuesDelimiter, $categories);
628
            } elseif (strpos($multipleValuesDelimiter, '/') === 0) {
629
                $categories = preg_split($multipleValuesDelimiter, $categories);
630
            } else {
631
                $categories = [$categories];
632
            }
633
            $typecast = 'id';
634
635
            if (isset($additionalFields['categories'])) {