Skip to content

Commit 6204cc6

Browse files
CS fixes
1 parent 9f02a35 commit 6204cc6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Transport/SesApiAsyncAwsTransport.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ public function __toString(): string
3838
$host = $configuration->get('region');
3939
}
4040

41-
return sprintf('ses+api://%s@%s', $configuration->get('accessKeyId'), $host);
41+
return \sprintf('ses+api://%s@%s', $configuration->get('accessKeyId'), $host);
4242
}
4343

4444
protected function getRequest(SentMessage $message): SendEmailRequest
4545
{
4646
try {
4747
$email = MessageConverter::toEmail($message->getOriginalMessage());
4848
} catch (\Exception $e) {
49-
throw new RuntimeException(sprintf('Unable to send message with the "%s" transport: ', __CLASS__).$e->getMessage(), 0, $e);
49+
throw new RuntimeException(\sprintf('Unable to send message with the "%s" transport: ', __CLASS__).$e->getMessage(), 0, $e);
5050
}
5151

5252
if ($email->getAttachments()) {
@@ -127,7 +127,7 @@ protected function stringifyAddress(Address $a): string
127127
{
128128
// AWS does not support UTF-8 address
129129
if (preg_match('~[\x00-\x08\x10-\x19\x7F-\xFF\r\n]~', $name = $a->getName())) {
130-
return sprintf('=?UTF-8?B?%s?= <%s>',
130+
return \sprintf('=?UTF-8?B?%s?= <%s>',
131131
base64_encode($name),
132132
$a->getEncodedAddress()
133133
);

Transport/SesHttpAsyncAwsTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function __toString(): string
4848
$host = $configuration->get('region');
4949
}
5050

51-
return sprintf('ses+https://%s@%s', $configuration->get('accessKeyId'), $host);
51+
return \sprintf('ses+https://%s@%s', $configuration->get('accessKeyId'), $host);
5252
}
5353

5454
protected function doSend(SentMessage $message): void
@@ -60,7 +60,7 @@ protected function doSend(SentMessage $message): void
6060
$message->setMessageId($result->getMessageId());
6161
$message->appendDebug($response->getInfo('debug') ?? '');
6262
} catch (HttpException $e) {
63-
$exception = new HttpTransportException(sprintf('Unable to send an email: %s (code %s).', $e->getAwsMessage() ?: $e->getMessage(), $e->getAwsCode() ?: $e->getCode()), $e->getResponse(), $e->getCode(), $e);
63+
$exception = new HttpTransportException(\sprintf('Unable to send an email: %s (code %s).', $e->getAwsMessage() ?: $e->getMessage(), $e->getAwsCode() ?: $e->getCode()), $e->getResponse(), $e->getCode(), $e);
6464
$exception->appendDebug($e->getResponse()->getInfo('debug') ?? '');
6565

6666
throw $exception;

Transport/SesSmtpTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class SesSmtpTransport extends EsmtpTransport
3131
public function __construct(string $username, #[\SensitiveParameter] string $password, ?string $region = null, ?EventDispatcherInterface $dispatcher = null, ?LoggerInterface $logger = null, string $host = 'default')
3232
{
3333
if ('default' === $host) {
34-
$host = sprintf('email-smtp.%s.amazonaws.com', $region ?: 'eu-west-1');
34+
$host = \sprintf('email-smtp.%s.amazonaws.com', $region ?: 'eu-west-1');
3535
}
3636

3737
parent::__construct($host, 465, true, $dispatcher, $logger);

0 commit comments

Comments
 (0)