diff --git a/exceptions/MDImporterBlacklistedConcordanceTerm.php b/exceptions/MDImporterBlacklistedConcordanceTerm.php new file mode 100644 index 0000000..69b233f --- /dev/null +++ b/exceptions/MDImporterBlacklistedConcordanceTerm.php @@ -0,0 +1,18 @@ + MDObjectDamageType::desiccation, ]; + private const DAMAGE_TYPES_BLACKLIST = [ + 'keine', + ]; + /** * Require a function for getting the concordance target. * @@ -28,6 +32,11 @@ final class MDConcDamageTypes implements MDImporterConcordanceListInterface { public static function getConcordanceTarget(string $input):MDObjectDamageType { if (!isset(self::DAMAGE_TYPES[$input])) { + + if (in_array($input, self::DAMAGE_TYPES_BLACKLIST, true)) { + throw new MDImporterBlacklistedConcordanceTerm("Invalid damage type: " . $input); + } + throw new MDImporterMissingConcordance("Unknown damage type: " . $input); }