add trend UX + PHPStan level 6 clean (0 errors)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gwadaking
2026-04-03 16:06:13 -04:00
parent 997e2d186c
commit 0d323b871b
26 changed files with 471 additions and 78 deletions

View File

@@ -63,6 +63,8 @@ class SpotScoreController extends AbstractController
/**
* Score à un instant précis (sans cache).
*
* @return array{value: int, level: string, distance: float|null, density: float|null, trend: string|null, computedAt: string}|null
*/
private function loadScoreAt(string $spotId, \DateTimeImmutable $at): ?array
{
@@ -81,6 +83,8 @@ class SpotScoreController extends AbstractController
/**
* Scores estimés par horizon à partir des forecasts les plus récents.
* Retourne null si aucun forecast disponible.
*
* @return array<string, array{score: int, level: string, distanceKm: float, confidence: float, validAt: string}>|null
*/
private function loadHorizonScores(string $spotId): ?array
{
@@ -125,6 +129,10 @@ class SpotScoreController extends AbstractController
return $horizons;
}
/**
* @param array<string, mixed> $row
* @return array{value: int, level: string, distance: float|null, density: float|null, trend: string|null, computedAt: string}
*/
private function formatScore(array $row): array
{
return [