mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-09 23:15:45 -06:00
Some code cleanup [skip ci]
This commit is contained in:
parent
6c71f68ed8
commit
1c1fe672bd
@ -17,6 +17,7 @@ class ConnectJournalToPiggyBank
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Create the event handler.
|
* Create the event handler.
|
||||||
|
*
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -45,7 +45,7 @@ class Income
|
|||||||
$this->incomes->put($accountId, $newObject);
|
$this->incomes->put($accountId, $newObject);
|
||||||
} else {
|
} else {
|
||||||
bcscale(2);
|
bcscale(2);
|
||||||
$existing = $this->incomes->get($accountId);
|
$existing = $this->incomes->get($accountId);
|
||||||
$existing->amount = bcadd($existing->amount, $entry->amount);
|
$existing->amount = bcadd($existing->amount, $entry->amount);
|
||||||
$existing->count++;
|
$existing->count++;
|
||||||
$this->incomes->put($accountId, $existing);
|
$this->incomes->put($accountId, $existing);
|
||||||
|
@ -35,6 +35,7 @@ class PasswordController extends Controller
|
|||||||
*
|
*
|
||||||
* @param \Illuminate\Contracts\Auth\Guard $auth
|
* @param \Illuminate\Contracts\Auth\Guard $auth
|
||||||
* @param \Illuminate\Contracts\Auth\PasswordBroker $passwords
|
* @param \Illuminate\Contracts\Auth\PasswordBroker $passwords
|
||||||
|
*
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -24,6 +24,7 @@ class ReportController extends Controller
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
|
*
|
||||||
* @param ReportHelperInterface $helper
|
* @param ReportHelperInterface $helper
|
||||||
*/
|
*/
|
||||||
public function __construct(ReportHelperInterface $helper)
|
public function __construct(ReportHelperInterface $helper)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<?php namespace FireflyIII\Models;
|
<?php namespace FireflyIII\Models;
|
||||||
|
|
||||||
use App;
|
|
||||||
use Crypt;
|
use Crypt;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
namespace FireflyIII\Models;
|
namespace FireflyIII\Models;
|
||||||
|
|
||||||
use App;
|
|
||||||
use Crypt;
|
use Crypt;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Watson\Validating\ValidatingTrait;
|
use Watson\Validating\ValidatingTrait;
|
||||||
|
@ -10,7 +10,6 @@ use FireflyIII\Models\AccountType;
|
|||||||
use FireflyIII\Models\Bill;
|
use FireflyIII\Models\Bill;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use Illuminate\Database\Query\JoinClause;
|
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
use Navigation;
|
use Navigation;
|
||||||
|
@ -251,7 +251,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
|||||||
->after($start)
|
->after($start)
|
||||||
->before($end)
|
->before($end)
|
||||||
->transactionTypes(['Withdrawal'])
|
->transactionTypes(['Withdrawal'])
|
||||||
->get(['transaction_journals.*'])->sum('amount');
|
->get(['transaction_journals.*'])->sum('amount');
|
||||||
|
|
||||||
return floatval($noBudgetSet) * -1;
|
return floatval($noBudgetSet) * -1;
|
||||||
}
|
}
|
||||||
|
@ -82,11 +82,12 @@ class JournalRepository implements JournalRepositoryInterface
|
|||||||
->where('transaction_journals.date', '<=', $journal->date->format('Y-m-d'))
|
->where('transaction_journals.date', '<=', $journal->date->format('Y-m-d'))
|
||||||
->where('transaction_journals.order', '>=', $journal->order)
|
->where('transaction_journals.order', '>=', $journal->order)
|
||||||
->where('transaction_journals.id', '!=', $journal->id)
|
->where('transaction_journals.id', '!=', $journal->id)
|
||||||
->get(['transactions.*']);
|
->get(['transactions.*']);
|
||||||
$sum = 0;
|
$sum = 0;
|
||||||
foreach($set as $entry) {
|
foreach ($set as $entry) {
|
||||||
$sum += $entry->amount;
|
$sum += $entry->amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $sum;
|
return $sum;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
namespace FireflyIII\Support\Twig;
|
namespace FireflyIII\Support\Twig;
|
||||||
|
|
||||||
use Auth;
|
use Auth;
|
||||||
use DB;
|
|
||||||
use FireflyIII\Models\LimitRepetition;
|
use FireflyIII\Models\LimitRepetition;
|
||||||
use Twig_Extension;
|
use Twig_Extension;
|
||||||
use Twig_SimpleFunction;
|
use Twig_SimpleFunction;
|
||||||
|
Loading…
Reference in New Issue
Block a user