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.

FlushCacheConsoleAction::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace app\backend\actions;
4
5
use yii\web\Application;
6
use Yii;
7
8
class FlushCacheConsoleAction extends FlushCacheAction
9
{
10
    public function run()
11
    {
12
        $config = require(Yii::getAlias('@app/config') . '/web.php');
13
        $app = new Application($config);
14
        Yii::setAlias('@webroot', Yii::getAlias('@app/web'));
0 ignored issues
show
Bug introduced by
It seems like \Yii::getAlias('@app/web') targeting yii\BaseYii::getAlias() can also be of type boolean; however, yii\BaseYii::setAlias() does only seem to accept string, maybe add an additional type check?

This check looks at variables that are passed out again to other methods.

If the outgoing method call has stricter type requirements than the method itself, an issue is raised.

An additional type check may prevent trouble.

Loading history...
15
        $this->flushCache($app);
16
        $this->flushAssets();
17
        echo "ok\n";
18
        $app->end();
19
    }
20
}
21