mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Fixed code style.
This commit is contained in:
parent
1aed1d1d26
commit
9a7223a301
142 changed files with 534 additions and 716 deletions
|
@ -42,9 +42,9 @@ class UserRepository extends NamedDBElementRepository implements PasswordUpgrade
|
|||
*
|
||||
* @return User|null
|
||||
*/
|
||||
public function getAnonymousUser() : ?User
|
||||
public function getAnonymousUser(): ?User
|
||||
{
|
||||
if ($this->anonymous_user === null) {
|
||||
if (null === $this->anonymous_user) {
|
||||
$this->anonymous_user = $this->findOneBy([
|
||||
'id' => User::ID_ANONYMOUS,
|
||||
]);
|
||||
|
@ -55,10 +55,12 @@ class UserRepository extends NamedDBElementRepository implements PasswordUpgrade
|
|||
|
||||
/**
|
||||
* Find a user by its name or its email. Useful for login or password reset purposes.
|
||||
*
|
||||
* @param string $name_or_password The username or the email of the user that should be found
|
||||
*
|
||||
* @return User|null The user if it is existing, null if no one matched the criteria
|
||||
*/
|
||||
public function findByEmailOrName(string $name_or_password) : ?User
|
||||
public function findByEmailOrName(string $name_or_password): ?User
|
||||
{
|
||||
if (empty($name_or_password)) {
|
||||
return null;
|
||||
|
@ -79,7 +81,7 @@ class UserRepository extends NamedDBElementRepository implements PasswordUpgrade
|
|||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function upgradePassword(UserInterface $user, string $newEncodedPassword): void
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue