apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -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;
}
}