Upgrade code to php 8.1 (#6748)

* revert
Fix code indentation
Fix code

Upgrade code to php 8.1

* fix remarques

* code review

* code review

* code review

* Apply suggestions from code review

* code review

* Fixes

* Many remainging updates of array syntax

* Lost case 'reading-list'

* Uneeded PHPDoc

---------

Co-authored-by: Luc Sanchez <l.sanchez-prestataire@alptis.fr>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
This commit is contained in:
authored and GitHub committed 2024-11-28 17:11:04 +01:00
1 parent 604b186638
commit 15745d42b7
81 files changed
+532 -680

No files matched your search

+6 -13
View File
@@ -32,19 +32,12 @@ SQL;
return [];
}
switch ($period) {
case '%H':
$periodMax = 24;
break;
case '%w':
$periodMax = 7;
break;
case '%m':
$periodMax = 12;
break;
default:
$periodMax = 30;
}
$periodMax = match ($period) {
'%H' => 24,
'%w' => 7,
'%m' => 12,
default => 30,
};
$repartition = array_fill(0, $periodMax, 0);
foreach ($res as $value) {