From fc3e02fb9ca78b42fbd6fe5ea70e8e7acfe59f33 Mon Sep 17 00:00:00 2001 From: Bas Schleijpen Date: Sun, 31 Mar 2024 18:06:58 +0200 Subject: [PATCH] pass ci codestyle, remove unused code --- src/WhatsAppChannel.php | 1 + src/WhatsAppServiceProvider.php | 1 - src/WhatsAppTextMessage.php | 5 ----- tests/WhatsAppTextMessageTest.php | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/WhatsAppChannel.php b/src/WhatsAppChannel.php index 404096a..0479434 100644 --- a/src/WhatsAppChannel.php +++ b/src/WhatsAppChannel.php @@ -46,6 +46,7 @@ public function send($notifiable, Notification $notification): ?Response $message->getMessage() ); } + return $this->whatsapp->sendTemplate( $message->recipient(), $message->configuredName(), diff --git a/src/WhatsAppServiceProvider.php b/src/WhatsAppServiceProvider.php index a759c31..028b6a3 100644 --- a/src/WhatsAppServiceProvider.php +++ b/src/WhatsAppServiceProvider.php @@ -4,7 +4,6 @@ use Illuminate\Support\ServiceProvider; use Netflie\WhatsAppCloudApi\WhatsAppCloudApi; -use Netflie\WhatsAppCloudApi\WebHook; class WhatsAppServiceProvider extends ServiceProvider { diff --git a/src/WhatsAppTextMessage.php b/src/WhatsAppTextMessage.php index b2d83e4..289a0f8 100644 --- a/src/WhatsAppTextMessage.php +++ b/src/WhatsAppTextMessage.php @@ -2,10 +2,6 @@ namespace NotificationChannels\WhatsApp; -use Netflie\WhatsAppCloudApi\Message\Template\Component as CloudApiComponent; -use NotificationChannels\WhatsApp\Component\Button; -use NotificationChannels\WhatsApp\Component\Component; - class WhatsAppTextMessage { /** @@ -23,7 +19,6 @@ class WhatsAppTextMessage */ protected static string $type = 'text'; - protected function __construct($to = '', $message = '') { $this->to = $to; diff --git a/tests/WhatsAppTextMessageTest.php b/tests/WhatsAppTextMessageTest.php index b22b86f..1d39388 100644 --- a/tests/WhatsAppTextMessageTest.php +++ b/tests/WhatsAppTextMessageTest.php @@ -41,4 +41,4 @@ public function it_can_return_the_message_type() $this->assertEquals('text', $message->type()); } -} \ No newline at end of file +}