*
* @param int $id
*/
- private function deleteShare(int $id) {
+ private function deleteShare(int $id): void {
$qb = $this->connection->getQueryBuilder();
$qb->delete('share')
->where($qb->expr()->eq('id', $qb->createNamedParameter($id)));
*
* @param array $data
*/
- private function processShare(array $data) {
+ private function processShare(array $data): void {
$id = $data['id'];
$this->addToNotify($data['uid_owner']);
*
* @param string $uid
*/
- private function addToNotify(string $uid) {
+ private function addToNotify(string $uid): void {
if (!isset($this->userToNotify[$uid])) {
$this->userToNotify[$uid] = true;
}
/**
* Send all notifications
*/
- private function sendNotification() {
+ private function sendNotification(): void {
$time = $this->timeFactory->getDateTime();
$notification = $this->notificationManager->createNotification();
$notification->setApp('core')
->setDateTime($time)
->setObject('repair', 'exposing_links')
- ->setSubject('repair_exposing_links', []);
+ ->setSubject('repair_exposing_links');
$users = array_keys($this->userToNotify);
foreach ($users as $user) {
}
}
- private function repair(IOutput $output) {
+ private function repair(IOutput $output): void {
$total = $this->getTotal();
$output->startProgress($total);
$this->sendNotification();
}
- public function run(IOutput $output) {
+ public function run(IOutput $output): void {
if ($this->shouldRun()) {
$output->info('Removing potentially over exposing link shares');
$this->repair($output);