Merge pull request #24324 from nextcloud/td/psalm/backgroundjob_job

Fix the OCP\BackgroundJob\Job to make it compatible with  its interface
This commit is contained in:
Roeland Jago Douma 2020-11-24 13:16:12 +01:00 committed by GitHub
commit d4fd61b7c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,7 +68,7 @@ abstract class Job implements IJob {
*
* @since 15.0.0
*/
public function execute($jobList, ILogger $logger = null) {
public function execute(IJobList $jobList, ILogger $logger = null) {
$jobList->setLastRun($this);
if ($logger === null) {
$logger = \OC::$server->getLogger();
@ -95,14 +95,14 @@ abstract class Job implements IJob {
/**
* @since 15.0.0
*/
final public function setId($id) {
final public function setId(int $id) {
$this->id = $id;
}
/**
* @since 15.0.0
*/
final public function setLastRun($lastRun) {
final public function setLastRun(int $lastRun) {
$this->lastRun = $lastRun;
}