diff --git a/lib/private/Authentication/Login/LoginData.php b/lib/private/Authentication/Login/LoginData.php index 1ad97a9d559..2567da9b340 100644 --- a/lib/private/Authentication/Login/LoginData.php +++ b/lib/private/Authentication/Login/LoginData.php @@ -6,48 +6,26 @@ declare(strict_types=1); * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + namespace OC\Authentication\Login; use OCP\IRequest; use OCP\IUser; class LoginData { - /** @var IRequest */ - private $request; - - /** @var string */ - private $username; - - /** @var string */ - private $password; - - /** @var string */ - private $redirectUrl; - - /** @var string */ - private $timeZone; - - /** @var string */ - private $timeZoneOffset; - /** @var IUser|false|null */ private $user = null; - /** @var bool */ - private $rememberLogin = true; + private bool $rememberLogin = true; - public function __construct(IRequest $request, - string $username, - ?string $password, - ?string $redirectUrl = null, - string $timeZone = '', - string $timeZoneOffset = '') { - $this->request = $request; - $this->username = $username; - $this->password = $password; - $this->redirectUrl = $redirectUrl; - $this->timeZone = $timeZone; - $this->timeZoneOffset = $timeZoneOffset; + public function __construct( + private IRequest $request, + private string $username, + private ?string $password, + private ?string $redirectUrl = null, + private string $timeZone = '', + private string $timeZoneOffset = '', + ) { } public function getRequest(): IRequest { @@ -81,7 +59,7 @@ class LoginData { /** * @param IUser|false|null $user */ - public function setUser($user) { + public function setUser($user): void { $this->user = $user; }