ActionCategoryList   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A contentCategoryList() 0 4 1
1
<?php
2
3
namespace Apps\Controller\Admin\Content;
4
5
use Apps\ActiveRecord\ContentCategory;
6
use Ffcms\Core\Arch\View;
7
use Ffcms\Core\Network\Request;
8
use Ffcms\Core\Network\Response;
9
10
/**
11
 * Class ActionCategoryList
12
 * @package Apps\Controller\Admin\Content
13
 * @property Request $request
14
 * @property Response $response
15
 * @property View $view
16
 */
17
trait ActionCategoryList
18
{
19
    /**
20
     * Display category list
21
     * @return string|null
22
     */
23
    public function contentCategoryList(): ?string
24
    {
25
        return $this->view->render('content/category_list', [
26
            'categories' => ContentCategory::getSortedAll()
27
        ]);
28
    }
29
}
30