Completed
Push — master ( 6ff6d1...70482c )
by Alexey
02:17
created

Auth   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 26
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A bootstrap() 0 16 4
1
<?php
2
3
namespace yiicod\auth;
4
5
use Yii;
6
use yii\base\BootstrapInterface;
7
use yii\base\Component;
8
use yii\console\Application;
9
use yii\helpers\ArrayHelper;
10
11
class Auth extends Component implements BootstrapInterface
12
{
13
14
    /**
15
     * @var array Models settings
16
     */
17
    public $modelMap = [];
18
19
    public function bootstrap($qpp)
20
    {
21
        //Merge main extension config with local extension config
22
        $config = include(dirname(__FILE__) . '/config/main.php');
23
        foreach ($config as $key => $value) {
24
            if (is_array($value)) {
25
                $this->{$key} = ArrayHelper::merge($value, $this->{$key});
26
            } elseif (null === $this->{$key}) {
27
                $this->{$key} = $value;
28
            }
29
        }
30
31
        Yii::setAlias('@yiicod', realpath(dirname(__FILE__) . '/..'));
32
        // Namespace for migration
33
        Yii::setAlias('@yiicod_auth_migrations', realpath(dirname(__FILE__) . '/migrations'));
34
    }
35
36
}
37