Passed
Push — master ( d80277...8673d0 )
by Christoph
16:23 queued 12s
created

LookupServerSendCheck::shouldRun()   A

Complexity

Conditions 4
Paths 5

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 4
c 0
b 0
f 0
nc 5
nop 0
dl 0
loc 7
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @copyright Copyright (c) 2021 Roeland Jago Douma <[email protected]>
7
 *
8
 * @author Morris Jobke <[email protected]>
9
 * @author Roeland Jago Douma <[email protected]>
10
 *
11
 * @license GNU AGPL version 3 or any later version
12
 *
13
 * This program is free software: you can redistribute it and/or modify
14
 * it under the terms of the GNU Affero General Public License as
15
 * published by the Free Software Foundation, either version 3 of the
16
 * License, or (at your option) any later version.
17
 *
18
 * This program is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
 * GNU Affero General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU Affero General Public License
24
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25
 *
26
 */
27
namespace OC\Repair\NC22;
28
29
use OC\Core\BackgroundJobs\LookupServerSendCheckBackgroundJob;
30
use OCP\BackgroundJob\IJobList;
31
use OCP\IConfig;
32
use OCP\Migration\IOutput;
33
use OCP\Migration\IRepairStep;
34
35
class LookupServerSendCheck implements IRepairStep {
36
	private IJobList $jobList;
37
	private IConfig $config;
38
39
	public function __construct(IJobList $jobList, IConfig $config) {
40
		$this->jobList = $jobList;
41
		$this->config = $config;
42
	}
43
44
	public function getName(): string {
45
		return 'Add background job to set the lookup server share state for users';
46
	}
47
48
	public function run(IOutput $output): void {
49
		$this->jobList->add(LookupServerSendCheckBackgroundJob::class);
50
	}
51
}
52