$maxLength) { return sprintf('höchstens %d Zeichen (%d angegeben)', $maxLength, strlen($name)); } return null; } /** * @param list $reserved Names of Google, web-safe and uploaded fonts (FontCatalog::reserved()). * @return string|null The existing name $name collides with (case-insensitive), null when it is free. */ public static function taken(string $name, array $reserved): ?string { $lower = strtolower($name); foreach ($reserved as $existing) { if (strtolower($existing) === $lower) { return $existing; } } return null; } }