Skip to content

Commit 65dc630

Browse files
committed
Prefix all sprintf() calls
1 parent 48b3e1a commit 65dc630

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ZulipTransport.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct(
4040

4141
public function __toString(): string
4242
{
43-
return sprintf('zulip://%s?channel=%s', $this->getEndpoint(), $this->channel);
43+
return \sprintf('zulip://%s?channel=%s', $this->getEndpoint(), $this->channel);
4444
}
4545

4646
public function supports(MessageInterface $message): bool
@@ -61,7 +61,7 @@ protected function doSend(MessageInterface $message): SentMessage
6161
$options['content'] = $message->getSubject();
6262

6363
if (null === $message->getRecipientId() && empty($options['topic'])) {
64-
throw new LogicException(sprintf('The "%s" transport requires a topic when posting to streams.', __CLASS__));
64+
throw new LogicException(\sprintf('The "%s" transport requires a topic when posting to streams.', __CLASS__));
6565
}
6666

6767
if (null === $message->getRecipientId()) {
@@ -72,7 +72,7 @@ protected function doSend(MessageInterface $message): SentMessage
7272
$options['to'] = $message->getRecipientId();
7373
}
7474

75-
$endpoint = sprintf('https://%s/api/v1/messages', $this->getEndpoint());
75+
$endpoint = \sprintf('https://%s/api/v1/messages', $this->getEndpoint());
7676

7777
$response = $this->client->request('POST', $endpoint, [
7878
'auth_basic' => [$this->email, $this->token],
@@ -88,7 +88,7 @@ protected function doSend(MessageInterface $message): SentMessage
8888
if (200 !== $statusCode) {
8989
$result = $response->toArray(false);
9090

91-
throw new TransportException(sprintf('Unable to post the Zulip message: "%s" (%s).', $result['msg'], $result['code']), $response);
91+
throw new TransportException(\sprintf('Unable to post the Zulip message: "%s" (%s).', $result['msg'], $result['code']), $response);
9292
}
9393

9494
$success = $response->toArray(false);

0 commit comments

Comments
 (0)