Refactor old methods.

This commit is contained in:
James Cole
2021-04-06 13:30:09 +02:00
parent 5ceef2e9c3
commit 69b1769f22
54 changed files with 191 additions and 478 deletions

View File

@@ -137,7 +137,7 @@ class EditController extends Controller
{
$data = [
'title' => $request->string('title'),
'description' => $request->nlString('description'),
'description' => $request->stringWithNewlines('description'),
'active' => 1 === (int)$request->input('active'),
];

View File

@@ -58,7 +58,7 @@ class AccountFormRequest extends FormRequest
'opening_balance_date' => $this->date('opening_balance_date'),
'cc_type' => $this->string('cc_type'),
'cc_monthly_payment_date' => $this->string('cc_monthly_payment_date'),
'notes' => $this->nlString('notes'),
'notes' => $this->stringWithNewlines('notes'),
'interest' => $this->string('interest'),
'interest_period' => $this->string('interest_period'),
'include_net_worth' => '1',

View File

@@ -49,7 +49,7 @@ class BillStoreRequest extends FormRequest
'date' => $this->date('date'),
'repeat_freq' => $this->string('repeat_freq'),
'skip' => $this->integer('skip'),
'notes' => $this->nlString('notes'),
'notes' => $this->stringWithNewlines('notes'),
'active' => $this->boolean('active'),
'object_group_title' => $this->string('object_group'),
];

View File

@@ -50,7 +50,7 @@ class BillUpdateRequest extends FormRequest
'date' => $this->date('date'),
'repeat_freq' => $this->string('repeat_freq'),
'skip' => $this->integer('skip'),
'notes' => $this->nlString('notes'),
'notes' => $this->stringWithNewlines('notes'),
'active' => $this->boolean('active'),
'object_group_title' => $this->string('object_group'),
];

View File

@@ -43,7 +43,7 @@ class CategoryFormRequest extends FormRequest
{
return [
'name' => $this->string('name'),
'notes' => $this->nlString('notes'),
'notes' => $this->stringWithNewlines('notes'),
];
}

View File

@@ -46,7 +46,7 @@ class PiggyBankStoreRequest extends FormRequest
'account_id' => $this->integer('account_id'),
'targetamount' => $this->string('targetamount'),
'targetdate' => $this->date('targetdate'),
'notes' => $this->nlString('notes'),
'notes' => $this->stringWithNewlines('notes'),
'object_group_title' => $this->string('object_group'),
];
}

View File

@@ -47,7 +47,7 @@ class PiggyBankUpdateRequest extends FormRequest
'account_id' => $this->integer('account_id'),
'targetamount' => $this->string('targetamount'),
'targetdate' => $this->date('targetdate'),
'notes' => $this->nlString('notes'),
'notes' => $this->stringWithNewlines('notes'),
'object_group_title' => $this->string('object_group'),
];
}

View File

@@ -48,7 +48,7 @@ class RuleFormRequest extends FormRequest
'rule_group_id' => $this->integer('rule_group_id'),
'active' => $this->boolean('active'),
'trigger' => $this->string('trigger'),
'description' => $this->nlString('description'),
'description' => $this->stringWithNewlines('description'),
'stop_processing' => $this->boolean('stop_processing'),
'strict' => $this->boolean('strict'),
'triggers' => $this->getRuleTriggerData(),

View File

@@ -49,7 +49,7 @@ class RuleGroupFormRequest extends FormRequest
return [
'title' => $this->string('title'),
'description' => $this->nlString('description'),
'description' => $this->stringWithNewlines('description'),
'active' => $active,
];
}