Skip to content

Commit

Permalink
cleanup PR
Browse files Browse the repository at this point in the history
reset some phar changes in unchanged files, better commenting, fix a minor merge mistake

Signed-off-by: Marvin Winkens <m.winkens@fz-juelich.de>
  • Loading branch information
mwinkens committed Jul 30, 2024
1 parent cdeca86 commit 247c094
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/Activity/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected function getParameters(IEvent $event): array {
];
}

protected function setSubjects(IEvent $event, string $subject, array $parameters): void {
protected function setSubjects(IEvent $event, string $subject, array $parameters) {
$placeholders = $replacements = [];
foreach ($parameters as $placeholder => $parameter) {
$placeholders[] = '{' . $placeholder . '}';
Expand Down
3 changes: 0 additions & 3 deletions lib/AnnouncementSchedulerJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ public function __construct(
$this->setInterval(60);
}

/**
* @return void
*/
protected function run($argument) {
$this->asp->doCron($argument);
}
Expand Down
4 changes: 0 additions & 4 deletions lib/Migration/AnnouncementsGroupsLinks.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,8 @@ public function getName(): string {
* Must throw exception on error.
*
* @since 9.1.0
*
* @param IOutput $output
*
* @throws \Exception in case of failure
*
* @return void
*/
public function run(IOutput $output) {
$queryInsert = $this->connection->getQueryBuilder();
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/Announcement.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function propertyToColumn($property): string {
/**
* @param array $groups a list of groups
*/
public function setGroupsEncode($groups): void {
public function setGroupsEncode($groups) {
// encode groups as a single string for the database
$this->setGroups(json_encode($groups));
}
Expand Down
6 changes: 3 additions & 3 deletions lib/Service/AnnouncementSchedulerProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ public function __construct(AnnouncementMapper $mapper, Manager $manager, ITimeF
$this->logger = $logger;
}

public function doCron($argument): void {
public function doCron($argument) {
$this->logger->debug('Started announcement scheduler');
//first schedule then delete because e-mails might be send
$this->scheduleAnnouncements($argument);
$this->deleteAnnouncements($argument);
$this->logger->debug('Finished announcement scheduler');
}

private function scheduleAnnouncements($argument): void {
private function scheduleAnnouncements($argument) {
$scheduledAnnouncements = $this->mapper->getAnnouncementsScheduled();
foreach ($scheduledAnnouncements as $ann) {
if ($ann->getScheduleTime() > $this->timeFactory->getTime()) {
Expand All @@ -66,7 +66,7 @@ private function scheduleAnnouncements($argument): void {
}
}

private function deleteAnnouncements($argument): void {
private function deleteAnnouncements($argument) {
$deleteAnnouncements = $this->mapper->getAnnouncementsScheduledDelete();
foreach ($deleteAnnouncements as $ann) {
// don't delete unannounced announcements
Expand Down
4 changes: 0 additions & 4 deletions src/Components/Announcement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@

<template v-if="isAdmin">
·
<template v-if="isScheduled">
{{ scheduledLabel }}
·
</template>
<template v-if="isVisibleToEveryone">
{{ visibilityLabel }}
</template>
Expand Down
4 changes: 2 additions & 2 deletions src/banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Vue.mixin({
},
})

// Inject maintenance banner
//
/**
*
* Injects a banner div into the document body in order to attach a Vue element to it
*/
function injectBanner() {
if (document.body) {
Expand Down

0 comments on commit 247c094

Please sign in to comment.