Passed
Pull Request — master (#686)
by Vitor
04:21
created

FieldDefinition::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
dl 0
loc 19
ccs 1
cts 1
cp 1
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 4
crap 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\Provider;
11
12
class FieldDefinition {
13 6
	public function __construct(
14
		/**
15
		 * The key that will store the value into database. Mandatory to have this item.
16
		 */
17
		public string $field,
18
		/**
19
		 * The label that will be displayed. Mandatory
20
		 */
21
		public string $prompt,
22
		/**
23
		 * The default value when the value isn't provided.
24
		 * Not mandatory to have this item
25
		 */
26
		public string $default = '',
27
		/**
28
		 * Default: false. Not mandatory to have this item
29
		 */
30
		public bool $optional = false,
31
	) {
32 6
	}
33
}
34