Fix Laravel Pint formatting

This commit is contained in:
root
2026-06-08 23:30:22 -04:00
parent 567dc24649
commit c792b8be05
1288 changed files with 10766 additions and 9669 deletions
+8 -2
View File
@@ -13,10 +13,12 @@ class UiStyleService
$prefs = Preferences::query()->where('user_id', $userId)->first();
if ($prefs) {
$prefs->fill($updates)->save();
return $prefs->fresh();
}
$updates['user_id'] = $userId;
return Preferences::query()->create($updates);
}
@@ -59,6 +61,7 @@ class UiStyleService
private function sanitizePaletteKey(?string $value): ?string
{
$value = trim((string) $value);
return $value === '' ? null : $value;
}
@@ -68,6 +71,7 @@ class UiStyleService
if (in_array($mode, ['light', 'dark', 'auto'], true)) {
return $mode;
}
return 'auto';
}
@@ -78,17 +82,19 @@ class UiStyleService
return null;
}
if ($h[0] !== '#') {
$h = '#' . $h;
$h = '#'.$h;
}
if (preg_match('/^#([0-9a-fA-F]{3})$/', $h, $m)) {
$r = $m[1][0];
$g = $m[1][1];
$b = $m[1][2];
return strtoupper('#' . $r . $r . $g . $g . $b . $b);
return strtoupper('#'.$r.$r.$g.$g.$b.$b);
}
if (preg_match('/^#([0-9a-fA-F]{6})$/', $h)) {
return strtoupper($h);
}
return null;
}
}