Various code cleanup.

This commit is contained in:
James Cole
2021-09-18 10:21:29 +02:00
parent 3589c9f60f
commit e829d79589
107 changed files with 225 additions and 220 deletions

View File

@@ -25,7 +25,6 @@ declare(strict_types=1);
namespace FireflyIII\Services\FireflyIIIOrg\Update;
use Carbon\Carbon;
use Exception;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use JsonException;

View File

@@ -25,7 +25,6 @@ namespace FireflyIII\Services\Internal\Destroy;
use Exception;
use FireflyIII\Models\Bill;
use Log;
/**
* @codeCoverageIgnore

View File

@@ -26,7 +26,6 @@ namespace FireflyIII\Services\Internal\Destroy;
use DB;
use Exception;
use FireflyIII\Models\Budget;
use Log;
/**
* Class BudgetDestroyService

View File

@@ -26,7 +26,6 @@ namespace FireflyIII\Services\Internal\Destroy;
use DB;
use Exception;
use FireflyIII\Models\Category;
use Log;
/**
* Class CategoryDestroyService

View File

@@ -25,7 +25,6 @@ namespace FireflyIII\Services\Internal\Destroy;
use Exception;
use FireflyIII\Models\TransactionCurrency;
use Log;
/**
* Class CurrencyDestroyService

View File

@@ -26,7 +26,6 @@ namespace FireflyIII\Services\Internal\Destroy;
use Exception;
use FireflyIII\Models\Recurrence;
use FireflyIII\Models\RecurrenceTransaction;
use Log;
/**
* @codeCoverageIgnore

View File

@@ -39,7 +39,6 @@ use FireflyIII\Models\TransactionGroup;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
use FireflyIII\Services\Internal\Destroy\TransactionGroupDestroyService;
use JsonException;
use Log;
use Validator;

View File

@@ -27,7 +27,6 @@ use Exception;
use FireflyIII\Models\Bill;
use FireflyIII\Models\Note;
use FireflyIII\Models\RuleAction;
use Illuminate\Support\Collection;
use Log;
/**

View File

@@ -262,7 +262,7 @@ class CreditRecalculateService
// if it's a credit, we don't care, because sending more money
// to a credit-liability doesn't increase the amount (yet)
if (
in_array($type, [TransactionType::WITHDRAWAL])
$type === TransactionType::WITHDRAWAL
&& (int)$account->id === (int)$transaction->account_id
&& 1 === bccomp($transaction->amount, '0')
&& 'credit' === $direction
@@ -274,7 +274,7 @@ class CreditRecalculateService
// likewise deposit into a credit debt does not change the amount
if (
in_array($type, [TransactionType::DEPOSIT])
$type === TransactionType::DEPOSIT
&& (int)$account->id === (int)$transaction->account_id
&& -1 === bccomp($transaction->amount, '0')
&& 'credit' === $direction

View File

@@ -79,7 +79,6 @@ class AccountUpdateService
*
* @return Account
* @throws FireflyException
* @throws JsonException
*/
public function update(Account $account, array $data): Account
{

View File

@@ -122,6 +122,7 @@ class GroupUpdateService
* @param array $transactions
*
* @return array
* @throws DuplicateTransactionException
* @throws FireflyException
*/
private function updateTransactions(TransactionGroup $transactionGroup, array $transactions): array