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.
Test Setup Failed
Push — google-feed ( 5c4917...aa2c4e )
by
unknown
16:17
created

BackendGoogleFeedController::actionSettings()   B

Complexity

Conditions 5
Paths 4

Size

Total Lines 22
Code Lines 13

Duplication

Lines 22
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 22
loc 22
rs 8.6738
cc 5
eloc 13
nc 4
nop 0
1
<?php
2
3
namespace app\modules\shop\controllers;
4
5
6
use app\backend\components\BackendController;
7
use app\components\Helper;
8
use app\modules\shop\models\GoogleFeed;
9
use Yii;
10
11
class BackendGoogleFeedController extends BackendController
12
{
13
14
15
    public $defaultAction = 'settings';
16
17
    /**
18
     * @return string|\yii\web\Response
19
     * @throws \yii\web\ServerErrorHttpException
20
     */
21 View Code Duplication
    public function actionSettings()
22
    {
23
        if (\Yii::$app->request->isPost) {
24
            $model = new GoogleFeed();
25
            if ($model->load(Yii::$app->request->post()) && $model->validate()) {
26
                $model->saveConfig();
27
            } elseif ($model->hasErrors()) {
28
                Yii::$app->session->setFlash('error', Helper::formatModelErrors($model, '<br />'));
29
            }
30
            return $this->refresh();
31
        }
32
33
        $model = new GoogleFeed();
34
        $model->loadConfig();
35
36
        return $this->render(
37
            'settings',
38
            [
39
                'model' => $model
40
            ]
41
        );
42
    }
43
44
45
}