diff --git a/service_container/tags.rst b/service_container/tags.rst index a29f7c76472..1d0e5b52a6e 100644 --- a/service_container/tags.rst +++ b/service_container/tags.rst @@ -401,11 +401,7 @@ To begin with, change the ``TransportChain`` class:: public function getTransport($alias): ?\MailerTransport { - if (array_key_exists($alias, $this->transports)) { - return $this->transports[$alias]; - } - - return null; + return $this->transports[$alias] ?? null; } }