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 = 19-19 lines in 2 locations

application/modules/page/backend/PageController.php 1 location

@@ 334-352 (lines=19) @@
331
                )->execute();
332
            }
333
            $newModelProps = [];
334
            foreach (array_keys($model->propertyGroups) as $key) {
335
                $opg = new ObjectPropertyGroup();
336
                $opg->attributes = [
337
                    'object_id' => $object->id,
338
                    'object_model_id' => $newModel->id,
339
                    'property_group_id' => $key,
340
                ];
341
                $opg->save();
342
                $props = Property::getForGroupId($key);
343
                foreach ($props as $prop) {
344
                    $propValues = $model->getPropertyValuesByPropertyId($prop->id);
345
                    if ($propValues !== null) {
346
                        foreach ($propValues->values as $val) {
347
                            $valueToSave = ArrayHelper::getValue($val, 'psv_id', $val['value']);
348
                            $newModelProps[$prop->key][] = $valueToSave;
349
                        }
350
                    }
351
                }
352
            }
353
            $newModel->saveProperties(
354
                [
355
                    'Properties_Page_' . $newModel->id => $newModelProps,

application/modules/shop/controllers/BackendProductController.php 1 location

@@ 559-577 (lines=19) @@
556
                )->execute();
557
            }
558
            $newModelProps = [];
559
            foreach (array_keys($model->propertyGroups) as $key) {
560
                $opg = new ObjectPropertyGroup();
561
                $opg->attributes = [
562
                    'object_id' => $object->id,
563
                    'object_model_id' => $newModel->id,
564
                    'property_group_id' => $key,
565
                ];
566
                $opg->save();
567
                $props = Property::getForGroupId($key);
568
                foreach ($props as $prop) {
569
                    $propValues = $model->getPropertyValuesByPropertyId($prop->id);
570
                    if ($propValues !== null) {
571
                        foreach ($propValues->values as $val) {
572
                            $valueToSave = ArrayHelper::getValue($val, 'psv_id', $val['value']);
573
                            $newModelProps[$prop->key][] = $valueToSave;
574
                        }
575
                    }
576
                }
577
            }
578
            $newModel->saveProperties(
579
                [
580
                    'Properties_Product_' . $newModel->id => $newModelProps,