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.
Completed
Push — master ( 8dbb7d...452128 )
by Brett
04:19
created

Bootstrap::bootstrap()   B

Complexity

Conditions 4
Paths 8

Size

Total Lines 24
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 15
CRAP Score 4.074
Metric Value
cc 4
eloc 13
nc 8
nop 1
dl 0
loc 24
ccs 15
cts 18
cp 0.8333
crap 4.074
rs 8.6845
1
<?php
2
3
namespace bedezign\yii2\audit;
4
use yii\base\Application;
5
use yii\base\BootstrapInterface;
6
7
/**
8
 * Bootstrap
9
 * @package bedezign\yii2\audit
10
 */
11
class Bootstrap implements BootstrapInterface
12
{
13
    /**
14
     * Bootstrap method to be called during application bootstrap stage.
15
     *
16
     * @param Application $app the application currently running
17
     */
18 282
    public function bootstrap($app)
19
    {
20
        // Make sure to register the base folder as alias as well or things like assets won't work anymore
21 114
        \Yii::setAlias('@bedezign/yii2/audit', __DIR__);
22
23 282
        if ($app instanceof \yii\console\Application) {
24
            $app->controllerMap['audit'] = 'bedezign\yii2\audit\commands\AuditController';
25
        }
26
27 114
        $moduleName = Audit::findModuleIdentifier();
28 282
        if ($moduleName) {
29
            // The module was added in the configuration, make sure to add it to the application bootstrap so it gets loaded
30 282
            $app->bootstrap[] = $moduleName;
31 114
            $app->bootstrap = array_unique($app->bootstrap, SORT_REGULAR);
32 114
        }
33
34 114
        if ($app->has('i18n')) {
35 114
            $app->i18n->translations['audit'] = [
36 114
                'class'          => 'yii\i18n\PhpMessageSource',
37 114
                'sourceLanguage' => 'en',
38 114
                'basePath'       => '@bedezign/yii2/audit/messages',
39
            ];
40 114
        }
41 282
    }
42
}
43