| Conditions | 6 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 3 | public function process(TaskInterface $task): TaskInterface |
|
| 23 | { |
||
| 24 | 3 | foreach ($this->listenerProvider->getListenersForEvent($task) as $listener) { |
|
| 25 | 3 | $task = call_user_func($listener, $task); |
|
| 26 | 3 | if (!is_object($task) || !($task instanceof TaskInterface)) { |
|
| 27 | 1 | throw new TaskResultViolation(); |
|
| 28 | } |
||
| 29 | 3 | if ($task instanceof StoppableTaskInterface && $task->isPropagationStopped()) { |
|
| 30 | 3 | break; |
|
| 31 | } |
||
| 32 | } |
||
| 33 | 2 | return $task; |
|
| 34 | } |
||
| 36 |