mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleanup
This commit is contained in:
@@ -27,6 +27,7 @@ use FireflyIII\Models\AccountType;
|
||||
|
||||
/**
|
||||
* Trait AccountFilter
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
trait AccountFilter
|
||||
@@ -40,7 +41,7 @@ trait AccountFilter
|
||||
*/
|
||||
protected function mapAccountTypes(string $type): array
|
||||
{
|
||||
$types = [
|
||||
$types = [
|
||||
'all' => [AccountType::DEFAULT, AccountType::CASH,
|
||||
AccountType::ASSET, AccountType::EXPENSE, AccountType::REVENUE,
|
||||
AccountType::INITIAL_BALANCE, AccountType::BENEFICIARY, AccountType::IMPORT, AccountType::RECONCILIATION,
|
||||
|
@@ -28,6 +28,7 @@ use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Trait ApiSupport
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
trait ApiSupport
|
||||
|
@@ -27,6 +27,7 @@ use FireflyIII\Models\TransactionType;
|
||||
|
||||
/**
|
||||
* Trait TransactionFilter
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
trait TransactionFilter
|
||||
@@ -40,7 +41,7 @@ trait TransactionFilter
|
||||
*/
|
||||
protected function mapTransactionTypes(string $type): array
|
||||
{
|
||||
$types = [
|
||||
$types = [
|
||||
'all' => [TransactionType::WITHDRAWAL, TransactionType::DEPOSIT, TransactionType::TRANSFER, TransactionType::OPENING_BALANCE,
|
||||
TransactionType::RECONCILIATION,],
|
||||
'withdrawal' => [TransactionType::WITHDRAWAL,],
|
||||
@@ -59,6 +60,7 @@ trait TransactionFilter
|
||||
'specials' => [TransactionType::OPENING_BALANCE, TransactionType::RECONCILIATION,],
|
||||
'default' => [TransactionType::WITHDRAWAL, TransactionType::DEPOSIT, TransactionType::TRANSFER,],
|
||||
];
|
||||
|
||||
return $types[$type] ?? $types['default'];
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user