mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-11-04 05:15:39 +00:00 
			
		
		
		
	Some code cleanup [skip ci]
This commit is contained in:
		@@ -17,6 +17,7 @@ class ConnectJournalToPiggyBank
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Create the event handler.
 | 
			
		||||
     *
 | 
			
		||||
     * @codeCoverageIgnore
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
@@ -35,6 +35,7 @@ class PasswordController extends Controller
 | 
			
		||||
     *
 | 
			
		||||
     * @param  \Illuminate\Contracts\Auth\Guard          $auth
 | 
			
		||||
     * @param  \Illuminate\Contracts\Auth\PasswordBroker $passwords
 | 
			
		||||
     *
 | 
			
		||||
     * @codeCoverageIgnore
 | 
			
		||||
     *
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -24,6 +24,7 @@ class ReportController extends Controller
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @codeCoverageIgnore
 | 
			
		||||
     *
 | 
			
		||||
     * @param ReportHelperInterface $helper
 | 
			
		||||
     */
 | 
			
		||||
    public function __construct(ReportHelperInterface $helper)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,5 @@
 | 
			
		||||
<?php namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use App;
 | 
			
		||||
use Crypt;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Illuminate\Database\Eloquent\SoftDeletes;
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,6 @@
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Models;
 | 
			
		||||
 | 
			
		||||
use App;
 | 
			
		||||
use Crypt;
 | 
			
		||||
use Illuminate\Database\Eloquent\Model;
 | 
			
		||||
use Watson\Validating\ValidatingTrait;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,6 @@
 | 
			
		||||
namespace FireflyIII\Support\Twig;
 | 
			
		||||
 | 
			
		||||
use Auth;
 | 
			
		||||
use DB;
 | 
			
		||||
use FireflyIII\Models\LimitRepetition;
 | 
			
		||||
use Twig_Extension;
 | 
			
		||||
use Twig_SimpleFunction;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user