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

application/extensions/DefaultTheme/models/ThemeWidgets.php 1 location

@@ 153-170 (lines=18) @@
150
    /**
151
     * @inheritdoc
152
     */
153
    public function beforeDelete()
154
    {
155
        if (!parent::beforeDelete()) {
156
            return false;
157
        }
158
159
        $parts = ThemeWidgetApplying::find()->where(['widget_id'=>$this->id])->all();
160
        foreach ($parts as $part) {
161
            $part->delete();
162
        }
163
164
        $activeWidgets = ThemeActiveWidgets::find()->where(['widget_id'=>$this->id])->all();
165
        foreach ($activeWidgets as $widget) {
166
            $widget->delete();
167
        }
168
169
        return true;
170
    }
171
}
172

application/extensions/DefaultTheme/models/ThemeParts.php 1 location

@@ 294-311 (lines=18) @@
291
    /**
292
     * @inheritdoc
293
     */
294
    public function beforeDelete()
295
    {
296
        if (!parent::beforeDelete()) {
297
            return false;
298
        }
299
300
        $activeParts = ThemeWidgetApplying::find()->where(['part_id'=>$this->id])->all();
301
        foreach ($activeParts as $part) {
302
            $part->delete();
303
        }
304
305
        $activeWidgets = ThemeActiveWidgets::find()->where(['widget_id'=>$this->id])->all();
306
        foreach ($activeWidgets as $widget) {
307
            $widget->delete();
308
        }
309
310
        return true;
311
    }
312
}
313