Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

refactor: remove SendsWebhook interface

Andras Bacsai556d93ecb88f
diff --git a/app/Models/Team.php b/app/Models/Team.php
index 211ea8ade5..0bdda9272e 100644
--- a/app/Models/Team.php
+++ b/app/Models/Team.php
@@ -7,7 +7,6 @@ use App\Notifications\Channels\SendsDiscord;
use App\Notifications\Channels\SendsEmail;
use App\Notifications\Channels\SendsPushover;
use App\Notifications\Channels\SendsSlack;
-use App\Notifications\Channels\SendsWebhook;
use App\Traits\HasNotificationSettings;
use App\Traits\HasSafeStringAttribute;
use Illuminate\Database\Eloquent\Casts\Attribute;
@@ -37,7 +36,7 @@ use OpenApi\Attributes as OA;
]
)]
-class Team extends Model implements SendsDiscord, SendsEmail, SendsPushover, SendsSlack, SendsWebhook
+class Team extends Model implements SendsDiscord, SendsEmail, SendsPushover, SendsSlack
{
use HasFactory, HasNotificationSettings, HasSafeStringAttribute, Notifiable;
@@ -167,11 +166,6 @@ class Team extends Model implements SendsDiscord, SendsEmail, SendsPushover, Sen
];
}
- public function routeNotificationForWebhook()
- {
- return data_get($this, 'webhook_url', null);
- }
-
public function getRecipients(): array
{
$recipients = $this->members()->pluck('email')->toArray();
diff --git a/app/Notifications/Channels/SendsWebhook.php b/app/Notifications/Channels/SendsWebhook.php
deleted file mode 100644
index 9301a4ff0c..0000000000
--- a/app/Notifications/Channels/SendsWebhook.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-
-namespace App\Notifications\Channels;
-
-interface SendsWebhook
-{
- public function routeNotificationForWebhook();
-}
diff --git a/app/Notifications/Channels/WebhookChannel.php b/app/Notifications/Channels/WebhookChannel.php
index 129e0628ba..8c3e74b17c 100644
--- a/app/Notifications/Channels/WebhookChannel.php
+++ b/app/Notifications/Channels/WebhookChannel.php
@@ -10,7 +10,7 @@ class WebhookChannel
/**
* Send the given notification.
*/
- public function send(SendsWebhook $notifiable, Notification $notification): void
+ public function send($notifiable, Notification $notification): void
{
$webhookSettings = $notifiable->webhookNotificationSettings;