Add blacklist for actors' given names
This commit is contained in:
@@ -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.
|
* Checks if an tag name is blacklisted.
|
||||||
*
|
*
|
||||||
@@ -201,4 +211,19 @@ final class NodaBlacklistedTerms {
|
|||||||
return true;
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user