Skip to content

Commit

Permalink
Fix identation, add appropriate not equals checks
Browse files Browse the repository at this point in the history
Signed-off-by: Топонен Никита <Toponen@lanit.ru>
  • Loading branch information
natoponen committed Nov 15, 2022
1 parent f0eb250 commit 425bd9d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions lib/AppInfo/Application.php
Expand Up @@ -59,8 +59,8 @@ public function register(IRegistrationContext $context): void {

$context->registerEventListener(UserDeletedEvent::class, UserDeletedListener::class);
$context->registerEventListener(BeforeTemplateRenderedEvent::class, BeforeTemplateRenderedListener::class);
$context->registerEventListener(UserCreatedEvent::class, UserCreatedListener::class);
$context->registerEventListener(PostLoginEvent::class, PostLoginListener::class);
$context->registerEventListener(UserCreatedEvent::class, UserCreatedListener::class);
$context->registerEventListener(PostLoginEvent::class, PostLoginListener::class);
}

public function boot(IBootContext $context): void {
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/SettingsController.php
Expand Up @@ -60,7 +60,6 @@ public function personal(int $batchSetting, string $soundNotification, string $s
}

/**
* @PasswordConfirmationRequired
* @AuthorizedAdminSetting(settings=OCA\Notifications\Settings\Admin)
*/
public function admin(int $batchSetting, string $soundNotification, string $soundTalk): DataResponse {
Expand Down
10 changes: 5 additions & 5 deletions lib/Listener/PostLoginListener.php
Expand Up @@ -59,11 +59,11 @@ public function handle(Event $event): void {
$default_sound_talk = $this->config->getAppValue(Application::APP_ID, 'sound_talk') === 'yes' ? 'yes' : 'no';
$default_batchtime = $this->config->getAppValue(Application::APP_ID, 'setting_batchtime');

if ($default_batchtime != Settings::EMAIL_SEND_WEEKLY
&& $default_batchtime != Settings::EMAIL_SEND_DAILY
&& $default_batchtime != Settings::EMAIL_SEND_3HOURLY
&& $default_batchtime != Settings::EMAIL_SEND_HOURLY
&& $default_batchtime != Settings::EMAIL_SEND_OFF) {
if ($default_batchtime !== Settings::EMAIL_SEND_WEEKLY
&& $default_batchtime !== Settings::EMAIL_SEND_DAILY
&& $default_batchtime !== Settings::EMAIL_SEND_3HOURLY
&& $default_batchtime !== Settings::EMAIL_SEND_HOURLY
&& $default_batchtime !== Settings::EMAIL_SEND_OFF) {
$default_batchtime = Settings::EMAIL_SEND_3HOURLY;
}

Expand Down
10 changes: 5 additions & 5 deletions lib/Listener/UserCreatedListener.php
Expand Up @@ -57,11 +57,11 @@ public function handle(Event $event): void {
$default_sound_talk = $this->config->getAppValue(Application::APP_ID, 'sound_talk') === 'yes' ? 'yes' : 'no';
$default_batchtime = $this->config->getAppValue(Application::APP_ID, 'setting_batchtime');

if ($default_batchtime != Settings::EMAIL_SEND_WEEKLY
&& $default_batchtime != Settings::EMAIL_SEND_DAILY
&& $default_batchtime != Settings::EMAIL_SEND_3HOURLY
&& $default_batchtime != Settings::EMAIL_SEND_HOURLY
&& $default_batchtime != Settings::EMAIL_SEND_OFF) {
if ($default_batchtime !== Settings::EMAIL_SEND_WEEKLY
&& $default_batchtime !== Settings::EMAIL_SEND_DAILY
&& $default_batchtime !== Settings::EMAIL_SEND_3HOURLY
&& $default_batchtime !== Settings::EMAIL_SEND_HOURLY
&& $default_batchtime !== Settings::EMAIL_SEND_OFF) {
$default_batchtime = Settings::EMAIL_SEND_3HOURLY;
}

Expand Down

0 comments on commit 425bd9d

Please sign in to comment.