| Conditions | 3 |
| Paths | 4 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 11 | public function setRecipient(?User $recipient): void |
|
| 33 | { |
||
| 34 | 11 | if ($this->recipient) { |
|
| 35 | 1 | $this->recipient->messageRemoved($this); |
|
| 36 | } |
||
| 37 | |||
| 38 | 11 | $this->recipient = $recipient; |
|
| 39 | 11 | $this->setOwner($recipient); |
|
| 40 | |||
| 41 | 11 | if ($this->recipient) { |
|
| 42 | 11 | $this->recipient->messageAdded($this); |
|
| 43 | } |
||
| 54 |