| Total Complexity | 8 |
| Total Lines | 70 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | trait MessageProxy |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Dynamically call the default driver instance. |
||
| 11 | * |
||
| 12 | * @param array $parameters |
||
| 13 | * |
||
| 14 | * @return mixed |
||
| 15 | */ |
||
| 16 | public function __call(string $method, $parameters) |
||
| 17 | { |
||
| 18 | return $this->message->$method(...$parameters); |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Set the subject of the message. |
||
| 23 | * |
||
| 24 | * @param string $subject |
||
| 25 | * |
||
| 26 | * @return $this |
||
| 27 | */ |
||
| 28 | public function subject($subject) |
||
| 33 | } |
||
| 34 | |||
| 35 | public function addTo(...$addresses) |
||
| 36 | { |
||
| 37 | $this->addAddresses($addresses, 'to'); |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @param $addresses |
||
| 42 | * @param $type |
||
| 43 | * |
||
| 44 | * @return $this |
||
| 45 | */ |
||
| 46 | protected function addAddresses($addresses, $type): self |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param $addresses |
||
| 58 | * |
||
| 59 | * @return Address[] |
||
| 60 | */ |
||
| 61 | protected function addressesToArray($addresses): array |
||
| 77 | } |
||
| 78 | } |
||
| 79 |