From 64f67818bcc6cc61cc49b1a7c032f3db85b73c91 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 30 Apr 2019 12:08:22 +0200 Subject: Fix new core notifier Signed-off-by: Joas Schilling --- .../Authentication/Notifications/Notifier.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'lib/private/Authentication/Notifications') diff --git a/lib/private/Authentication/Notifications/Notifier.php b/lib/private/Authentication/Notifications/Notifier.php index 0aafc115b22..f76bb077a3c 100644 --- a/lib/private/Authentication/Notifications/Notifier.php +++ b/lib/private/Authentication/Notifications/Notifier.php @@ -42,7 +42,7 @@ class Notifier implements INotifier { /** * @inheritDoc */ - public function prepare(INotification $notification, $languageCode) { + public function prepare(INotification $notification, string $languageCode): INotification { if ($notification->getApp() !== 'auth') { // Not my app => throw throw new InvalidArgumentException(); @@ -74,4 +74,23 @@ class Notifier implements INotifier { } } + /** + * Identifier of the notifier, only use [a-z0-9_] + * + * @return string + * @since 17.0.0 + */ + public function getID(): string { + return 'auth'; + } + + /** + * Human readable name describing the notifier + * + * @return string + * @since 17.0.0 + */ + public function getName(): string { + return $this->factory->get('lib')->t('Authentication'); + } } -- cgit v1.2.3