| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 49 | 29 | public function setResult(Result $result): void |
|
| 50 | { |
||
| 51 | 29 | $resultTask = $result->getTask(); |
|
| 52 | |||
| 53 | 29 | if ($resultTask->getId() !== $this->task()->getId()) { |
|
| 54 | 1 | throw new \LogicException(\sprintf("The result's task (%s: %s) does not match the context's task (%s: %s).", $resultTask->getType(), $resultTask, $this->task()->getType(), $this->task())); |
|
| 55 | } |
||
| 56 | |||
| 57 | 28 | $this->markAsRun(\memory_get_usage(true)); |
|
| 58 | |||
| 59 | 28 | $this->result = $result; |
|
| 60 | 28 | } |
|
| 72 |