Skip to content

Commit b15ebf2

Browse files
[MAINTENANCE] Minor maintenance in IndexCommand (kitodo#1694)
1 parent db7b58f commit b15ebf2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Classes/Command/IndexCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function configure(): void
9696
*/
9797
protected function execute(InputInterface $input, OutputInterface $output): int
9898
{
99-
$dryRun = $input->getOption('dry-run') != false ? true : false;
99+
$dryRun = $input->getOption('dry-run') != false;
100100

101101
$io = new SymfonyStyle($input, $output);
102102
$io->title($this->getDescription());
@@ -121,13 +121,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int
121121
foreach ($allSolrCores as $indexName => $uid) {
122122
$outputSolrCores[] = $uid . ' : ' . $indexName;
123123
}
124+
124125
if (empty($outputSolrCores)) {
125126
$io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n");
126-
return Command::FAILURE;
127127
} else {
128128
$io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $outputSolrCores) . "\n");
129-
return Command::FAILURE;
130129
}
130+
return Command::FAILURE;
131131
}
132132
} else {
133133
$io->error('ERROR: Required parameter --solr|-s is missing or array.');

0 commit comments

Comments
 (0)