Reformat various code.

This commit is contained in:
James Cole
2022-03-29 15:00:29 +02:00
parent d1a09ff33b
commit d04efb8325
81 changed files with 662 additions and 662 deletions

View File

@@ -81,7 +81,7 @@ class RemoteUserGuard implements Guard
$header = config('auth.guard_email');
if (null !== $header) {
$emailAddress = (string)(request()->server($header) ?? null);
$emailAddress = (string) (request()->server($header) ?? null);
$preference = app('preferences')->getForUser($retrievedUser, 'remote_guard_alt_email');
if (null !== $emailAddress && null === $preference && $emailAddress !== $userID) {
@@ -93,6 +93,14 @@ class RemoteUserGuard implements Guard
$this->user = $retrievedUser;
}
/**
* @inheritDoc
*/
public function guest(): bool
{
return !$this->check();
}
/**
* @inheritDoc
*/
@@ -104,9 +112,17 @@ class RemoteUserGuard implements Guard
/**
* @inheritDoc
*/
public function guest(): bool
public function user(): ?User
{
return !$this->check();
return $this->user;
}
/**
* @inheritDoc
*/
public function hasUser()
{
// TODO: Implement hasUser() method.
}
/**
@@ -125,14 +141,6 @@ class RemoteUserGuard implements Guard
$this->user = $user;
}
/**
* @inheritDoc
*/
public function user(): ?User
{
return $this->user;
}
/**
* @inheritDoc
*/
@@ -140,12 +148,4 @@ class RemoteUserGuard implements Guard
{
throw new FireflyException('Did not implement RemoteUserGuard::validate()');
}
/**
* @inheritDoc
*/
public function hasUser()
{
// TODO: Implement hasUser() method.
}
}