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

application/modules/shop/models/GoogleFeed.php 1 location

@@ 164-190 (lines=27) @@
161
    /**
162
     * @return bool
163
     */
164
    public function saveConfig()
165
    {
166
        /** @var ShopModule $module */
167
        if (null === $module = Yii::$app->getModule('shop')) {
168
            return false;
169
        }
170
        /** @var Configurable $configurable */
171
        if (null === $configurable = Configurable::findOne(['module' => $module->id])) {
172
            return false;
173
        }
174
        /** @var ConfigConfigurationModel $configurableModel */
175
        $configurableModel = $configurable->getConfigurableModel();
176
        $config = $this->attrStorage;
177
178
        yii\base\Event::on(
179
            $configurableModel::className(),
180
            $configurableModel->configurationSaveEvent(),
181
            function (ConfigurationSaveEvent $event) use ($config) {
182
                /** @var ConfigConfigurationModel $model */
183
                $model = $event->configurableModel;
184
                $model->googleFeedConfig = $config;
185
            }
186
        );
187
188
        $models = [$configurable];
189
        return ConfigurationUpdater::updateConfiguration($models, false);
190
    }
191
192
    /**
193
     * @return bool

application/modules/shop/models/Yml.php 1 location

@@ 188-215 (lines=28) @@
185
    /**
186
     * @return bool
187
     */
188
    public function saveConfig()
189
    {
190
        /** @var ShopModule $module */
191
        if (null === $module = Yii::$app->getModule('shop')) {
192
            return false;
193
        }
194
        /** @var Configurable $configurable */
195
        if (null === $configurable = Configurable::findOne(['module' => $module->id])) {
196
            return false;
197
        }
198
        /** @var ConfigConfigurationModel $configurableModel */
199
        $configurableModel = $configurable->getConfigurableModel();
200
        $config = $this->attrStorage;
201
202
        yii\base\Event::on(
203
            $configurableModel::className(),
204
            $configurableModel->configurationSaveEvent(),
205
            function (ConfigurationSaveEvent $event) use ($config)
206
            {
207
                /** @var ConfigConfigurationModel $model */
208
                $model = $event->configurableModel;
209
                $model->ymlConfig = $config;
210
            }
211
        );
212
213
        $models = [$configurable];
214
        return ConfigurationUpdater::updateConfiguration($models, false);
215
    }
216
217
    /**
218
     * @return bool