mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 18:58:46 +02:00
Fixed code style.
This commit is contained in:
parent
2853e471c4
commit
d0b1024d80
212 changed files with 495 additions and 1005 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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!');
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue