Issues (67)

src/console/CommonController.php (1 issue)

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-2018, 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::debug("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
    public function runAction($id, $params = [])
38
    {
39
        $result = parent::runAction($id, $params);
40
41
        return isset($this->beforeResult) ? $this->beforeResult : $result;
0 ignored issues
show
Bug Best Practice introduced by
The property beforeResult does not exist on hidev\console\CommonController. Since you implemented __get, consider adding a @property annotation.
Loading history...
42
    }
43
}
44