Clean up code and comments.

This commit is contained in:
James Cole
2023-02-22 18:14:14 +01:00
parent e6dc881f56
commit e421b29b01
249 changed files with 647 additions and 1044 deletions

View File

@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Requests;
use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Factory\CategoryFactory;
use FireflyIII\Models\Recurrence;
@@ -312,20 +311,20 @@ class RecurrenceFormRequest extends FormRequest
// TODO typeOverrule: the account validator may have another opinion the transaction type.
// TODO either use 'withdrawal' or the strtolower() variant, not both.
$type = $this->convertString('transaction_type');
$type = $this->convertString('transaction_type');
$throwError = true;
if ('withdrawal' === $type) {
$throwError = false;
$throwError = false;
$sourceId = (int)$data['source_id'];
$destinationId = (int)$data['withdrawal_destination_id'];
}
if ('deposit' === $type) {
$throwError = false;
$throwError = false;
$sourceId = (int)$data['deposit_source_id'];
$destinationId = (int)$data['destination_id'];
}
if ('transfer' === $type) {
$throwError = false;
$throwError = false;
$sourceId = (int)$data['source_id'];
$destinationId = (int)$data['destination_id'];
}