Bootstrap::bootstrap()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 2
eloc 7
nc 2
nop 1
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