AdminPanel   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 23
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getPriority() 0 3 1
A getPanel() 0 3 1
A getSectionID() 0 3 1
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