Rector changes and immplementations of required methods

This commit is contained in:
2025-05-22 17:47:07 +02:00
parent 053b92b77c
commit 17db59d221
1138 changed files with 2656 additions and 2616 deletions

View File

@@ -22,6 +22,7 @@ use Symfony\Component\Security\Core\Encoder\EncoderFactory;
/**
* Class SetPasswordCommand.
*/
#[\Symfony\Component\Console\Attribute\AsCommand(name: 'chill:user:set_password')]
class SetPasswordCommand extends Command
{
protected static $defaultDescription = 'set a password to user';
@@ -41,7 +42,7 @@ class SetPasswordCommand extends Command
->findOneBy(['username' => $username]);
}
public function _setPassword(User $user, $password)
public function _setPassword(User $user, $password): void
{
$defaultEncoder = new \Symfony\Component\PasswordHasher\Hasher\MessageDigestPasswordHasher('sha512', true, 5000);
$encoders = [
@@ -54,9 +55,9 @@ class SetPasswordCommand extends Command
$this->entityManager->flush($user);
}
public function configure()
public function configure(): void
{
$this->setName('chill:user:set_password')
$this
->addArgument('username', InputArgument::REQUIRED, 'the user\'s '
.'username you want to change password')
->addArgument('password', InputArgument::OPTIONAL, 'the new password');