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

application/modules/image/models/Thumbnail.php 1 location

@@ 152-165 (lines=14) @@
149
     * @inheritdoc
150
     * @throws \Exception
151
     */
152
    public function afterDelete()
153
    {
154
        parent::afterDelete();
155
        $sameImages = static::findAll(['thumb_path' => $this->thumb_path]);
156
        if (empty($sameImages) === true) {
157
            if (Yii::$app->getModule('image')->fsComponent->has($this->thumb_path)) {
158
                Yii::$app->getModule('image')->fsComponent->delete($this->thumb_path);
159
            }
160
            $thumbnailWatermarks = ThumbnailWatermark::findAll(['thumb_id' => $this->id]);
161
            foreach ($thumbnailWatermarks as $thumbnailWatermark) {
162
                $thumbnailWatermark->delete();
163
            }
164
        }
165
    }
166
}
167

application/modules/image/models/Image.php 1 location

@@ 264-277 (lines=14) @@
261
        return $this->file;
262
    }
263
264
    public function afterDelete()
265
    {
266
        parent::afterDelete();
267
        $sameImages = static::findAll(['filename' => $this->filename]);
268
        if (empty($sameImages) === true) {
269
            if (Yii::$app->getModule('image')->fsComponent->has($this->filename)) {
270
                Yii::$app->getModule('image')->fsComponent->delete($this->filename);
271
            }
272
        }
273
        $thumbnails = Thumbnail::findAll(['img_id' => $this->id]);
274
        foreach ($thumbnails as $thumbnail) {
275
            $thumbnail->delete();
276
        }
277
    }
278
}
279