info("Test du budget pour le code INSEE: $codeInsee"); try { $budget = $this->budgetService->getBudgetAnnuel($codeInsee); if ($budget !== null) { $io->success("Budget annuel récupéré: " . number_format($budget, 2) . " €"); // Test avec une population fictive $population = 138668; // Population de Tours $budgetParHabitant = $this->budgetService->getBudgetParHabitant($budget, $population); $io->info("Budget par habitant: " . number_format($budgetParHabitant, 2) . " €"); // Test écart à la moyenne $moyenne = 1500; // Moyenne fictive $ecart = $this->budgetService->getEcartMoyenneBudgetParHabitant($budgetParHabitant, $moyenne); $io->info("Écart à la moyenne: " . number_format($ecart, 2) . "%"); } else { $io->warning("Aucun budget récupéré"); } } catch (\Exception $e) { $io->error("Erreur: " . $e->getMessage()); } return Command::SUCCESS; } }