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/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

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

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