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

AdminSettings::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 2
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\AppFramework\Http\TemplateResponse;
13
use OCP\AppFramework\Services\IInitialState;
14
use OCP\IAppConfig;
15
use OCP\Settings\ISettings;
16
use OCP\Util;
17
18
class AdminSettings implements ISettings {
19
	public function __construct(
20
		private IAppConfig $appConfig,
21
		private IInitialState $initialState,
22
	) {
23
	}
24
25
	public function getForm(): TemplateResponse {
26
		Util::addScript('twofactor_gateway', 'whatsapp-settings-simple');
27
28
		return new TemplateResponse('twofactor_gateway', 'admin_whatsapp_settings');
29
	}
30
31
	public function getSection(): string {
32
		return 'twofactor_gateway';
33
	}
34
35
	public function getPriority(): int {
36
		return 10;
37
	}
38
}
39