Skip to content

Commit a2df575

Browse files
hbgamrajaviereguiluz
authored andcommitted
Update tags.rst
Optimize getTransport() function
1 parent 59b62f0 commit a2df575

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

service_container/tags.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -405,11 +405,7 @@ To begin with, change the ``TransportChain`` class::
405405

406406
public function getTransport($alias): ?\MailerTransport
407407
{
408-
if (array_key_exists($alias, $this->transports)) {
409-
return $this->transports[$alias];
410-
}
411-
412-
return null;
408+
return return $this->transports[$alias] ?? null;
413409
}
414410
}
415411

0 commit comments

Comments
 (0)