Code cleanup.

This commit is contained in:
James Cole
2016-11-18 20:06:08 +01:00
parent 0c072c7d51
commit 73f0cc705b
41 changed files with 160 additions and 24 deletions

View File

@@ -353,25 +353,6 @@ class CategoryReportController extends Controller
return $set;
}
/**
* @param Collection $set
*
* @return array
*/
private function groupByAccount(Collection $set): array
{
// group by category ID:
$grouped = [];
/** @var Transaction $transaction */
foreach ($set as $transaction) {
$accountId = $transaction->account_id;
$grouped[$accountId] = $grouped[$accountId] ?? '0';
$grouped[$accountId] = bcadd($transaction->transaction_amount, $grouped[$accountId]);
}
return $grouped;
}
/**
* @param Collection $set
*