Capabilities::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 0
dl 0
loc 3
ccs 0
cts 1
cp 0
rs 10
c 1
b 0
f 1
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * SPDX-FileCopyrightText: 2025 LibreCode coop and contributors
6
 * SPDX-License-Identifier: AGPL-3.0-or-later
7
 */
8
9
namespace OCA\TwoFactorGateway;
10
11
use OCP\App\IAppManager;
12
use OCP\Capabilities\IPublicCapability;
13
use Override;
14
15
/**
16
 * @psalm-import-type TwoFactorGatewayCapabilities from ResponseDefinitions
17
 */
18
final class Capabilities implements IPublicCapability {
19
	public const FEATURES = [
20
	];
21
22
	public function __construct(
23
		protected IAppManager $appManager,
24
	) {
25
	}
26
27
	/**
28
	 * @return array{
0 ignored issues
show
Documentation Bug introduced by
The doc comment array{ at position 2 could not be parsed: the token is null at position 2.
Loading history...
29
	 *      twofactorgateway?: TwoFactorGatewayCapabilities,
30
	 * }
31
	 */
32
	#[Override]
33
	public function getCapabilities(): array {
34
		$capabilities = [
35
			'features' => self::FEATURES,
36
			'config' => [
37
			],
38
			'version' => $this->appManager->getAppVersion('twofactorgateway'),
39
		];
40
41
		return [
42
			'twofactorgateway' => $capabilities,
43
		];
44
	}
45
}
46