Skip to content

Commit f9ffa26

Browse files
committed
bug #663 Fixing add user password validation (chr-hertel)
This PR was merged into the master branch. Discussion ---------- Fixing add user password validation Fixing password validation in `AddUserCommand`. added type hint to `$io`-var enabling IDE completion to prevent things like that in future changes Commits ------- e9566c0 fixing add user password validation
2 parents 71ebca4 + e9566c0 commit f9ffa26

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Command/AddUserCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@
4444
*/
4545
class AddUserCommand extends Command
4646
{
47+
/**
48+
* @var SymfonyStyle
49+
*/
4750
private $io;
51+
4852
private $entityManager;
4953
private $passwordEncoder;
5054
private $validator;
@@ -130,7 +134,7 @@ protected function interact(InputInterface $input, OutputInterface $output)
130134
if (null !== $password) {
131135
$this->io->text(' > <info>Password</info>: '.str_repeat('*', mb_strlen($password)));
132136
} else {
133-
$password = $this->io->askHidden('Password (your type will be hidden)', null, [$this->validator, 'validatePassword']);
137+
$password = $this->io->askHidden('Password (your type will be hidden)', [$this->validator, 'validatePassword']);
134138
$input->setArgument('password', $password);
135139
}
136140

0 commit comments

Comments
 (0)