Some code cleanup [skip ci]

This commit is contained in:
James Cole 2015-05-24 11:41:52 +02:00
parent 6c71f68ed8
commit 1c1fe672bd
10 changed files with 8 additions and 8 deletions

View File

@ -17,6 +17,7 @@ class ConnectJournalToPiggyBank
/**
* Create the event handler.
*
* @codeCoverageIgnore
*
*/

View File

@ -45,7 +45,7 @@ class Income
$this->incomes->put($accountId, $newObject);
} else {
bcscale(2);
$existing = $this->incomes->get($accountId);
$existing = $this->incomes->get($accountId);
$existing->amount = bcadd($existing->amount, $entry->amount);
$existing->count++;
$this->incomes->put($accountId, $existing);

View File

@ -35,6 +35,7 @@ class PasswordController extends Controller
*
* @param \Illuminate\Contracts\Auth\Guard $auth
* @param \Illuminate\Contracts\Auth\PasswordBroker $passwords
*
* @codeCoverageIgnore
*
*/

View File

@ -24,6 +24,7 @@ class ReportController extends Controller
/**
* @codeCoverageIgnore
*
* @param ReportHelperInterface $helper
*/
public function __construct(ReportHelperInterface $helper)

View File

@ -1,6 +1,5 @@
<?php namespace FireflyIII\Models;
use App;
use Crypt;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

View File

@ -2,7 +2,6 @@
namespace FireflyIII\Models;
use App;
use Crypt;
use Illuminate\Database\Eloquent\Model;
use Watson\Validating\ValidatingTrait;

View File

@ -10,7 +10,6 @@ use FireflyIII\Models\AccountType;
use FireflyIII\Models\Bill;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Database\Query\JoinClause;
use Illuminate\Support\Collection;
use Log;
use Navigation;

View File

@ -251,7 +251,7 @@ class BudgetRepository implements BudgetRepositoryInterface
->after($start)
->before($end)
->transactionTypes(['Withdrawal'])
->get(['transaction_journals.*'])->sum('amount');
->get(['transaction_journals.*'])->sum('amount');
return floatval($noBudgetSet) * -1;
}

View File

@ -82,11 +82,12 @@ class JournalRepository implements JournalRepositoryInterface
->where('transaction_journals.date', '<=', $journal->date->format('Y-m-d'))
->where('transaction_journals.order', '>=', $journal->order)
->where('transaction_journals.id', '!=', $journal->id)
->get(['transactions.*']);
->get(['transactions.*']);
$sum = 0;
foreach($set as $entry) {
foreach ($set as $entry) {
$sum += $entry->amount;
}
return $sum;
}

View File

@ -3,7 +3,6 @@
namespace FireflyIII\Support\Twig;
use Auth;
use DB;
use FireflyIII\Models\LimitRepetition;
use Twig_Extension;
use Twig_SimpleFunction;