| Conditions | 3 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 3 | ||
| Bugs | 1 | Features | 2 |
| 1 | <?php |
||
| 37 | protected function callMethod() |
||
| 38 | { |
||
| 39 | $command = $this->getCommand(); |
||
| 40 | /** @var Controller $controllerInstance */ |
||
| 41 | $controllerInstance = $this->getCommand()->getActionParam('instance'); |
||
| 42 | if ($this->getCommand()->hasRequest()) { |
||
| 43 | $controllerInstance->setRequest($this->getCommand()->getRequest()); |
||
| 44 | } |
||
| 45 | $method = $command->getActionParam('action'); |
||
| 46 | $params = $command->hasActionParam('params') ? $command->getActionParam('params') : []; |
||
| 47 | return $controllerInstance->{$method}(...$params); |
||
| 48 | } |
||
| 50 |