Fixed code style.

This commit is contained in:
Jan Böhmer 2020-08-21 21:36:22 +02:00
parent 2853e471c4
commit d0b1024d80
212 changed files with 495 additions and 1005 deletions

View file

@ -123,7 +123,7 @@ class CleanAttachmentsCommand extends Command
$continue = $io->confirm(sprintf('Found %d abandoned files. Do you want to delete them? This can not be undone!', count($file_list)), false);
if (! $continue) {
if (!$continue) {
//We are finished here, when no files should be deleted
return 0;
}

View file

@ -154,14 +154,14 @@ class ConvertBBCodeCommand extends Command
foreach ($results as $result) {
/** @var AbstractNamedDBElement $result */
$io->writeln(
'Convert entity: '.$result->getName().' (' . get_class($result) . ': ' . $result->getID() . ')',
'Convert entity: '.$result->getName().' ('.get_class($result).': '.$result->getID().')',
OutputInterface::VERBOSITY_VERBOSE
);
foreach ($properties as $property) {
//Retrieve bbcode from entity
$bbcode = $this->propertyAccessor->getValue($result, $property);
//Check if the current property really contains BBCode
if (! preg_match(static::BBCODE_REGEX, $bbcode)) {
if (!preg_match(static::BBCODE_REGEX, $bbcode)) {
continue;
}
$io->writeln(
@ -182,7 +182,7 @@ class ConvertBBCodeCommand extends Command
}
//If we are not in dry run, save changes to DB
if (! $input->getOption('dry-run')) {
if (!$input->getOption('dry-run')) {
$this->em->flush();
$io->success('Changes saved to DB successfully!');
}

View file

@ -102,14 +102,14 @@ class SetPasswordCommand extends Command
sprintf('You are going to change the password of %s with ID %d. Proceed?',
$user->getFullName(true), $user->getID()));
if (! $proceed) {
if (!$proceed) {
return 1;
}
$success = false;
$new_password = '';
while (! $success) {
while (!$success) {
$pw1 = $io->askHidden('Please enter new password:');
$pw2 = $io->askHidden('Please confirm:');
if ($pw1 !== $pw2) {

View file

@ -97,7 +97,7 @@ class UpdateExchangeRatesCommand extends Command
$iso_code = $input->getArgument('iso_code');
$repo = $this->em->getRepository(Currency::class);
if (! empty($iso_code)) {
if (!empty($iso_code)) {
$candidates = $repo->findBy(['iso_code' => $iso_code]);
} else {
$candidates = $repo->findAll();