Extend concordance list for entry types

This commit is contained in:
Joshua Ramon Enslin 2024-11-13 17:16:55 +01:00
parent 76c3ee052e
commit f08ea28622
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -40,6 +40,8 @@ final class MDConcEntryTypes implements MDImporterConcordanceListInterface {
"Seiffen" => "0",
"aus" => "0",
"Gerd" => "0",
"D-Einsiedel" => "0",
"D-Einsiedel," => "0",
"Hersteller" => "0",
// 1: Donation
@ -315,11 +317,16 @@ final class MDConcEntryTypes implements MDImporterConcordanceListInterface {
*/
public static function getConcordanceTarget(string $input):string {
if (!isset(self::ENTRY_TYPES_VERBOSE[$input])) {
throw new MDImporterMissingConcordance("Unknown entry type: " . $input);
if (isset(self::ENTRY_TYPES_VERBOSE[$input])) {
return self::ENTRY_TYPES_VERBOSE[$input];
}
return self::ENTRY_TYPES_VERBOSE[$input];
$inputTrimmed = trim($input, " ,;.-_\t\n");
if (isset(self::ENTRY_TYPES_VERBOSE[$inputTrimmed])) {
return self::ENTRY_TYPES_VERBOSE[$inputTrimmed];
}
throw new MDImporterMissingConcordance("Unknown entry type: " . $input);
}
}