File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -102,11 +102,14 @@ public function getOptions(): ?MessageOptionsInterface
102102 /**
103103 * @return $this
104104 */
105- public function transport (string $ transport ): self
105+ public function transport (? string $ transport ): self
106106 {
107107 if (!$ this ->message instanceof Email) {
108108 throw new LogicException ('Cannot set a Transport on a RawMessage instance. ' );
109109 }
110+ if (null === $ transport ) {
111+ return $ this ;
112+ }
110113
111114 $ this ->message ->getHeaders ()->addTextHeader ('X-Transport ' , $ transport );
112115
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ public function getSubject(): string
8383 /**
8484 * @return $this
8585 */
86- public function transport (string $ transport ): self
86+ public function transport (? string $ transport ): self
8787 {
8888 $ this ->transport = $ transport ;
8989
You can’t perform that action at this time.
0 commit comments