mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleanup.
This commit is contained in:
@@ -72,7 +72,6 @@ class UpdateRequest extends FormRequest
|
||||
$models = implode(',', $models);
|
||||
$model = $this->string('attachable_type');
|
||||
|
||||
|
||||
return [
|
||||
'filename' => 'between:1,255',
|
||||
'title' => 'between:1,255',
|
||||
|
@@ -96,6 +96,4 @@ class Request extends FormRequest
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -43,12 +43,10 @@ class StoreRequest extends FormRequest
|
||||
*/
|
||||
public function getAll(): array
|
||||
{
|
||||
$fields = [
|
||||
$fields = [
|
||||
'order' => ['order', 'integer'],
|
||||
];
|
||||
$data = $this->getAllData($fields);
|
||||
|
||||
|
||||
$data = $this->getAllData($fields);
|
||||
$data['name'] = $this->string('name');
|
||||
$data['account_id'] = $this->integer('account_id');
|
||||
$data['targetamount'] = $this->string('target_amount');
|
||||
|
@@ -42,7 +42,6 @@ class StoreRequest extends FormRequest
|
||||
{
|
||||
use ConvertsDataTypes, RecurrenceValidation, TransactionValidation, CurrencyValidation, GetRecurrenceData, ChecksLogin;
|
||||
|
||||
|
||||
/**
|
||||
* Get all data from the request.
|
||||
*
|
||||
@@ -171,8 +170,6 @@ class StoreRequest extends FormRequest
|
||||
'transactions.*.piggy_bank_id' => ['numeric', 'mustExist:piggy_banks,id', new BelongsUser],
|
||||
'transactions.*.piggy_bank_name' => ['between:1,255', 'nullable', new BelongsUser],
|
||||
'transactions.*.tags' => 'between:1,64000',
|
||||
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -42,7 +42,6 @@ class UpdateRequest extends FormRequest
|
||||
{
|
||||
use ConvertsDataTypes, RecurrenceValidation, TransactionValidation, CurrencyValidation, GetRecurrenceData, ChecksLogin;
|
||||
|
||||
|
||||
/**
|
||||
* Get all data from the request.
|
||||
*
|
||||
|
@@ -31,7 +31,6 @@ use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Validator;
|
||||
use function is_array;
|
||||
|
||||
|
||||
/**
|
||||
* Class StoreRequest
|
||||
*/
|
||||
@@ -39,7 +38,6 @@ class StoreRequest extends FormRequest
|
||||
{
|
||||
use ConvertsDataTypes, GetRuleConfiguration, ChecksLogin;
|
||||
|
||||
|
||||
/**
|
||||
* Get all data from the request.
|
||||
*
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Requests\Models\Rule;
|
||||
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Support\Request\ChecksLogin;
|
||||
use FireflyIII\Support\Request\ConvertsDataTypes;
|
||||
@@ -37,7 +36,6 @@ class TestRequest extends FormRequest
|
||||
{
|
||||
use ConvertsDataTypes, ChecksLogin;
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Requests\Models\Rule;
|
||||
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Support\Request\ChecksLogin;
|
||||
use FireflyIII\Support\Request\ConvertsDataTypes;
|
||||
@@ -37,7 +36,6 @@ class TriggerRequest extends FormRequest
|
||||
{
|
||||
use ConvertsDataTypes, ChecksLogin;
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
@@ -31,7 +31,6 @@ use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Validator;
|
||||
use function is_array;
|
||||
|
||||
|
||||
/**
|
||||
* Class UpdateRequest
|
||||
*/
|
||||
|
@@ -28,7 +28,6 @@ use FireflyIII\Support\Request\ChecksLogin;
|
||||
use FireflyIII\Support\Request\ConvertsDataTypes;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Class StoreRequest
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Requests\Models\RuleGroup;
|
||||
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Support\Request\ChecksLogin;
|
||||
use FireflyIII\Support\Request\ConvertsDataTypes;
|
||||
@@ -37,7 +36,6 @@ class TestRequest extends FormRequest
|
||||
{
|
||||
use ConvertsDataTypes, ChecksLogin;
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Requests\Models\RuleGroup;
|
||||
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Support\Request\ChecksLogin;
|
||||
use FireflyIII\Support\Request\ConvertsDataTypes;
|
||||
@@ -37,7 +36,6 @@ class TriggerRequest extends FormRequest
|
||||
{
|
||||
use ConvertsDataTypes, ChecksLogin;
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
@@ -28,7 +28,6 @@ use FireflyIII\Support\Request\ChecksLogin;
|
||||
use FireflyIII\Support\Request\ConvertsDataTypes;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Class UpdateRequest
|
||||
|
@@ -39,7 +39,6 @@ class UpdateRequest extends FormRequest
|
||||
{
|
||||
use ConvertsDataTypes, ChecksLogin, AppendsLocationData;
|
||||
|
||||
|
||||
/**
|
||||
* Get all data from the request.
|
||||
*
|
||||
|
@@ -147,8 +147,6 @@ class StoreRequest extends FormRequest
|
||||
'sepa_ep' => $this->stringFromValue($object['sepa_ep']),
|
||||
'sepa_ci' => $this->stringFromValue($object['sepa_ci']),
|
||||
'sepa_batch_id' => $this->stringFromValue($object['sepa_batch_id']),
|
||||
|
||||
|
||||
// custom date fields. Must be Carbon objects. Presence is optional.
|
||||
'interest_date' => $this->dateFromValue($object['interest_date']),
|
||||
'book_date' => $this->dateFromValue($object['book_date']),
|
||||
@@ -250,8 +248,6 @@ class StoreRequest extends FormRequest
|
||||
'transactions.*.payment_date' => 'date|nullable',
|
||||
'transactions.*.invoice_date' => 'date|nullable',
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -28,7 +28,6 @@ use FireflyIII\Support\Request\ChecksLogin;
|
||||
use FireflyIII\Support\Request\ConvertsDataTypes;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
|
||||
/**
|
||||
* Class StoreRequest
|
||||
*
|
||||
|
@@ -28,7 +28,6 @@ use FireflyIII\Support\Request\ChecksLogin;
|
||||
use FireflyIII\Support\Request\ConvertsDataTypes;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
|
||||
/**
|
||||
* Class UpdateRequest
|
||||
*
|
||||
|
@@ -48,8 +48,6 @@ class StoreRequest extends FormRequest
|
||||
'outward' => $this->string('outward'),
|
||||
'inward' => $this->string('inward'),
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -49,8 +49,6 @@ class UpdateRequest extends FormRequest
|
||||
'outward' => $this->string('outward'),
|
||||
'inward' => $this->string('inward'),
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* CreateRequest.php
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
@@ -21,25 +20,6 @@
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
/*
|
||||
* CreateRequest.php
|
||||
* Copyright (c) 2020 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Requests\Models\Webhook;
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* UpdateRequest.php
|
||||
* Copyright (c) 2021 james@firefly-iii.org
|
||||
@@ -21,25 +20,6 @@
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
/*
|
||||
* UpdateRequest.php
|
||||
* Copyright (c) 2020 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace FireflyIII\Api\V1\Requests\Models\Webhook;
|
||||
|
||||
|
Reference in New Issue
Block a user