Clean up code.

This commit is contained in:
James Cole
2025-05-04 17:41:26 +02:00
parent e28e538272
commit 0573bf2402
147 changed files with 1758 additions and 1770 deletions

View File

@@ -45,7 +45,7 @@ class DestroyRequest extends FormRequest
public function rules(): array
{
return [
'date' => 'required|date|after:1900-01-01|before:2099-12-31',
'date' => 'required|date|after:1900-01-01|before:2099-12-31',
];
}
}

View File

@@ -40,16 +40,16 @@ class StoreRequest extends FormRequest
return $this->getCarbonDate('date');
}
public function getRate(): string
{
return (string) $this->get('rate');
}
public function getFromCurrency(): TransactionCurrency
{
return TransactionCurrency::where('code', $this->get('from'))->first();
}
public function getRate(): string
{
return (string) $this->get('rate');
}
public function getToCurrency(): TransactionCurrency
{
return TransactionCurrency::where('code', $this->get('to'))->first();

View File

@@ -50,8 +50,8 @@ class UpdateRequest extends FormRequest
public function rules(): array
{
return [
'date' => 'date|after:1900-01-01|before:2099-12-31',
'rate' => 'required|numeric|gt:0',
'date' => 'date|after:1900-01-01|before:2099-12-31',
'rate' => 'required|numeric|gt:0',
];
}
}