@@ -40,7 +40,7 @@ public function __construct(
40
40
41
41
public function __toString (): string
42
42
{
43
- return sprintf ('zulip://%s?channel=%s ' , $ this ->getEndpoint (), $ this ->channel );
43
+ return \ sprintf ('zulip://%s?channel=%s ' , $ this ->getEndpoint (), $ this ->channel );
44
44
}
45
45
46
46
public function supports (MessageInterface $ message ): bool
@@ -61,7 +61,7 @@ protected function doSend(MessageInterface $message): SentMessage
61
61
$ options ['content ' ] = $ message ->getSubject ();
62
62
63
63
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__ ));
65
65
}
66
66
67
67
if (null === $ message ->getRecipientId ()) {
@@ -72,7 +72,7 @@ protected function doSend(MessageInterface $message): SentMessage
72
72
$ options ['to ' ] = $ message ->getRecipientId ();
73
73
}
74
74
75
- $ endpoint = sprintf ('https://%s/api/v1/messages ' , $ this ->getEndpoint ());
75
+ $ endpoint = \ sprintf ('https://%s/api/v1/messages ' , $ this ->getEndpoint ());
76
76
77
77
$ response = $ this ->client ->request ('POST ' , $ endpoint , [
78
78
'auth_basic ' => [$ this ->email , $ this ->token ],
@@ -88,7 +88,7 @@ protected function doSend(MessageInterface $message): SentMessage
88
88
if (200 !== $ statusCode ) {
89
89
$ result = $ response ->toArray (false );
90
90
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 );
92
92
}
93
93
94
94
$ success = $ response ->toArray (false );
0 commit comments