Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: Improve typing and codestyle in LoginData
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc authored and nextcloud-command committed Nov 13, 2025
commit 28b48eec398c86e55b4a7d0436248bc940e5069c
44 changes: 11 additions & 33 deletions lib/private/Authentication/Login/LoginData.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,26 @@
* 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 {
Expand Down Expand Up @@ -81,7 +59,7 @@ public function getTimeZoneOffset(): string {
/**
* @param IUser|false|null $user
*/
public function setUser($user) {
public function setUser($user): void {
$this->user = $user;
}

Expand Down