Fix some PHPMD issues.

This commit is contained in:
James Cole
2023-11-26 16:20:24 +01:00
parent 72ead65d9c
commit a7bfdbe31f
8 changed files with 12 additions and 7 deletions

View File

@@ -150,6 +150,10 @@ class UpgradeCurrencyPreferences extends Command
{
$preference = Preference::where('user_id', $user->id)->where('name', 'currencyPreference')->first(['id', 'user_id', 'name', 'data', 'updated_at', 'created_at']);
if (null === $preference) {
return 'EUR';
}
if (null !== $preference->data && !is_array($preference->data)) {
return (string)$preference->data;
}