Skip to content

Commit 0eecc8e

Browse files
committed
Tweak the code to avoid fabbot false positives
1 parent 5de45c7 commit 0eecc8e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Transport/AbstractApiTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function doSendHttp(SentMessage $message): ResponseInterface
3131
try {
3232
$email = MessageConverter::toEmail($message->getOriginalMessage());
3333
} catch (\Exception $e) {
34-
throw new RuntimeException(sprintf('Unable to send message with the "%s" transport: %s.', __CLASS__, $e->getMessage()), 0, $e);
34+
throw new RuntimeException(sprintf('Unable to send message with the "%s" transport: '.$e->getMessage(), __CLASS__), 0, $e);
3535
}
3636

3737
return $this->doSendApi($message, $email, $message->getEnvelope());

Transport/Smtp/Stream/ProcessStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function initialize(): void
4141
$this->stream = proc_open($this->command, $descriptorSpec, $pipes);
4242
stream_set_blocking($pipes[2], false);
4343
if ($err = stream_get_contents($pipes[2])) {
44-
throw new TransportException(sprintf('Process could not be started: %s.', $err));
44+
throw new TransportException('Process could not be started: '.$err);
4545
}
4646
$this->in = &$pipes[0];
4747
$this->out = &$pipes[1];

Transport/Smtp/Stream/SocketStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function initialize(): void
135135
$streamContext = stream_context_create($options);
136136

137137
set_error_handler(function ($type, $msg) {
138-
throw new TransportException(sprintf('Connection could not be established with host "%s": %s.', $this->url, $msg));
138+
throw new TransportException(sprintf('Connection could not be established with host "%s": '.$msg, $this->url));
139139
});
140140
try {
141141
$this->stream = stream_socket_client($this->url, $errno, $errstr, $this->timeout, STREAM_CLIENT_CONNECT, $streamContext);

0 commit comments

Comments
 (0)