Code Duplication    Length = 26-26 lines in 2 locations

lib/Panels/AdminPanel.php 1 location

@@ 27-52 (lines=26) @@
24
use OCP\Settings\ISettings;
25
use OCP\Template;
26
27
class AdminPanel implements ISettings {
28
29
	/** @var SecurityConfig */
30
	private $config;
31
32
	public function __construct(SecurityConfig $config) {
33
		$this->config = $config;
34
	}
35
36
	public function getPanel() {
37
		$params = $this->config->getAllSecurityConfigs();
38
		$tmpl = new Template('security', 'settings-admin');
39
		foreach ($params as $key => $value) {
40
			$tmpl->assign($key, $value);
41
		}
42
		return $tmpl;
43
	}
44
45
	public function getSectionID() {
46
		return 'security';
47
	}
48
49
	public function getPriority() {
50
		return 100;
51
	}
52
}

lib/Panels/PersonalPanel.php 1 location

@@ 26-51 (lines=26) @@
23
use OCP\Settings\ISettings;
24
use OCP\Template;
25
26
class PersonalPanel implements ISettings {
27
28
	/** @var SecurityConfig */
29
	private $config;
30
31
	public function __construct(SecurityConfig $config) {
32
		$this->config = $config;
33
	}
34
35
	public function getPanel() {
36
		$params = $this->config->getAllSecurityConfigs();
37
		$tmpl = new Template('security', 'settings-personal');
38
		foreach ($params as $key => $value) {
39
			$tmpl->assign($key, $value);
40
		}
41
		return $tmpl;
42
	}
43
44
	public function getSectionID() {
45
		return 'general';
46
	}
47
48
	public function getPriority() {
49
		return 0;
50
	}
51
}