AdminPanel::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
/**
4
 * @author Tom Needham <[email protected]>
5
 *
6
 * @copyright Copyright (c) 2018, ownCloud GmbH.
7
 * @license AGPL-3.0
8
 *
9
 * This code is free software: you can redistribute it and/or modify
10
 * it under the terms of the GNU Affero General Public License, version 3,
11
 * as published by the Free Software Foundation.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
 * GNU Affero General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Affero General Public License, version 3,
19
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
20
 *
21
 */
22
23
namespace OCA\Files_Antivirus;
24
25
use OCA\Files_Antivirus\AppInfo\Application;
26
use OCA\Files_Antivirus\Controller\SettingsController;
27
use OCP\Settings\ISettings;
28
29
class AdminPanel implements ISettings {
30
31
	/**
32
	 * @var Application
33
	 */
34
	protected $app;
35
36
	public function __construct(Application $app) {
37
		$this->app = $app;
38
	}
39
40
	public function getPriority() {
41
		return 10;
42
	}
43
44
	public function getPanel() {
45
		return $this->app->getContainer()->query(SettingsController::class)->index();
46
	}
47
48
	public function getSectionID() {
49
		return 'security';
50
	}
51
}
52