@@ -33,14 +33,14 @@ public function __construct(
3333 #[\SensitiveParameter] private readonly string $ apiKey ,
3434 private readonly ?string $ from = null ,
3535 ?HttpClientInterface $ client = null ,
36- ?EventDispatcherInterface $ dispatcher = null
36+ ?EventDispatcherInterface $ dispatcher = null ,
3737 ) {
3838 parent ::__construct ($ client , $ dispatcher );
3939 }
4040
4141 public function __toString (): string
4242 {
43- return sprintf ('smsmode://%s%s ' , $ this ->getEndpoint (), null !== $ this ->from ? '?from= ' .$ this ->from : '' );
43+ return \ sprintf ('smsmode://%s%s ' , $ this ->getEndpoint (), null !== $ this ->from ? '?from= ' .$ this ->from : '' );
4444 }
4545
4646 public function supports (MessageInterface $ message ): bool
@@ -57,15 +57,15 @@ protected function doSend(MessageInterface $message): SentMessage
5757 throw new UnsupportedMessageTypeException (__CLASS__ , SmsMessage::class, $ message );
5858 }
5959
60- $ endpoint = sprintf ('https://%s/sms/v1/messages ' , $ this ->getEndpoint ());
60+ $ endpoint = \ sprintf ('https://%s/sms/v1/messages ' , $ this ->getEndpoint ());
6161
6262 $ options = $ message ->getOptions ()?->toArray() ?? [];
6363 $ options ['body ' ]['text ' ] = $ message ->getSubject ();
6464 $ options ['recipient ' ]['to ' ] = $ message ->getPhone ();
6565 $ options ['from ' ] = $ message ->getFrom () ?: $ this ->from ;
6666
6767 if (!preg_match ('/^[a-zA-Z0-9\s]{1,11}$/ ' , $ options ['from ' ] ?? '' )) {
68- throw new InvalidArgumentException (sprintf ('The "From" value "%s" is not a valid sender ID. ' , $ options ['from ' ]));
68+ throw new InvalidArgumentException (\ sprintf ('The "From" value "%s" is not a valid sender ID. ' , $ options ['from ' ]));
6969 }
7070
7171 $ response = $ this ->client ->request ('POST ' , $ endpoint , [
@@ -84,7 +84,7 @@ protected function doSend(MessageInterface $message): SentMessage
8484
8585 if (201 !== $ statusCode ) {
8686 $ error = $ response ->getContent (false );
87- throw new TransportException (sprintf ('Unable to send the SMS - "%s". ' , $ error ?: 'unknown failure ' ), $ response );
87+ throw new TransportException (\ sprintf ('Unable to send the SMS - "%s". ' , $ error ?: 'unknown failure ' ), $ response );
8888 }
8989
9090 $ success = $ response ->toArray (false );
0 commit comments