Skip to content

Commit 3f3f74d

Browse files
committed
Prefix all sprintf() calls
1 parent 5f0e655 commit 3f3f74d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: NovuTransport.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(
3838

3939
public function __toString(): string
4040
{
41-
return sprintf('novu://%s', $this->getEndpoint());
41+
return \sprintf('novu://%s', $this->getEndpoint());
4242
}
4343

4444
public function supports(MessageInterface $message): bool
@@ -69,11 +69,11 @@ protected function doSend(MessageInterface $message): SentMessage
6969
'overrides' => $options['overrides'] ?? [],
7070
];
7171

72-
$endpoint = sprintf('https://%s/v1/events/trigger', $this->getEndpoint());
72+
$endpoint = \sprintf('https://%s/v1/events/trigger', $this->getEndpoint());
7373
$response = $this->client->request('POST', $endpoint, [
7474
'body' => $body,
7575
'headers' => [
76-
'Authorization' => sprintf('ApiKey %s', $this->apiKey),
76+
'Authorization' => \sprintf('ApiKey %s', $this->apiKey),
7777
'Content-Type' => 'application/json',
7878
],
7979
]);
@@ -88,7 +88,7 @@ protected function doSend(MessageInterface $message): SentMessage
8888
$originalContent = $message->getSubject();
8989
$result = $response->toArray(false);
9090
$error = $result['message'];
91-
throw new TransportException(sprintf('Unable to post the Novu message: "%s" (%d: "%s").', $originalContent, $statusCode, $error), $response);
91+
throw new TransportException(\sprintf('Unable to post the Novu message: "%s" (%d: "%s").', $originalContent, $statusCode, $error), $response);
9292
}
9393

9494
return new SentMessage($message, (string) $this);

0 commit comments

Comments
 (0)