Skip to content

Commit a31b649

Browse files
committed
Changed after code review
1 parent 5f00690 commit a31b649

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Component/Notifier/Recipient/Recipient.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Recipient implements EmailRecipientInterface, SmsRecipientInterface
2626

2727
public function __construct(string $email = '', string $phone = '')
2828
{
29-
if (empty(trim($email)) && empty(trim($phone))) {
29+
if ('' === $email && '' === $phone) {
3030
throw new InvalidArgumentException(sprintf('"%s" needs an email or a phone but both cannot be empty.', static::class));
3131
}
3232

@@ -45,6 +45,8 @@ public function email(string $email): self
4545
}
4646

4747
/**
48+
* Sets the phone number (no spaces, international code like in +3312345678).
49+
*
4850
* @return $this
4951
*/
5052
public function phone(string $phone): self

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy