add trend UX + PHPStan level 6 clean (0 errors)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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 [
|
||||
|
||||
Reference in New Issue
Block a user