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

@@ -117,7 +117,6 @@ class FireflyValidator extends Validator
* @param mixed $value
*
* @return bool
* @throws FireflyException
*/
public function validateIban($attribute, $value): bool
{

View File

@@ -518,15 +518,11 @@ trait TransactionValidation
*/
private function compareAccountData(string $type, array $comparison): bool
{
switch ($type) {
default:
case 'withdrawal':
return $this->compareAccountDataWithdrawal($comparison);
case 'deposit':
return $this->compareAccountDataDeposit($comparison);
case 'transfer':
return $this->compareAccountDataTransfer($comparison);
}
return match ($type) {
default => $this->compareAccountDataWithdrawal($comparison),
'deposit' => $this->compareAccountDataDeposit($comparison),
'transfer' => $this->compareAccountDataTransfer($comparison),
};
}
/**