Skip to content

Commit 948ff5c

Browse files
committed
Fix identation, add appropriate not equals checks
1 parent 8931c9e commit 948ff5c

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

lib/AppInfo/Application.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public function register(IRegistrationContext $context): void {
5959

6060
$context->registerEventListener(UserDeletedEvent::class, UserDeletedListener::class);
6161
$context->registerEventListener(BeforeTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class);
62-
$context->registerEventListener(UserCreatedEvent::class, UserCreatedListener::class);
63-
$context->registerEventListener(PostLoginEvent::class, PostLoginListener::class);
62+
$context->registerEventListener(UserCreatedEvent::class, UserCreatedListener::class);
63+
$context->registerEventListener(PostLoginEvent::class, PostLoginListener::class);
6464
}
6565

6666
public function boot(IBootContext $context): void {

lib/Controller/SettingsController.php

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public function personal(int $batchSetting, string $soundNotification, string $s
6060
}
6161

6262
/**
63-
* @PasswordConfirmationRequired
6463
* @AuthorizedAdminSetting(settings=OCA\Notifications\Settings\Admin)
6564
*/
6665
public function admin(int $batchSetting, string $soundNotification, string $soundTalk): DataResponse {

lib/Listener/PostLoginListener.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ public function handle(Event $event): void {
5959
$default_sound_talk = $this->config->getAppValue(Application::APP_ID, 'sound_talk') === 'yes' ? 'yes' : 'no';
6060
$default_batchtime = $this->config->getAppValue(Application::APP_ID, 'setting_batchtime');
6161

62-
if ($default_batchtime != Settings::EMAIL_SEND_WEEKLY
63-
&& $default_batchtime != Settings::EMAIL_SEND_DAILY
64-
&& $default_batchtime != Settings::EMAIL_SEND_3HOURLY
65-
&& $default_batchtime != Settings::EMAIL_SEND_HOURLY
66-
&& $default_batchtime != Settings::EMAIL_SEND_OFF) {
62+
if ($default_batchtime !== Settings::EMAIL_SEND_WEEKLY
63+
&& $default_batchtime !== Settings::EMAIL_SEND_DAILY
64+
&& $default_batchtime !== Settings::EMAIL_SEND_3HOURLY
65+
&& $default_batchtime !== Settings::EMAIL_SEND_HOURLY
66+
&& $default_batchtime !== Settings::EMAIL_SEND_OFF) {
6767
$default_batchtime = Settings::EMAIL_SEND_3HOURLY;
6868
}
6969

lib/Listener/UserCreatedListener.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ public function handle(Event $event): void {
5757
$default_sound_talk = $this->config->getAppValue(Application::APP_ID, 'sound_talk') === 'yes' ? 'yes' : 'no';
5858
$default_batchtime = $this->config->getAppValue(Application::APP_ID, 'setting_batchtime');
5959

60-
if ($default_batchtime != Settings::EMAIL_SEND_WEEKLY
61-
&& $default_batchtime != Settings::EMAIL_SEND_DAILY
62-
&& $default_batchtime != Settings::EMAIL_SEND_3HOURLY
63-
&& $default_batchtime != Settings::EMAIL_SEND_HOURLY
64-
&& $default_batchtime != Settings::EMAIL_SEND_OFF) {
60+
if ($default_batchtime !== Settings::EMAIL_SEND_WEEKLY
61+
&& $default_batchtime !== Settings::EMAIL_SEND_DAILY
62+
&& $default_batchtime !== Settings::EMAIL_SEND_3HOURLY
63+
&& $default_batchtime !== Settings::EMAIL_SEND_HOURLY
64+
&& $default_batchtime !== Settings::EMAIL_SEND_OFF) {
6565
$default_batchtime = Settings::EMAIL_SEND_3HOURLY;
6666
}
6767

0 commit comments

Comments
 (0)