mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 10:40:40 -04:00
chore: Improve typing and codestyle in LoginData
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
26a0cea1b7
commit
247b60869f
1 changed files with 11 additions and 33 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue