refactor: improve code quality across controllers and services

- DRY FurniEditorController: extract duplicate try/catch blocks into handleApiError(),
  formatItemData(), buildUpdateData(), buildInsertData(), castValue() methods
- ProfileController: replace 45 lines of manual date formatting with Carbon's diffForHumans()
- Replace custom Password rule (180 lines) with Laravel's built-in Password::min() rule
- RadioController: extract RadioStreamService and RadioScheduleService, reducing from 608 to 323 lines
- Add RadioSettings enum to replace magic strings throughout radio feature
- Add CurrencyTypes::columnName() helper method
- Add consistent return types (JsonResponse, View, RedirectResponse) to all controller methods
This commit is contained in:
root
2026-05-19 19:16:59 +02:00
parent 8567ce6951
commit 81e99933e4
9 changed files with 636 additions and 731 deletions
+10
View File
@@ -30,6 +30,16 @@ enum CurrencyTypes: int
};
}
public function columnName(): string
{
return match ($this) {
self::Credits => 'credits',
self::Duckets => 'duckets',
self::Diamonds => 'diamonds',
self::Points => 'points',
};
}
public function getImage(): string
{
return match ($this->value) {