Code cleanup

This commit is contained in:
James Cole
2021-03-21 09:15:40 +01:00
parent da1751940e
commit 206845575c
317 changed files with 7418 additions and 7362 deletions

View File

@@ -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,

View File

@@ -28,6 +28,7 @@ use Illuminate\Support\Collection;
/**
* Trait ApiSupport
*
* @codeCoverageIgnore
*/
trait ApiSupport

View File

@@ -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'];