First part of a large code cleanup commit.

This commit is contained in:
James Cole
2019-02-12 21:49:28 +01:00
parent b273af341c
commit e0d87aa11e
70 changed files with 336 additions and 354 deletions

View File

@@ -80,10 +80,7 @@ trait AccountFilter
'cc' => [AccountType::CREDITCARD],
];
$return = $types['all'];
if (isset($types[$type])) {
$return = $types[$type];
}
$return = $types[$type] ?? $types['all'];
return $return; // @codeCoverageIgnore
}

View File

@@ -58,10 +58,7 @@ trait TransactionFilter
'specials' => [TransactionType::OPENING_BALANCE, TransactionType::RECONCILIATION,],
'default' => [TransactionType::WITHDRAWAL, TransactionType::DEPOSIT, TransactionType::TRANSFER,],
];
$return = $types['default'];
if (isset($types[$type])) {
$return = $types[$type];
}
$return = $types[$type] ?? $types['default'];
return $return;