From b5dc96f98bf4f387d241bcb313b0e4680f55eb63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Mon, 1 May 2023 23:02:57 +0200 Subject: [PATCH] fix stupid variable names --- src/Controller/CommunityController.php | 12 ++++++------ views/communities/community.php | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Controller/CommunityController.php b/src/Controller/CommunityController.php index 30b90be..239d47c 100644 --- a/src/Controller/CommunityController.php +++ b/src/Controller/CommunityController.php @@ -53,18 +53,18 @@ class CommunityController implements IAuthenticationRequired $balanceCalculator = new BalanceCalculator($community); $debts = $balanceCalculator->calculate(); - $debtUsers = []; + $debtItems = []; $debtBalance = 0.0; - $outstandingUsers = []; + $outstandingItems = []; $outstandingBalance = 0.0; foreach ($debts as $debt) { if ($debt['payer']->getId() === \Container::$request->user()->getUniqueId()) { $debtBalance += $debt['amount']; - $debtUsers[] = $debt; + $debtItems[] = $debt; } if ($debt['payee']->getId() === \Container::$request->user()->getUniqueId()) { $outstandingBalance += $debt['amount']; - $outstandingUsers[] = $debt; + $outstandingItems[] = $debt; } } $balance = $outstandingBalance - $debtBalance; @@ -74,9 +74,9 @@ class CommunityController implements IAuthenticationRequired 'members' => $this->getMembers($community), 'currencies' => $this->getCurrencies($community), 'upcomingEvents' => [], - 'debtUsers' => $debtUsers, + 'debtItems' => $debtItems, 'debtBalance' => $debtBalance, - 'outstandingUsers' => $outstandingUsers, + 'outstandingItems' => $outstandingItems, 'outstandingBalance' => $outstandingBalance, 'balance' => $balance, 'editPermission' => $ownCommunityMember->getOwner() diff --git a/views/communities/community.php b/views/communities/community.php index fe8bc40..2e62a09 100644 --- a/views/communities/community.php +++ b/views/communities/community.php @@ -52,20 +52,20 @@ You owe - + - getUser()->getDisplayName() ?> - + getUser()->getDisplayName() ?> + You're owed - + - getUser()->getDisplayName() ?> - + getUser()->getDisplayName() ?> +