chore: reformat code.

This commit is contained in:
James Cole
2023-06-21 12:34:58 +02:00
parent 8d87abde64
commit 3dcb35710b
799 changed files with 23319 additions and 22173 deletions

View File

@@ -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
*/