From 2ab9354418fae75190827cb2bb61ce8e4b8bc740 Mon Sep 17 00:00:00 2001 From: SebastianKrupinski Date: Thu, 19 Sep 2024 04:48:29 -0400 Subject: [PATCH] fixup! feat: mail provider settings Signed-off-by: SebastianKrupinski --- apps/dav/lib/CalDAV/Schedule/IMipPlugin.php | 2 +- apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php | 2 +- apps/settings/lib/Listener/SystemMailSettingsListener.php | 2 +- apps/settings/lib/Settings/Admin/SystemMail.php | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php index 182a27c7da37f..ed2df11694f24 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php @@ -265,7 +265,7 @@ public function schedule(Message $iTipMessage) { $mailService = null; try { - if ($this->config->getValueInt('core','mail_providers_disabled', 0) === 0) { + if ($this->config->getValueInt('core', 'mail_providers_disabled', 0) === 0) { // retrieve user object $user = $this->userSession->getUser(); // evaluate if user object exist diff --git a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php index aeeef8da5428e..6c057bb569082 100644 --- a/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php +++ b/apps/dav/tests/unit/CalDAV/Schedule/IMipPluginTest.php @@ -796,7 +796,7 @@ public function testMailProviderDisabled(): void { ->willReturn('yes'); $this->config->expects(self::once()) ->method('getValueInt') - ->with('core','mail_providers_disabled', 0) + ->with('core', 'mail_providers_disabled', 0) ->willReturn(1); $this->service->expects(self::once()) ->method('createInvitationToken') diff --git a/apps/settings/lib/Listener/SystemMailSettingsListener.php b/apps/settings/lib/Listener/SystemMailSettingsListener.php index 28fd3936f939a..13982fca52c0c 100644 --- a/apps/settings/lib/Listener/SystemMailSettingsListener.php +++ b/apps/settings/lib/Listener/SystemMailSettingsListener.php @@ -55,7 +55,7 @@ private function handleSetValue(DeclarativeSettingsSetValueEvent $event): void { switch ($event->getFieldId()) { case 'mail_providers_disabled': - $this->config->setValueInt('core', 'mail_providers_disabled', (int) $event->getValue()); + $this->config->setValueInt('core', 'mail_providers_disabled', (int)$event->getValue()); $event->stopPropagation(); break; } diff --git a/apps/settings/lib/Settings/Admin/SystemMail.php b/apps/settings/lib/Settings/Admin/SystemMail.php index d11509455db40..85c02a3852d4c 100644 --- a/apps/settings/lib/Settings/Admin/SystemMail.php +++ b/apps/settings/lib/Settings/Admin/SystemMail.php @@ -13,9 +13,10 @@ class SystemMail implements IDeclarativeSettingsForm { - public function __construct( - private IL10N $l - ) {} + public function __construct( + private IL10N $l + ) { + } public function getSchema(): array { return [