Skip to content

Commit c93d310

Browse files
docs: rephrase comments to be more descriptive and natural
1 parent 6800b17 commit c93d310

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/Utopia/Messaging/Adapter/SMS/VonageMessages.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
/**
1010
* Vonage Messages API SMS Adapter.
1111
*
12-
* Uses the newer Vonage Messages API (V1) instead of the older SMS API.
13-
* The Messages API is cheaper and supports multiple message types.
12+
* This adapter uses the modern Vonage Messages API (V1) which is more cost-effective
13+
* and versatile than the legacy SMS API.
1414
*
15-
* Reference: https://developer.vonage.com/en/api/messages
15+
* @link https://developer.vonage.com/en/api/messages
1616
*/
1717
class VonageMessages extends SMSAdapter
1818
{
@@ -30,23 +30,23 @@ public function __construct(
3030
}
3131

3232
/**
33-
* Get the API endpoint for the Vonage Messages API.
33+
* Vonage Messages API endpoint.
3434
*/
3535
protected function getApiEndpoint(): string
3636
{
3737
return 'https://api.vonage.com/v1/messages';
3838
}
3939

4040
/**
41-
* Get the authorization header value for the API request.
41+
* Generates the Basic Authorization header.
4242
*/
4343
protected function getAuthorizationHeader(): string
4444
{
4545
return 'Basic ' . \base64_encode("{$this->apiKey}:{$this->apiSecret}");
4646
}
4747

4848
/**
49-
* Build the request headers for the Messages API.
49+
* Sets common headers for the API request.
5050
*
5151
* @return array<string>
5252
*/

tests/Messaging/Adapter/SMS/VonageMessagesTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
class VonageMessagesTest extends Base
1010
{
1111
/**
12+
* Tests sending an SMS with the 'from' number set directly in the adapter.
13+
*
1214
* @throws \Exception
1315
*/
1416
public function testSendSMS(): void
@@ -38,6 +40,8 @@ public function testSendSMS(): void
3840
}
3941

4042
/**
43+
* Tests sending an SMS where the 'from' number is provided by the message object.
44+
*
4145
* @throws \Exception
4246
*/
4347
public function testSendSMSWithFallbackFrom(): void

0 commit comments

Comments
 (0)