Passed
Push — master ( 24e026...1404fe )
by Mihail
08:11
created

ActionRoleList   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 10
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A listing() 0 4 1
1
<?php
2
3
namespace Apps\Controller\Admin\User;
4
5
6
use Apps\ActiveRecord\Role;
7
use Ffcms\Core\Arch\View;
8
use Ffcms\Core\Network\Request;
9
use Ffcms\Core\Network\Response;
10
11
/**
12
 * Trait RoleList. List user role groups
13
 * @package Apps\Controller\Admin\User
14
 * @property Request $request
15
 * @property Response $response
16
 * @property View $view
17
 */
18
trait ActionRoleList
19
{
20
    /**
21
     * Show whole role group list
22
     * @return null|string
23
     */
24
    public function listing(): ?string
25
    {
26
        return $this->view->render('user/role_list', [
27
            'records' => Role::all()
28
        ]);
29
}
30
31
}