| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | 5 | public function execute(Task $task) |
|
| 43 | { |
||
| 44 | 5 | $method = $task->getName(); |
|
| 45 | 5 | if (!method_exists($this, $method)) { |
|
| 46 | 1 | throw new TaskException(sprintf('Can\'t process {%s} task', $method), TaskException::INVALID_TASK); |
|
| 47 | } |
||
| 48 | |||
| 49 | 4 | $this->$method($task); |
|
| 50 | |||
| 51 | 4 | return $task->getMessageSuccess(); |
|
| 52 | } |
||
| 53 | |||
| 84 |