Completed
Push — master ( ae08e3...aed614 )
by Alexey
03:06
created

DefaultController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 27
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A behaviors() 0 9 1
A actionIndex() 0 3 1
1
<?php
2
3
namespace modules\admin\controllers;
4
5
use yii\filters\AccessControl;
6
use yii\web\Controller;
7
use modules\main\Module;
8
9
10
/**
11
 * Class DefaultController
12
 * @package modules\admin\controllers
13
 */
14
class DefaultController extends Controller
15
{
16
    /**
17
     * @inheritdoc
18
     */
19
    public function behaviors()
20
    {
21
        return [
22
            'access' => [
23
                'class' => AccessControl::class,
24
                'rules' => [
25
                    [
26
                        'allow' => true,
27
                        'roles' => ['@'],
28
                    ],
29
                ],
30
            ],
31
        ];
32
    }
33
34
    /**
35
     * Renders the index view for the module
36
     * @return string
37
     */
38
    public function actionIndex()
39
    {
40
        return $this->render('index');
41
    }
42
}
43