mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-23 04:18:50 +00:00
Auto commit for release 'branch-v6.2' on 2024-12-22
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* DestroyRequest.php
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
@@ -47,5 +48,4 @@ class DestroyRequest extends FormRequest
|
||||
'date' => 'required|date|after:1900-01-01|before:2099-12-31',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* DestroyRequest.php
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
@@ -44,10 +45,13 @@ class StoreRequest extends FormRequest
|
||||
return (string) $this->get('rate');
|
||||
}
|
||||
|
||||
public function getFromCurrency(): TransactionCurrency {
|
||||
public function getFromCurrency(): TransactionCurrency
|
||||
{
|
||||
return TransactionCurrency::where('code', $this->get('from'))->first();
|
||||
}
|
||||
public function getToCurrency(): TransactionCurrency {
|
||||
|
||||
public function getToCurrency(): TransactionCurrency
|
||||
{
|
||||
return TransactionCurrency::where('code', $this->get('to'))->first();
|
||||
}
|
||||
|
||||
@@ -63,5 +67,4 @@ class StoreRequest extends FormRequest
|
||||
'to' => 'required|exists:transaction_currencies,code',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* DestroyRequest.php
|
||||
* Copyright (c) 2024 james@firefly-iii.org.
|
||||
@@ -38,7 +39,8 @@ class UpdateRequest extends FormRequest
|
||||
return $this->getCarbonDate('date');
|
||||
}
|
||||
|
||||
public function getRate(): string {
|
||||
public function getRate(): string
|
||||
{
|
||||
return (string) $this->get('rate');
|
||||
}
|
||||
|
||||
@@ -52,5 +54,4 @@ class UpdateRequest extends FormRequest
|
||||
'rate' => 'required|numeric|gt:0',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user