Make EmailMessage & SmsMessage transport nullable
This commit is contained in:
parent
73a70acb2b
commit
d98aca06d0
@ -97,11 +97,14 @@ final class EmailMessage implements MessageInterface
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function transport(string $transport): self
|
||||
public function transport(?string $transport): self
|
||||
{
|
||||
if (!$this->message instanceof Email) {
|
||||
throw new LogicException('Cannot set a Transport on a RawMessage instance.');
|
||||
}
|
||||
if (null === $transport) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$this->message->getHeaders()->addTextHeader('X-Transport', $transport);
|
||||
|
||||
|
@ -81,7 +81,7 @@ final class SmsMessage implements MessageInterface
|
||||
/**
|
||||
* @return $this
|
||||
*/
|
||||
public function transport(string $transport): self
|
||||
public function transport(?string $transport): self
|
||||
{
|
||||
$this->transport = $transport;
|
||||
|
||||
|
Reference in New Issue
Block a user