Skip to content

Commit 1a335a3

Browse files
committed
Prefix all sprintf() calls
1 parent e516544 commit 1a335a3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Transport/ScalewayApiTransport.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ public function __toString(): string
4343
{
4444
$region = $this->region ? '?region='.$this->region : '';
4545

46-
return sprintf('scaleway+api://%s@%s%s', $this->getEndpoint(), $this->projectId, $region);
46+
return \sprintf('scaleway+api://%s@%s%s', $this->getEndpoint(), $this->projectId, $region);
4747
}
4848

4949
protected function doSendApi(SentMessage $sentMessage, Email $email, Envelope $envelope): ResponseInterface
5050
{
5151
$region = $this->region ?? 'fr-par';
52-
$path = sprintf('/transactional-email/v1alpha1/regions/%s/emails', $region);
52+
$path = \sprintf('/transactional-email/v1alpha1/regions/%s/emails', $region);
5353

5454
$response = $this->client->request('POST', 'https://'.$this->getEndpoint().$path, [
5555
'json' => $this->getPayload($email, $envelope),
@@ -62,13 +62,13 @@ protected function doSendApi(SentMessage $sentMessage, Email $email, Envelope $e
6262
$statusCode = $response->getStatusCode();
6363
$result = $response->toArray(false);
6464
} catch (DecodingExceptionInterface $e) {
65-
throw new HttpTransportException('Unable to send an email: '.$response->getContent(false).sprintf(' (code %d).', $statusCode), $response);
65+
throw new HttpTransportException('Unable to send an email: '.$response->getContent(false).\sprintf(' (code %d).', $statusCode), $response);
6666
} catch (TransportExceptionInterface $e) {
6767
throw new HttpTransportException('Could not reach the remote Scaleway server.', $response, 0, $e);
6868
}
6969

7070
if (200 !== $statusCode) {
71-
throw new HttpTransportException('Unable to send an email: '.$result['message'].sprintf(' (code %d).', $statusCode), $response);
71+
throw new HttpTransportException('Unable to send an email: '.$result['message'].\sprintf(' (code %d).', $statusCode), $response);
7272
}
7373

7474
$sentMessage->setMessageId($result['emails'][0]['message_id']);

0 commit comments

Comments
 (0)