Passed
Pull Request — master (#778)
by
unknown
08:24
created

AdminSectionSettings   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 5
c 1
b 0
f 0
dl 0
loc 21
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getPriority() 0 2 1
A getID() 0 2 1
A getName() 0 2 1
A getIcon() 0 2 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
7
 * SPDX-License-Identifier: AGPL-3.0-or-later
8
 */
9
10
namespace OCA\TwoFactorGateway\Settings\Admin;
11
12
use OCP\IL10N;
13
use OCP\IURLGenerator;
14
use OCP\Settings\IIconSection;
15
16
class AdminSectionSettings implements IIconSection {
17
	public function __construct(
18
		private IL10N $l,
19
		private IURLGenerator $urlGenerator,
20
	) {
21
	}
22
23
	public function getID(): string {
24
		return 'twofactor_gateway';
25
	}
26
27
	public function getName(): string {
28
		return $this->l->t('Two-Factor Gateway');
29
	}
30
31
	public function getPriority(): int {
32
		return 50;
33
	}
34
35
	public function getIcon(): string {
36
		return $this->urlGenerator->imagePath('twofactor_gateway', 'app.svg');
37
	}
38
}
39