ysdsad
All checks were successful
Deploy / deploy (push) Successful in 1m48s

This commit is contained in:
2026-07-24 22:07:00 +02:00
parent 69fa2e029d
commit 56d29f09e5
102 changed files with 20 additions and 3 deletions

View File

@@ -127,6 +127,22 @@ final class Avatar
return $presets;
}
public static function presetGroupForPreset(string $preset): string
{
$preset = preg_replace('/[^a-z0-9_]/', '', strtolower($preset)) ?: '';
if (preg_match('/modern_(\d{3})/', $preset, $matches)) {
$number = (int)$matches[1];
foreach (self::presetGroups() as $groupKey => $group) {
[$start, $end] = $group['range'];
if ($number >= $start && $number <= $end) {
return $groupKey;
}
}
}
return 'fair';
}
public static function selectColumns(string $alias = 'p'): string
{
$columns = array_keys(self::defaults());