Some code cleanup [skip ci]

This commit is contained in:
James Cole
2016-02-07 07:56:58 +01:00
parent b22774a599
commit 9429d84cf8
21 changed files with 65 additions and 55 deletions

View File

@@ -134,7 +134,7 @@ class AccountRepository implements AccountRepositoryInterface
'accounts.*',
'ccType.data as ccType',
'accountRole.data as accountRole',
DB::Raw('SUM(`transactions`.`amount`) AS `balance`'),
DB::raw('SUM(`transactions`.`amount`) AS `balance`'),
]
);
@@ -329,7 +329,7 @@ class AccountRepository implements AccountRepositoryInterface
$balance = Steam::balance($account, $date, true);
/** @var PiggyBank $p */
foreach ($account->piggybanks()->get() as $p) {
foreach ($account->piggyBanks()->get() as $p) {
$balance = bcsub($p->currentRelevantRep()->currentamount, $balance);
}
@@ -351,7 +351,7 @@ class AccountRepository implements AccountRepositoryInterface
->transactionTypes([TransactionType::OPENING_BALANCE])
->orderBy('created_at', 'ASC')
->first(['transaction_journals.*']);
if(is_null($journal)) {
if (is_null($journal)) {
return new TransactionJournal;
}