Bootstrap   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 11
c 1
b 0
f 0
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 17 1
1
<?php
2
3
namespace modules\main;
4
5
use Yii;
6
7
/**
8
 * Class Bootstrap
9
 * @package modules\main
10
 */
11
class Bootstrap
12
{
13
    public function __construct()
14
    {
15
        $i18n = Yii::$app->i18n;
16
        $i18n->translations['modules/main/*'] = [
17
            'class' => 'yii\i18n\PhpMessageSource',
18
            'basePath' => '@modules/main/messages',
19
            'fileMap' => [
20
                'modules/main/module' => 'module.php',
21
            ],
22
        ];
23
24
        $urlManager = Yii::$app->urlManager;
25
        $urlManager->addRules(
26
            [
27
                // Declaration of rules here
28
                '' => 'main/default/index',
29
                '<_a:(about|contact|captcha)>' => 'main/default/<_a>',
30
            ]
31
        );
32
    }
33
}
34