| Total Complexity | 9 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 36.84% |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | abstract class Controller extends \yii\console\Controller |
||
| 20 | { |
||
| 21 | use GettersTrait; |
||
| 22 | |||
| 23 | public $layout = false; |
||
| 24 | |||
| 25 | protected $_before = []; |
||
| 26 | protected $_after = []; |
||
| 27 | |||
| 28 | 1 | public function behaviors() |
|
| 29 | { |
||
| 30 | return [ |
||
| 31 | 1 | CommonBehavior::class, |
|
| 32 | ]; |
||
| 33 | } |
||
| 34 | |||
| 35 | 1 | public function setBefore($requests) |
|
| 36 | { |
||
| 37 | 1 | $this->_before = array_merge($this->getBefore(), $this->normalizeTasks($requests)); |
|
|
|
|||
| 38 | 1 | } |
|
| 39 | |||
| 40 | 1 | public function getBefore() |
|
| 41 | { |
||
| 42 | 1 | return $this->_before; |
|
| 43 | } |
||
| 44 | |||
| 45 | public function setAfter($requests) |
||
| 46 | { |
||
| 47 | $this->_after = array_merge($this->getAfter(), $this->normalizeTasks($requests)); |
||
| 48 | } |
||
| 49 | |||
| 50 | public function getAfter() |
||
| 51 | { |
||
| 52 | return $this->_after; |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Runs list of actions. |
||
| 57 | * @param null|string|array $actions |
||
| 58 | * @return int|Response exit code |
||
| 59 | */ |
||
| 60 | public function runActions($actions) |
||
| 72 | } |
||
| 73 | } |
||
| 74 |