mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Replace method calls.
This commit is contained in:
@@ -58,8 +58,8 @@ class StoreByCurrenciesRequest extends FormRequest
|
||||
$data = $validator->getData();
|
||||
foreach ($data as $date => $rate) {
|
||||
try {
|
||||
$date = Carbon::createFromFormat('Y-m-d', $date);
|
||||
} catch (InvalidFormatException $e) {
|
||||
Carbon::createFromFormat('Y-m-d', $date);
|
||||
} catch (InvalidFormatException) {
|
||||
$validator->errors()->add('date', trans('validation.date', ['attribute' => 'date']));
|
||||
|
||||
return;
|
||||
|
@@ -88,7 +88,7 @@ class StoreByDateRequest extends FormRequest
|
||||
}
|
||||
|
||||
try {
|
||||
$to = Amount::getTransactionCurrencyByCode((string)$key);
|
||||
Amount::getTransactionCurrencyByCode((string)$key);
|
||||
} catch (FireflyException) {
|
||||
$validator->errors()->add(sprintf('rates.%s', $key), trans('validation.invalid_currency_code', ['code' => $key]));
|
||||
}
|
||||
|
Reference in New Issue
Block a user