From 18613beaaa11ab3bf522a73a2caecca3ac764275 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Wed, 11 Feb 2026 14:40:11 +0100 Subject: [PATCH] Add blacklist for actors' given names --- src/NodaBlacklistedTerms.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/NodaBlacklistedTerms.php b/src/NodaBlacklistedTerms.php index b4f3046..340112f 100644 --- a/src/NodaBlacklistedTerms.php +++ b/src/NodaBlacklistedTerms.php @@ -97,6 +97,16 @@ final class NodaBlacklistedTerms { ], ]; + public const ACTOR_GIVEN_NAMES_BLACKLIST = [ + 'Doktor', + 'Dr.', + 'PhD.', + 'Dr', + 'Frau', + 'Herr', + ]; + + /** * Checks if an tag name is blacklisted. * @@ -201,4 +211,19 @@ final class NodaBlacklistedTerms { return true; } + + /** + * Checks if an actor's given name is in the specific blacklist for those. + * Returns true if the name is blacklisted. + * + * @param string $given_name Given name. + * + * @return boolean + */ + public static function checkActorGivenNameIsBlacklisted(string $given_name):bool { + + if (in_array($given_name, self::ACTOR_GIVEN_NAMES_BLACKLIST)) return true; + else return false; + + } }