Completed
Push — new-settings ( 4d5c05 )
by Tom
09:11
created

AdminPanel   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 23
rs 10

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) 2017, 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
	protected $app;
34
35
	public function __construct(Application $app) {
36
		$this->app = $app;
37
	}
38
39
	public function getPriority() {
40
		return 10;
41
	}
42
43
	public function getPanel() {
44
		return $this->app->getContainer()->query(SettingsController::class)->index();
45
	}
46
47
	public function getSectionID() {
48
		return 'security';
49
	}
50
51
}