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 — master ( e91cf6...3a6b3f )
by Alexander
10:43
created

YmlController::getValues()   C

Complexity

Conditions 9
Paths 32

Size

Total Lines 64
Code Lines 51

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 64
rs 6.5449
c 1
b 0
f 0
cc 9
eloc 51
nc 32
nop 1

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
namespace app\modules\shop\commands;
3
4
use app\modules\shop\models\Yml;
5
use Yii;
6
7
class YmlController extends \yii\console\Controller
8
{
9
    /**
10
     * @return bool
0 ignored issues
show
Documentation introduced by
Should the return type not be false|integer?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
11
     */
12
    public function actionGenerate()
13
    {
14
        $config = new Yml();
15
        if (false === $config->loadConfig()) {
16
            return false;
17
        }
18
19
        $yml = new \app\modules\shop\components\yml\Yml($config);
20
        return true === $yml->generate() ? 0 : 1;
21
    }
22
}
23