Extend concordance list for entry types
This commit is contained in:
parent
76c3ee052e
commit
f08ea28622
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user