PermissionController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

2 Methods

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