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/ThemeParts.php 1 location

@@ 309-326 (lines=18) @@
306
    /**
307
     * @inheritdoc
308
     */
309
    public function beforeDelete()
310
    {
311
        if (!parent::beforeDelete()) {
312
            return false;
313
        }
314
315
        $activeParts = ThemeWidgetApplying::find()->where(['part_id'=>$this->id])->all();
316
        foreach ($activeParts as $part) {
317
            $part->delete();
318
        }
319
320
        $activeWidgets = ThemeActiveWidgets::find()->where(['widget_id'=>$this->id])->all();
321
        foreach ($activeWidgets as $widget) {
322
            $widget->delete();
323
        }
324
325
        return true;
326
    }
327
}
328

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