Some cleaning up courtesy of PHPStorm.

This commit is contained in:
James Cole
2016-01-15 23:12:52 +01:00
parent 3857e8d49f
commit 7bf75128a8
56 changed files with 193 additions and 179 deletions

View File

@@ -61,7 +61,7 @@ class BillRepository implements BillRepositoryInterface
->get(
[
'transaction_journals.bill_id',
DB::Raw('SUM(`transactions`.`amount`) as `journalAmount`')
DB::Raw('SUM(`transactions`.`amount`) as `journalAmount`'),
]
);
@@ -476,7 +476,7 @@ class BillRepository implements BillRepositoryInterface
->get(
[
'bills.*',
DB::Raw('(`bills`.`amount_min` + `bills`.`amount_max` / 2) as `expectedAmount`')
DB::Raw('(`bills`.`amount_min` + `bills`.`amount_max` / 2) as `expectedAmount`'),
]
)->sortBy('name');

View File

@@ -89,7 +89,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
->get(
[
DB::Raw('DATE_FORMAT(`transaction_journals`.`date`, "%Y-%m") AS `dateFormatted`'),
DB::Raw('SUM(`transactions`.`amount`) as `monthlyAmount`')
DB::Raw('SUM(`transactions`.`amount`) as `monthlyAmount`'),
]
);
@@ -316,7 +316,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
[
'budgets.*',
DB::Raw('DATE_FORMAT(`transaction_journals`.`date`, "%Y-%m") AS `dateFormatted`'),
DB::Raw('SUM(`transactions`.`amount`) AS `sumAmount`')
DB::Raw('SUM(`transactions`.`amount`) AS `sumAmount`'),
]
);
@@ -559,7 +559,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
[
'budgets.*',
DB::Raw('DATE_FORMAT(`limit_repetitions`.`startdate`,"%Y") as `dateFormatted`'),
DB::Raw('SUM(`limit_repetitions`.`amount`) as `budgeted`')
DB::Raw('SUM(`limit_repetitions`.`amount`) as `budgeted`'),
]
);
@@ -603,7 +603,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
[
'budgets.*',
DB::Raw('DATE_FORMAT(`transaction_journals`.`date`, "%Y") AS `dateFormatted`'),
DB::Raw('SUM(`transactions`.`amount`) AS `sumAmount`')
DB::Raw('SUM(`transactions`.`amount`) AS `sumAmount`'),
]
);
@@ -720,7 +720,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
->get(
[
't_from.account_id', 'budget_transaction_journal.budget_id',
DB::Raw('SUM(`t_from`.`amount`) AS `spent`')
DB::Raw('SUM(`t_from`.`amount`) AS `spent`'),
]
);

View File

@@ -196,14 +196,14 @@ class JournalRepository implements JournalRepositoryInterface
[
'account_id' => $fromAccount->id,
'transaction_journal_id' => $journal->id,
'amount' => $data['amount'] * -1
'amount' => $data['amount'] * -1,
]
);
Transaction::create( // second transaction.
[
'account_id' => $toAccount->id,
'transaction_journal_id' => $journal->id,
'amount' => $data['amount']
'amount' => $data['amount'],
]
);
$journal->completed = 1;

View File

@@ -131,7 +131,7 @@ class TagRepository implements TagRepositoryInterface
->get(
[
't_to.account_id',
DB::Raw('SUM(`t_to`.`amount`) as `sum`')
DB::Raw('SUM(`t_to`.`amount`) as `sum`'),
]
);