Use PSR-12 code style

This commit is contained in:
James Cole
2022-10-30 14:23:00 +01:00
parent b27fe59ab4
commit 1667b88dcd
154 changed files with 277 additions and 322 deletions

View File

@@ -40,7 +40,9 @@ use Illuminate\Foundation\Http\FormRequest;
*/
class StoreRequest extends FormRequest
{
use ConvertsDataTypes, AppendsLocationData, ChecksLogin;
use ConvertsDataTypes;
use AppendsLocationData;
use ChecksLogin;
/**
* @return array
@@ -114,8 +116,8 @@ class StoreRequest extends FormRequest
'order' => 'numeric|nullable',
'currency_id' => 'numeric|exists:transaction_currencies,id',
'currency_code' => 'min:3|max:3|exists:transaction_currencies,code',
'active' => [new IsBoolean],
'include_net_worth' => [new IsBoolean],
'active' => [new IsBoolean()],
'include_net_worth' => [new IsBoolean()],
'account_role' => sprintf('nullable|in:%s|required_if:type,asset', $accountRoles),
'credit_card_type' => sprintf('nullable|in:%s|required_if:account_role,ccAsset', $ccPaymentTypes),
'monthly_payment_date' => 'nullable|date|required_if:account_role,ccAsset|required_if:credit_card_type,monthlyFull',

View File

@@ -42,7 +42,9 @@ use Log;
*/
class UpdateRequest extends FormRequest
{
use ConvertsDataTypes, AppendsLocationData, ChecksLogin;
use ConvertsDataTypes;
use AppendsLocationData;
use ChecksLogin;
/**
* @return array
@@ -116,8 +118,8 @@ class UpdateRequest extends FormRequest
'order' => 'numeric|nullable',
'currency_id' => 'numeric|exists:transaction_currencies,id',
'currency_code' => 'min:3|max:3|exists:transaction_currencies,code',
'active' => [new IsBoolean],
'include_net_worth' => [new IsBoolean],
'active' => [new IsBoolean()],
'include_net_worth' => [new IsBoolean()],
'account_role' => sprintf('in:%s|nullable|required_if:type,asset', $accountRoles),
'credit_card_type' => sprintf('in:%s|nullable|required_if:account_role,ccAsset', $ccPaymentTypes),
'monthly_payment_date' => 'date' . '|nullable|required_if:account_role,ccAsset|required_if:credit_card_type,monthlyFull',