mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 23:53:50 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -13,7 +13,6 @@ namespace Chill\MainBundle\Command;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use LogicException;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
@@ -59,7 +58,7 @@ class SetPasswordCommand extends Command
|
||||
$this->setName('chill:user:set_password')
|
||||
->setDescription('set a password to user')
|
||||
->addArgument('username', InputArgument::REQUIRED, 'the user\'s '
|
||||
. 'username you want to change password')
|
||||
.'username you want to change password')
|
||||
->addArgument('password', InputArgument::OPTIONAL, 'the new password');
|
||||
}
|
||||
|
||||
@@ -68,8 +67,7 @@ class SetPasswordCommand extends Command
|
||||
$user = $this->_getUser($input->getArgument('username'));
|
||||
|
||||
if (null === $user) {
|
||||
throw new LogicException("The user with username '" .
|
||||
$input->getArgument('username') . "' is not found");
|
||||
throw new \LogicException("The user with username '".$input->getArgument('username')."' is not found");
|
||||
}
|
||||
|
||||
$password = $input->getArgument('password');
|
||||
@@ -77,10 +75,11 @@ class SetPasswordCommand extends Command
|
||||
if (null === $password) {
|
||||
$dialog = $this->getHelperSet()->get('dialog');
|
||||
$password = $dialog->askHiddenResponse($output, '<question>the new password :'
|
||||
. '</question>');
|
||||
.'</question>');
|
||||
}
|
||||
|
||||
$this->_setPassword($user, $password);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user