Skip to content

Commit 91d79d8

Browse files
chore: fix static analysis and rename Vonage to VonageLegacy
1 parent 815454f commit 91d79d8

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

src/Utopia/Messaging/Adapter/SMS/Vonage.php renamed to src/Utopia/Messaging/Adapter/SMS/VonageLegacy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
use Utopia\Messaging\Messages\SMS;
1010
use Utopia\Messaging\Response;
1111

12-
class Vonage extends SMSAdapter
12+
class VonageLegacy extends SMSAdapter
1313
{
14-
protected const NAME = 'Vonage';
14+
protected const NAME = 'Vonage Legacy';
1515

1616
/**
1717
* @param string $apiKey Vonage API Key

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ protected function getAuthorizationHeader(): string
3333
return 'Basic ' . \base64_encode("{$this->apiKey}:{$this->apiSecret}");
3434
}
3535

36-
// Sets common headers for the API request.
36+
/**
37+
* @return array<string>
38+
*/
3739
protected function getRequestHeaders(): array
3840
{
3941
return [

tests/Messaging/Adapter/SMS/VonageTest.php renamed to tests/Messaging/Adapter/SMS/VonageLegacyTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
namespace Utopia\Tests\Adapter\SMS;
44

5+
use Utopia\Messaging\Adapter\SMS\VonageLegacy;
56
use Utopia\Tests\Adapter\Base;
67

7-
class VonageTest extends Base
8+
class VonageLegacyTest extends Base
89
{
910
/**
1011
* @throws \Exception
@@ -17,7 +18,7 @@ public function testSendSMS(): void
1718
$apiKey = \getenv('VONAGE_API_KEY');
1819
$apiSecret = \getenv('VONAGE_API_SECRET');
1920
20-
$sender = new Vonage($apiKey, $apiSecret);
21+
$sender = new VonageLegacy($apiKey, $apiSecret);
2122
2223
$message = new SMS(
2324
to: [\getenv('VONAGE_TO')],

0 commit comments

Comments
 (0)