*/ class GroupDeleted implements IEventListener { /** @var SyncService */ private $syncService; /** * GroupDeleted constructor. * * @param SyncService $syncService */ public function __construct(SyncService $syncService) { $this->syncService = $syncService; } public function handle(Event $event): void { if (!($event instanceof GroupDeletedEvent)) { return; } $group = $event->getGroup(); try { $this->syncService->groupDeleted($group->getGID()); } catch (Exception $e) { } } }