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

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