Code cleanup should trigger scan.

This commit is contained in:
James Cole
2022-12-30 20:38:54 +01:00
parent 333c348117
commit 742c84269b
12 changed files with 19 additions and 23 deletions

View File

@@ -315,22 +315,22 @@ class RecurrenceFormRequest extends FormRequest
// TODO either use 'withdrawal' or the strtolower() variant, not both.
$type = $this->convertString('transaction_type');
$throwError = true;
if('withdrawal' === $type) {
if ('withdrawal' === $type) {
$throwError = false;
$sourceId = (int)$data['source_id'];
$destinationId = (int)$data['withdrawal_destination_id'];
}
if('deposit' === $type) {
if ('deposit' === $type) {
$throwError = false;
$sourceId = (int)$data['deposit_source_id'];
$destinationId = (int)$data['destination_id'];
}
if('transfer' === $type) {
if ('transfer' === $type) {
$throwError = false;
$sourceId = (int)$data['source_id'];
$destinationId = (int)$data['destination_id'];
}
if(true === $throwError) {
if (true === $throwError) {
throw new FireflyException(sprintf('Cannot handle transaction type "%s"', $this->convertString('transaction_type')));
}