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

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

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

@@ 547-565 (lines=19) @@
544
                )->execute();
545
            }
546
            $newModelProps = [];
547
            foreach (array_keys($model->propertyGroups) as $key) {
548
                $opg = new ObjectPropertyGroup();
549
                $opg->attributes = [
550
                    'object_id' => $object->id,
551
                    'object_model_id' => $newModel->id,
552
                    'property_group_id' => $key,
553
                ];
554
                $opg->save();
555
                $props = Property::getForGroupId($key);
556
                foreach ($props as $prop) {
557
                    $propValues = $model->getPropertyValuesByPropertyId($prop->id);
558
                    if ($propValues !== null) {
559
                        foreach ($propValues->values as $val) {
560
                            $valueToSave = ArrayHelper::getValue($val, 'psv_id', $val['value']);
561
                            $newModelProps[$prop->key][] = $valueToSave;
562
                        }
563
                    }
564
                }
565
            }
566
            $newModel->saveProperties(
567
                [
568
                    'Properties_Product_' . $newModel->id => $newModelProps,