diff --git a/app/Listeners/DataIntegrationSubscriber.php b/app/Listeners/ProcessSpeedtestDataIntegrations.php similarity index 52% rename from app/Listeners/DataIntegrationSubscriber.php rename to app/Listeners/ProcessSpeedtestDataIntegrations.php index 4c1bbc668..effb9bdbd 100644 --- a/app/Listeners/DataIntegrationSubscriber.php +++ b/app/Listeners/ProcessSpeedtestDataIntegrations.php @@ -6,9 +6,8 @@ use App\Events\SpeedtestFailed; use App\Jobs\Influxdb\v2\WriteResult; use App\Settings\DataIntegrationSettings; -use Illuminate\Events\Dispatcher; -class DataIntegrationSubscriber +class ProcessSpeedtestDataIntegrations { /** * Create the event listener. @@ -20,23 +19,10 @@ public function __construct( /** * Handle the event. */ - public function handle(object $event): void + public function handle(SpeedtestCompleted|SpeedtestFailed $event): void { if ($this->settings->influxdb_v2_enabled) { WriteResult::dispatch($event->result); } } - - /** - * Register the listeners for the subscriber. - * - * @return array - */ - public function subscribe(Dispatcher $events): array - { - return [ - SpeedtestCompleted::class => 'handleSpeedtestCompleted', - SpeedtestFailed::class => 'handleSpeedtestFailed', - ]; - } }