RoleController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 19
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A labels() 0 5 1
A getType() 0 3 1
1
<?php
2
3
namespace toir427\admin\controllers;
4
5
use toir427\admin\components\ItemController;
6
use yii\rbac\Item;
7
8
/**
9
 * RoleController implements the CRUD actions for AuthItem model.
10
 *
11
 * @author Misbahul D Munir <[email protected]>
12
 * @since 1.0
13
 */
14
class RoleController extends ItemController
15
{
16
    /**
17
     * @inheritdoc
18
     */
19
    public function labels()
20
    {
21
        return[
22
            'Item' => 'Role',
23
            'Items' => 'Roles',
24
        ];
25
    }
26
27
    /**
28
     * @inheritdoc
29
     */
30
    public function getType()
31
    {
32
        return Item::TYPE_ROLE;
33
    }
34
}
35