Fix round() calls for PHP 8.0

This commit is contained in:
James Cole
2020-12-21 09:02:24 +01:00
parent fe66bb1984
commit 670bf26510
10 changed files with 18 additions and 18 deletions

View File

@@ -119,8 +119,8 @@ class WholePeriodChartGenerator
$earnedInfoKey = sprintf('earned-in-%s', $code);
$spentAmount = $spent[$key][$currencyId]['sum'] ?? '0';
$earnedAmount = $earned[$key][$currencyId]['sum'] ?? '0';
$chartData[$spentInfoKey]['entries'][$label] = round($spentAmount, $currency['currency_decimal_places']);
$chartData[$earnedInfoKey]['entries'][$label] = round($earnedAmount, $currency['currency_decimal_places']);
$chartData[$spentInfoKey]['entries'][$label] = round((float) $spentAmount, $currency['currency_decimal_places']);
$chartData[$earnedInfoKey]['entries'][$label] = round((float) $earnedAmount, $currency['currency_decimal_places']);
}
$current = app('navigation')->addPeriod($current, $step, 0);
}