Skip to content

Commit 24f8977

Browse files
committed
changed type hints
1 parent 8ad35ba commit 24f8977

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

DelayedSmtpEnvelope.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@
1111

1212
namespace Symfony\Component\Mailer;
1313

14-
use Symfony\Component\Mailer\Exception\InvalidArgumentException;
1514
use Symfony\Component\Mailer\Exception\LogicException;
1615
use Symfony\Component\Mime\Address;
1716
use Symfony\Component\Mime\Header\Headers;
1817
use Symfony\Component\Mime\Message;
19-
use Symfony\Component\Mime\RawMessage;
2018

2119
/**
2220
* @author Fabien Potencier <fabien@symfony.com>
@@ -31,13 +29,8 @@ final class DelayedSmtpEnvelope extends SmtpEnvelope
3129
private $recipientsSet = false;
3230
private $message;
3331

34-
public function __construct(RawMessage $message)
32+
public function __construct(Message $message)
3533
{
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-
4134
$this->message = $message;
4235
}
4336

Tests/SmtpEnvelopeTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,4 @@ public function testRecipientsFromHeaders()
9191
$e = SmtpEnvelope::create(new Message($headers));
9292
$this->assertEquals([new Address('to@symfony.com'), new Address('cc@symfony.com'), new Address('bcc@symfony.com')], $e->getRecipients());
9393
}
94-
95-
public function testCreateWithRawMessage()
96-
{
97-
$this->expectException(\InvalidArgumentException::class);
98-
SmtpEnvelope::create(new RawMessage(''));
99-
}
10094
}

0 commit comments

Comments
 (0)