Rétablir la compatibilité avec PHP 8.2

This commit is contained in:
Alexandre NOEL 2026-09-03 22:43:59 +02:00
commit 63224d8b06
12 changed files with 16 additions and 16 deletions

View file

@ -136,7 +136,7 @@ final class SystemHealthService
return [
'checks' => $checks,
'summary' => $summary,
'generated_at' => new DateTimeImmutable('now', new DateTimeZone('Europe/Paris'))->format('d/m/Y H:i:s'),
'generated_at' => (new DateTimeImmutable('now', new DateTimeZone('Europe/Paris')))->format('d/m/Y H:i:s'),
'php' => PHP_VERSION,
'sqlite' => (string) $db->query('SELECT sqlite_version()')->fetchColumn(),
];
@ -181,7 +181,7 @@ final class SystemHealthService
$lines = file($path, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) ?: [];
$dates = [];
for ($i = 0; $i < $days; $i++) {
$dates[] = new DateTimeImmutable("-$i days")->format('d-M-Y');
$dates[] = (new DateTimeImmutable("-$i days"))->format('d-M-Y');
}
$count = 0;
foreach (array_slice($lines, -1000) as $line) {