SettingController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 7
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A actionIndex() 0 4 1
1
<?php
2
3
/**
4
 *  _   __ __ _____ _____ ___  ____  _____
5
 * | | / // // ___//_  _//   ||  __||_   _|
6
 * | |/ // /(__  )  / / / /| || |     | |
7
 * |___//_//____/  /_/ /_/ |_||_|     |_|
8
 * @link https://vistart.me/
9
 * @copyright Copyright (c) 2016 - 2017 vistart
10
 * @license https://vistart.me/license/
11
 */
12
13
namespace rhosocial\user\web\user\controllers;
14
15
use yii\web\Controller;
16
17
/**
18
 * Settings Controller.
19
 * The controller is only used as a demonstration, you need to develop and cover
20
 * the controller and view yourself.
21
 * The specific apporach is as follow:
22
 *
23
 * First, you need to implement `SettingController` and corresponding view(s), for example:
24
```php
25
namespace app\controllers;
26
27
use yii\web\Controller;
28
29
class SettingController extends Controller
30
{
31
    public $layout = '//main'; // If you want to use your own layout, please assign a absolute path.
32
    public function actionIndex()
33
    {
34
        return $this->render('//setting/index'); // If you want to use your own view, please pass a absolute path.
35
    }
36
    ...
37
}
38
```
39
 * Then, you need to specify your own controller in the module's controllerMap property:
40
```
41
    'modules' => [
42
        'user' => [
43
            'class' => 'rhosocial\user\web\user\Module,
44
            'controllerMap' => [
45
                'setting' => [
46
                    'class' => 'app\controllers\SettingController',
47
                ],
48
            ],
49
        ],
50
    ],
51
```
52
 * @version 1.0
53
 * @author vistart <[email protected]>
54
 */
55
class SettingController extends Controller
56
{
57
    public function actionIndex()
58
    {
59
        return $this->render('index');
60
    }
61
}
62