More PHP8.4 updates

This commit is contained in:
James Cole
2025-05-04 13:47:00 +02:00
parent e42107c03c
commit 51e86448c7
195 changed files with 524 additions and 715 deletions

View File

@@ -55,8 +55,8 @@ class FrontpageController extends Controller
if (1 === bccomp($amount, '0')) {
// percentage!
$pct = 0;
if (0 !== bccomp($piggyBank->target_amount, '0')) {
$pct = (int) bcmul(bcdiv($amount, $piggyBank->target_amount), '100');
if (0 !== bccomp((string) $piggyBank->target_amount, '0')) {
$pct = (int) bcmul(bcdiv($amount, (string) $piggyBank->target_amount), '100');
}
$entry = [
@@ -82,9 +82,7 @@ class FrontpageController extends Controller
// sort by current percentage (lowest at the top)
uasort(
$info,
static function (array $a, array $b) {
return $a['percentage'] <=> $b['percentage'];
}
static fn(array $a, array $b) => $a['percentage'] <=> $b['percentage']
);
$html = '';