Fixed all problems related to strict types.

This commit is contained in:
James Cole
2016-02-05 12:28:05 +01:00
parent 8f7f263a48
commit aa1193a9eb
11 changed files with 87 additions and 77 deletions

View File

@@ -253,10 +253,10 @@ class AccountRepository implements AccountRepositoryInterface
function (Account $account) use ($start, $end) {
$account->startBalance = Steam::balance($account, $start, true);
$account->endBalance = Steam::balance($account, $end, true);
$account->piggyBalance = 0;
$account->piggyBalance = '0';
/** @var PiggyBank $piggyBank */
foreach ($account->piggyBanks as $piggyBank) {
$account->piggyBalance += $piggyBank->currentRelevantRep()->currentamount;
$account->piggyBalance = bcadd($piggyBank->currentRelevantRep()->currentamount, $account->piggyBalance);
}
// sum of piggy bank amounts on this account:
// diff between endBalance and piggyBalance.