Passed
Push — master ( 29baaf...069627 )
by Mihail
06:51
created

Widget   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 3
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A actionIndex() 0 6 1
1
<?php
2
3
namespace Apps\Controller\Admin;
4
5
6
use Extend\Core\Arch\AdminController;
7
use Ffcms\Core\App;
8
9
/**
10
 * Class Widget - control of user comments in website.
11
 * This class provide general admin implementation of control for user comments and its settings
12
 * @package Apps\Controller\Admin
13
 */
14
class Widget extends AdminController
15
{
16
    public $type = 'widget';
17
18
    /**
19
     * Widget constructor. Disable installation checking for this controller
20
     */
21
    public function __construct()
22
    {
23
        parent::__construct(false);
24
    }
25
26
    // list all user comments
27
    public function actionIndex()
28
    {
29
        return App::$View->render('index', [
30
            'widgets' => $this->widgets
31
        ]);
32
    }
33
34
}