Skip to content

Firefly III: a personal finances manager

Fix phpstan issues.

James Cole637673d709bd
diff --git a/app/Http/Controllers/System/InstallController.php b/app/Http/Controllers/System/InstallController.php
index bc579da248..3c58615a87 100644
--- a/app/Http/Controllers/System/InstallController.php
+++ b/app/Http/Controllers/System/InstallController.php
@@ -42,6 +42,7 @@ use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
use Laravel\Passport\Passport;
use phpseclib3\Crypt\RSA;
+use function Safe\json_encode;
use function Safe\file_put_contents;
diff --git a/app/Repositories/Currency/CurrencyRepository.php b/app/Repositories/Currency/CurrencyRepository.php
index c0194223e1..7a02e07eb4 100644
--- a/app/Repositories/Currency/CurrencyRepository.php
+++ b/app/Repositories/Currency/CurrencyRepository.php
@@ -429,7 +429,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface, UserGroupInterf
Log::error(sprintf('Could not save exchange rate: %s', $message));
if (str_contains($message, 'Integrity constraint violation')) {
Log::warning(sprintf('Currency exchange rate already exists, so return existing one: %s', $message));
- $res = CurrencyExchangeRate::where('user_id', $this->user->id)
+ $res = CurrencyExchangeRate::query()->where('user_id', $this->user->id)
->where('user_group_id', $this->userGroup->id)
->where('from_currency_id', $fromCurrency->id)
->where('to_currency_id', $toCurrency->id)