aboutsummaryrefslogtreecommitdiffstats
path: root/core/Data
diff options
context:
space:
mode:
authorFaraz Samapoor <f.samapoor@gmail.com>2023-06-23 23:03:56 +0330
committerFaraz Samapoor <fsa@adlas.at>2023-06-23 23:03:56 +0330
commite98cf3c37481ef92fbb2f50de16ea00d2958f3c3 (patch)
treecba89a58c0a9634e8d687a4d99a29b4158fa6aa8 /core/Data
parent877ddd28277e6bd263832209f4d22e713b4bdd87 (diff)
downloadnextcloud-server-e98cf3c37481ef92fbb2f50de16ea00d2958f3c3.tar.gz
nextcloud-server-e98cf3c37481ef92fbb2f50de16ea00d2958f3c3.zip
Uses PHP8's constructor property promotion.
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
Diffstat (limited to 'core/Data')
-rw-r--r--core/Data/LoginFlowV2Credentials.php16
-rw-r--r--core/Data/LoginFlowV2Tokens.php12
2 files changed, 9 insertions, 19 deletions
diff --git a/core/Data/LoginFlowV2Credentials.php b/core/Data/LoginFlowV2Credentials.php
index 4bcd8ab7f92..ab9aeea12b3 100644
--- a/core/Data/LoginFlowV2Credentials.php
+++ b/core/Data/LoginFlowV2Credentials.php
@@ -26,17 +26,11 @@ declare(strict_types=1);
namespace OC\Core\Data;
class LoginFlowV2Credentials implements \JsonSerializable {
- /** @var string */
- private $server;
- /** @var string */
- private $loginName;
- /** @var string */
- private $appPassword;
-
- public function __construct(string $server, string $loginName, string $appPassword) {
- $this->server = $server;
- $this->loginName = $loginName;
- $this->appPassword = $appPassword;
+ public function __construct(
+ private string $server,
+ private string $loginName,
+ private string $appPassword,
+ ) {
}
/**
diff --git a/core/Data/LoginFlowV2Tokens.php b/core/Data/LoginFlowV2Tokens.php
index c247a49fe0a..1ce05b6dfb3 100644
--- a/core/Data/LoginFlowV2Tokens.php
+++ b/core/Data/LoginFlowV2Tokens.php
@@ -26,14 +26,10 @@ declare(strict_types=1);
namespace OC\Core\Data;
class LoginFlowV2Tokens {
- /** @var string */
- private $loginToken;
- /** @var string */
- private $pollToken;
-
- public function __construct(string $loginToken, string $pollToken) {
- $this->loginToken = $loginToken;
- $this->pollToken = $pollToken;
+ public function __construct(
+ private string $loginToken,
+ private string $pollToken,
+ ) {
}
public function getPollToken(): string {