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

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

@@ 68-100 (lines=33) @@
65
            $model->loadDefaultValues();
66
        }
67
68
        if ($model->load(Yii::$app->request->post()) && $model->validate()) {
69
            if ($model->save()) {
70
71
                Yii::$app->session->setFlash('info', Yii::t('app', 'Object saved'));
72
                $returnUrl = Yii::$app->request->get(
73
                    'returnUrl',
74
                    ['/shop/backend-discount/index']
75
                );
76
                switch (Yii::$app->request->post('action', 'save')) {
77
                    case 'next':
78
                        return $this->redirect(
79
                            [
80
                                '/shop/backend-discount/edit',
81
                                'returnUrl' => $returnUrl,
82
                            ]
83
                        );
84
                    case 'back':
85
                        return $this->redirect($returnUrl);
86
                    default:
87
                        return $this->redirect(
88
                            Url::toRoute(
89
                                [
90
                                    '/shop/backend-discount/edit',
91
                                    'id' => $model->id,
92
                                    'returnUrl' => $returnUrl,
93
                                ]
94
                            )
95
                        );
96
                }
97
            }
98
99
100
        }
101
102
        if (Yii::$app->request->isPost && !$model->isNewRecord) {
103
            foreach ($model::getTypeObjects() as $object) {

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

@@ 97-128 (lines=32) @@
94
        }
95
96
97
        if ($model->load(Yii::$app->request->post()) && $model->validate()) {
98
            if ($model->save()) {
99
                Yii::$app->session->setFlash('info', Yii::t('app', 'Object saved'));
100
                $returnUrl = Yii::$app->request->get(
101
                    'returnUrl',
102
                    ['/shop/backend-warehouse/index']
103
                );
104
                switch (Yii::$app->request->post('action', 'save')) {
105
                    case 'next':
106
                        return $this->redirect(
107
                            [
108
                                '/shop/backend-warehouse/edit',
109
                                'returnUrl' => $returnUrl,
110
                            ]
111
                        );
112
                    case 'back':
113
                        return $this->redirect($returnUrl);
114
                    default:
115
                        return $this->redirect(
116
                            Url::toRoute(
117
                                [
118
                                    '/shop/backend-warehouse/edit',
119
                                    'id' => $model->id,
120
                                    'returnUrl' => $returnUrl,
121
                                ]
122
                            )
123
                        );
124
                }
125
            }
126
127
128
        }
129
130
        $wareHouseOpeningHours = WarehouseOpeninghours::find()->where(['warehouse_id' => $model->id])->one();
131
        if ($wareHouseOpeningHours === null) {