Skip to content

Commit 06b6464

Browse files
committed
changed type hints
1 parent f6a6fb6 commit 06b6464

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/Symfony/Component/Mailer/DelayedSmtpEnvelope.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,8 @@ final class DelayedSmtpEnvelope extends SmtpEnvelope
3131
private $recipientsSet = false;
3232
private $message;
3333

34-
public function __construct(RawMessage $message)
34+
public function __construct(Message $message)
3535
{
36-
if (!$message instanceof Message) {
37-
// FIXME: parse the raw message to create the envelope?
38-
throw new InvalidArgumentException(sprintf('Unable to create an SmtpEnvelope from a "%s" message.', RawMessage::class));
39-
}
40-
4136
$this->message = $message;
4237
}
4338

src/Symfony/Component/Mime/MessageConverter.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,12 @@ final class MessageConverter
2828
/**
2929
* @throws RuntimeException when unable to convert the message to an email
3030
*/
31-
public static function toEmail(RawMessage $message): Email
31+
public static function toEmail(Message $message): Email
3232
{
3333
if ($message instanceof Email) {
3434
return $message;
3535
}
3636

37-
if (RawMessage::class === \get_class($message)) {
38-
// FIXME: parse the raw message to create the envelope?
39-
throw new RuntimeException(sprintf('Unable to create an Email from an instance of "%s" as it is not supported yet.', RawMessage::class));
40-
}
41-
4237
// try to convert to a "simple" Email instance
4338
$body = $message->getBody();
4439
if ($body instanceof TextPart) {

0 commit comments

Comments
 (0)