| Total Complexity | 6 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 7 | class Mail extends Email |
||
| 8 | { |
||
| 9 | private ?MailAttachmentsConfig $mailAttachmentsConfig = null; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * @var string[] |
||
| 13 | */ |
||
| 14 | private array $attachmentUrls = []; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @return mixed[] |
||
| 18 | */ |
||
| 19 | public function __serialize(): array |
||
| 20 | { |
||
| 21 | $data = parent::__serialize(); |
||
| 22 | |||
| 23 | $data[] = $this->mailAttachmentsConfig; |
||
| 24 | $data[] = $this->attachmentUrls; |
||
| 25 | |||
| 26 | return $data; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param mixed[] $data |
||
| 31 | */ |
||
| 32 | public function __unserialize(array $data): void |
||
| 33 | { |
||
| 34 | [$this->mailAttachmentsConfig, $this->attachmentUrls] = array_splice($data, -2, 2); |
||
| 35 | |||
| 36 | parent::__unserialize($data); |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getMailAttachmentsConfig(): ?MailAttachmentsConfig |
||
| 40 | { |
||
| 41 | return $this->mailAttachmentsConfig; |
||
| 42 | } |
||
| 43 | |||
| 44 | public function setMailAttachmentsConfig(?MailAttachmentsConfig $mailAttachmentsConfig): self |
||
| 45 | { |
||
| 46 | $this->mailAttachmentsConfig = $mailAttachmentsConfig; |
||
| 47 | |||
| 48 | return $this; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return string[] |
||
| 53 | */ |
||
| 54 | public function getAttachmentUrls(): array |
||
| 57 | } |
||
| 58 | |||
| 59 | public function addAttachmentUrl(string $url): self |
||
| 64 | } |
||
| 65 | } |
||
| 66 |