Completed
Push — master ( 54b8af...0621ed )
by Andrii
13:32
created

CommonController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A actionIndex() 0 4 1
A actions() 0 9 2
1
<?php
2
/**
3
 * Automation tool mixed with code generator for easier continuous development.
4
 *
5
 * @link      https://github.com/hiqdev/hidev
6
 * @package   hidev
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hidev\console;
12
13
use Yii;
14
15
/**
16
 * Common controller.
17
 */
18
class CommonController extends \hidev\base\Controller
19
{
20
    use \hiqdev\yii2\collection\ManagerTrait;
21
22
    public function actionIndex()
23
    {
24
        Yii::trace("Started: '$this->id'");
25
    }
26
27
    public function actions()
28
    {
29
        $actions = [];
30
        foreach ($this->keys() as $name) {
31
            $actions[$name] = ['class' => CommonAction::class];
32
        }
33
34
        return $actions;
35
    }
36
}
37