Skip to content

Commit

Permalink
Adjust variable names to match naming standards
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrycze-volk committed Jun 12, 2024
1 parent 564bfd4 commit e6e4e54
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions Classes/Command/HarvestCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}
// Abort if solrCoreUid is empty or not in the array of allowed solr cores.
if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) {
$output_solrCores = [];
foreach ($allSolrCores as $index_name => $uid) {
$output_solrCores[] = $uid . ' : ' . $index_name;
$outputSolrCores = [];
foreach ($allSolrCores as $indexName => $uid) {
$outputSolrCores[] = $uid . ' : ' . $indexName;
}
if (empty($output_solrCores)) {
if (empty($outputSolrCores)) {
$io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n");
return BaseCommand::FAILURE;
} else {
$io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $output_solrCores) . "\n");
$io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $outputSolrCores) . "\n");
return BaseCommand::FAILURE;
}
}
Expand Down
10 changes: 5 additions & 5 deletions Classes/Command/IndexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ protected function execute(InputInterface $input, OutputInterface $output): int

// Abort if solrCoreUid is empty or not in the array of allowed solr cores.
if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) {
$output_solrCores = [];
foreach ($allSolrCores as $index_name => $uid) {
$output_solrCores[] = $uid . ' : ' . $index_name;
$outputSolrCores = [];
foreach ($allSolrCores as $indexName => $uid) {
$outputSolrCores[] = $uid . ' : ' . $indexName;
}
if (empty($output_solrCores)) {
if (empty($outputSolrCores)) {
$io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n");
return BaseCommand::FAILURE;
} else {
$io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $output_solrCores) . "\n");
$io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $outputSolrCores) . "\n");
return BaseCommand::FAILURE;
}
}
Expand Down
10 changes: 5 additions & 5 deletions Classes/Command/ReindexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ protected function execute(InputInterface $input, OutputInterface $output): int

// Abort if solrCoreUid is empty or not in the array of allowed solr cores.
if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) {
$output_solrCores = [];
foreach ($allSolrCores as $index_name => $uid) {
$output_solrCores[] = $uid . ' : ' . $index_name;
$outputSolrCores = [];
foreach ($allSolrCores as $indexName => $uid) {
$outputSolrCores[] = $uid . ' : ' . $indexName;
}
if (empty($output_solrCores)) {
if (empty($outputSolrCores)) {
$io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. No valid cores found on PID ' . $this->storagePid . ".\n");
return BaseCommand::FAILURE;
} else {
$io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $output_solrCores) . "\n");
$io->error('ERROR: No valid Solr core ("' . $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . implode("\n", $outputSolrCores) . "\n");
return BaseCommand::FAILURE;
}
}
Expand Down

0 comments on commit e6e4e54

Please sign in to comment.