diff options
author | Georg Ehrke <developer@georgehrke.com> | 2019-08-12 13:20:03 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-08-15 20:05:01 +0200 |
commit | 4d28a4544e1f85046e139146a1be9933e9ff6ae3 (patch) | |
tree | 6f00324fc14b419c0c6e9d8eb7c41c63ce9c9a6e /apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php | |
parent | 2d6473e79b7d9e2e7435020084061d79d707067c (diff) | |
download | nextcloud-server-4d28a4544e1f85046e139146a1be9933e9ff6ae3.tar.gz nextcloud-server-4d28a4544e1f85046e139146a1be9933e9ff6ae3.zip |
Final fixes
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php')
-rw-r--r-- | apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php b/apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php index 3d54970562d..c9bcf2dd064 100644 --- a/apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php +++ b/apps/dav/lib/CalDAV/Reminder/NotificationProviderManager.php @@ -31,8 +31,8 @@ namespace OCA\DAV\CalDAV\Reminder; */ class NotificationProviderManager { - /** @var INotificationProvider[] */ - private $providers = []; + /** @var INotificationProvider[] */ + private $providers = []; /** * Checks whether a provider for a given ACTION exists @@ -45,23 +45,23 @@ class NotificationProviderManager { && isset($this->providers[$type])); } - /** + /** * Get provider for a given ACTION * - * @param string $type - * @return INotificationProvider - * @throws NotificationProvider\ProviderNotAvailableException - * @throws NotificationTypeDoesNotExistException - */ - public function getProvider(string $type):INotificationProvider { - if (in_array($type, ReminderService::REMINDER_TYPES, true)) { - if (isset($this->providers[$type])) { - return $this->providers[$type]; - } - throw new NotificationProvider\ProviderNotAvailableException($type); - } - throw new NotificationTypeDoesNotExistException($type); - } + * @param string $type + * @return INotificationProvider + * @throws NotificationProvider\ProviderNotAvailableException + * @throws NotificationTypeDoesNotExistException + */ + public function getProvider(string $type):INotificationProvider { + if (in_array($type, ReminderService::REMINDER_TYPES, true)) { + if (isset($this->providers[$type])) { + return $this->providers[$type]; + } + throw new NotificationProvider\ProviderNotAvailableException($type); + } + throw new NotificationTypeDoesNotExistException($type); + } /** * Registers a new provider @@ -69,7 +69,7 @@ class NotificationProviderManager { * @param string $providerClassName * @throws \OCP\AppFramework\QueryException */ - public function registerProvider(string $providerClassName):void { + public function registerProvider(string $providerClassName):void { $provider = \OC::$server->query($providerClassName); if (!$provider instanceof INotificationProvider) { |