aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/Lib/DefinitionParameter.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib/Lib/DefinitionParameter.php')
-rw-r--r--apps/files_external/lib/Lib/DefinitionParameter.php21
1 files changed, 7 insertions, 14 deletions
diff --git a/apps/files_external/lib/Lib/DefinitionParameter.php b/apps/files_external/lib/Lib/DefinitionParameter.php
index 584fee1e498..a73dd2df967 100644
--- a/apps/files_external/lib/Lib/DefinitionParameter.php
+++ b/apps/files_external/lib/Lib/DefinitionParameter.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -18,18 +19,12 @@ class DefinitionParameter implements \JsonSerializable {
public const VALUE_TEXT = 0;
public const VALUE_BOOLEAN = 1;
public const VALUE_PASSWORD = 2;
- public const VALUE_HIDDEN = 3;
/** Flag constants */
public const FLAG_NONE = 0;
public const FLAG_OPTIONAL = 1;
public const FLAG_USER_PROVIDED = 2;
-
- /** @var string name of parameter */
- private string $name;
-
- /** @var string human-readable parameter text */
- private string $text;
+ public const FLAG_HIDDEN = 4;
/** @var string human-readable parameter tooltip */
private string $tooltip = '';
@@ -40,18 +35,16 @@ class DefinitionParameter implements \JsonSerializable {
/** @var int flags, see self::FLAG_* constants */
private int $flags = self::FLAG_NONE;
- /** @var mixed */
- private $defaultValue;
-
/**
* @param string $name parameter name
* @param string $text parameter description
* @param mixed $defaultValue default value
*/
- public function __construct(string $name, string $text, $defaultValue = null) {
- $this->name = $name;
- $this->text = $text;
- $this->defaultValue = $defaultValue;
+ public function __construct(
+ private string $name,
+ private string $text,
+ private $defaultValue = null,
+ ) {
}
/**