Skip to content

Commit 134725b

Browse files
CS fixes
1 parent 5094f3c commit 134725b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

SmsmodeTransport.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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);

Tests/SmsmodeTransportTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function testInvalidArgumentExceptionIsThrownIfFromIsInvalid(string $from
4848
$transport = $this->createTransport(null, $from);
4949

5050
$this->expectException(InvalidArgumentException::class);
51-
$this->expectExceptionMessage(sprintf('The "From" value "%s" is not a valid sender ID.', $from));
51+
$this->expectExceptionMessage(\sprintf('The "From" value "%s" is not a valid sender ID.', $from));
5252

5353
$transport->send(new SmsMessage('+33612345678', 'Hello!'));
5454
}

0 commit comments

Comments
 (0)