Completed
Push — master ( 51cbcc...2d333a )
by Andrii
07:19
created

RbacController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 3
dl 0
loc 11
ccs 0
cts 6
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A actionInit() 0 8 1
1
<?php
2
3
/*
4
 * HiPanel core package
5
 *
6
 * @link      https://hipanel.com/
7
 * @package   hipanel-core
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2014-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hipanel\rbac\console;
13
14
use hipanel\rbac\Initer;
15
use Yii;
16
17
/**
18
 * Class RbacController.
19
 *
20
 * Usage: ./hidev rbac/init
21
 */
22
class RbacController extends \yii\console\Controller
23
{
24
    public function actionInit()
25
    {
26
        $auth = Yii::$app->get('authManager');
27
28
        Initer::init($auth);
29
30
        $auth->save();
31
    }
32
}
33