mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 04:03:26 +00:00
chore: reformat code.
This commit is contained in:
@@ -47,8 +47,8 @@ class RemoteUserGuard implements Guard
|
||||
/**
|
||||
* Create a new authentication guard.
|
||||
*
|
||||
* @param UserProvider $provider
|
||||
* @param Application $app
|
||||
* @param UserProvider $provider
|
||||
* @param Application $app
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
@@ -112,6 +112,15 @@ class RemoteUserGuard implements Guard
|
||||
$this->user = $retrievedUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function guest(): bool
|
||||
{
|
||||
Log::debug(sprintf('Now at %s', __METHOD__));
|
||||
return !$this->check();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@@ -124,10 +133,16 @@ class RemoteUserGuard implements Guard
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function guest(): bool
|
||||
public function user(): ?User
|
||||
{
|
||||
Log::debug(sprintf('Now at %s', __METHOD__));
|
||||
return !$this->check();
|
||||
$user = $this->user;
|
||||
if (null === $user) {
|
||||
Log::debug('User is NULL');
|
||||
return null;
|
||||
}
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -157,21 +172,6 @@ class RemoteUserGuard implements Guard
|
||||
$this->user = $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function user(): ?User
|
||||
{
|
||||
Log::debug(sprintf('Now at %s', __METHOD__));
|
||||
$user = $this->user;
|
||||
if (null === $user) {
|
||||
Log::debug('User is NULL');
|
||||
return null;
|
||||
}
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
Reference in New Issue
Block a user