Skip to content

Commit

Permalink
chore: Migrate to OCP version of QueuedJob
Browse files Browse the repository at this point in the history
Keeps compatibility with server master

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Feb 12, 2024
1 parent f36f3e4 commit bf8b503
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions lib/Notification/BackgroundJob.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<?php

declare(strict_types=1);

/**
* @copyright Copyright (c) 2016 Joas Schilling <coding@schilljs.com>
*
Expand All @@ -21,25 +24,18 @@

namespace OCA\FirstRunWizard\Notification;

use OC\BackgroundJob\QueuedJob;
use OCP\BackgroundJob\QueuedJob;
use OCP\Notification\IManager as INotificationManager;

class BackgroundJob extends QueuedJob {

/** @var INotificationManager */
protected $notificationManager;

/**
* BackgroundJob constructor.
*
* @param INotificationManager $notificationManager
*/
public function __construct(INotificationManager $notificationManager) {
$this->notificationManager = $notificationManager;
public function __construct(
protected INotificationManager $notificationManager,
) {
}

/**
* @param array $argument
* @return void
*/
protected function run($argument) {
$notification = $this->notificationManager->createNotification();
Expand Down

0 comments on commit bf8b503

Please sign in to comment.