Clean up code.

This commit is contained in:
James Cole
2023-12-10 06:45:59 +01:00
parent 9a807fc215
commit c2b22a2bac
157 changed files with 648 additions and 669 deletions

View File

@@ -128,7 +128,7 @@ class FrontpageChartGenerator
{
$currencyId = (int)$currency['currency_id'];
$this->currencies[$currencyId] = $this->currencies[$currencyId] ?? [
$this->currencies[$currencyId] ??= [
'currency_id' => $currencyId,
'currency_name' => $currency['currency_name'],
'currency_symbol' => $currency['currency_symbol'],

View File

@@ -152,7 +152,7 @@ class WholePeriodChartGenerator
$return = [];
foreach ($array as $block) {
foreach ($block as $currencyId => $currencyRow) {
$return[$currencyId] = $return[$currencyId] ?? [
$return[$currencyId] ??= [
'currency_id' => $currencyId,
'currency_name' => $currencyRow['currency_name'],
'currency_symbol' => $currencyRow['currency_symbol'],