ksort($mapsByLocale);
foreach ($mapsByLocale as $locale =>
$maps) { $parentLocale =
$locale;
while (false !==
$i =
strrpos($parentLocale, '_'
)) { $parentLocale =
substr($parentLocale, 0,
$i);
$maps +=
$mapsByLocale[$parentLocale] ??
[];
} yield strtolower("emoji-
$locale"
) => self::
createRules($maps);
} } public static function buildGitHubRules(array
$emojisCodePoints): iterable
{ $emojis =
json_decode(file_get_contents(__DIR__.'/vendor/github-emojis.json'
), true
);
$ignored =
[];
$maps =
[];
foreach ($emojis as $shortCode =>
$url) {