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

application/modules/shop/controllers/WishlistController.php 2 locations

@@ 87-101 (lines=15) @@
84
     * @param $id
85
     * @return Response
86
     */
87
    public function actionDelete($id)
88
    {
89
        /** @var Wishlist $wishlist */
90
        if (null !== $wishlist = Wishlist::findOne([
91
                'id' => $id,
92
                'user_id' => !Yii::$app->user->isGuest ? Yii::$app->user->id : 0,
93
            ])
94
        ) {
95
            $wishlist->delete();
96
            Yii::$app->session->setFlash('success', Yii::t('app', 'Wishlist has been removed'));
97
            return $this->redirect('index');
98
        }
99
        Yii::$app->session->setFlash('warning', Yii::t('app', 'Failed to remove wishlist'));
100
        return $this->redirect('index');
101
    }
102
103
    /**
104
     * @param $id
@@ 181-196 (lines=16) @@
178
     * @param $id
179
     * @return Response
180
     */
181
    public function actionClear($id)
182
    {
183
        /** @var Wishlist $wishlist */
184
        if (null !== $wishlist = Wishlist::findOne([
185
                'id' => $id,
186
                'user_id' => !Yii::$app->user->isGuest ? Yii::$app->user->id : 0,
187
            ])
188
        ) {
189
            if ($wishlist->clearWishlist()) {
190
                Yii::$app->session->setFlash('success', Yii::t('app', 'Wishlist has been cleared'));
191
                return $this->redirect('index');
192
            }
193
        }
194
        Yii::$app->session->setFlash('warning', Yii::t('app', 'Failed to clear wishlist'));
195
        return $this->redirect('index');
196
    }
197
198
    /**
199
     * @return Response