diff --git a/src/Symfony/Component/Mailer/Transport/RoundRobinTransport.php b/src/Symfony/Component/Mailer/Transport/RoundRobinTransport.php index 4f004784efde8..37128dda62470 100644 --- a/src/Symfony/Component/Mailer/Transport/RoundRobinTransport.php +++ b/src/Symfony/Component/Mailer/Transport/RoundRobinTransport.php @@ -35,7 +35,7 @@ class RoundRobinTransport implements TransportInterface public function __construct(array $transports, int $retryPeriod = 60) { if (!$transports) { - throw new TransportException(__CLASS__.' must have at least one transport configured.'); + throw new TransportException(sprintf('"%s" must have at least one transport configured.', static::class)); } $this->transports = $transports; @@ -58,9 +58,7 @@ public function send(RawMessage $message, Envelope $envelope = null): ?SentMessa public function __toString(): string { - return $this->getNameSymbol().'('.implode(' ', array_map(function (TransportInterface $transport) { - return (string) $transport; - }, $this->transports)).')'; + return $this->getNameSymbol().'('.implode(' ', array_map('strval', $this->transports)).')'; } /** diff --git a/src/Symfony/Component/Mailer/Transport/Transports.php b/src/Symfony/Component/Mailer/Transport/Transports.php index 38c868862ffb0..c8f7970b32ef5 100644 --- a/src/Symfony/Component/Mailer/Transport/Transports.php +++ b/src/Symfony/Component/Mailer/Transport/Transports.php @@ -21,7 +21,7 @@ /** * @author Fabien Potencier */ -class Transports implements TransportInterface +final class Transports implements TransportInterface { private $transports; private $default; @@ -64,6 +64,6 @@ public function send(RawMessage $message, Envelope $envelope = null): ?SentMessa public function __toString(): string { - return 'all'; + return '['.implode(',', array_keys($this->transports)).']'; } } 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