Bootstrap   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A bootstrap() 0 12 2
1
<?php
2
3
namespace cornernote\dashboard;
4
5
use yii\base\Application;
6
use yii\base\BootstrapInterface;
7
8
/**
9
 * Bootstrap
10
 * @package cornernote\dashboard
11
 */
12
class Bootstrap implements BootstrapInterface
13
{
14
    /**
15
     * Bootstrap method to be called during application bootstrap stage.
16
     *
17
     * @param Application $app the application currently running
18
     */
19
    public function bootstrap($app)
20
    {
21
        \Yii::setAlias('@cornernote/dashboard', __DIR__);
22
23
        if ($app->has('i18n')) {
24
            $app->i18n->translations['dashboard'] = [
25
                'class' => 'yii\i18n\PhpMessageSource',
26
                'sourceLanguage' => 'en',
27
                'basePath' => '@cornernote/dashboard/messages',
28
            ];
29
        }
30
    }
31
}
32