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

AdminSectionSettings::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 2
rs 10
cc 1
nc 1
nop 0
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