Skip to content

Firefly III: a personal finances manager

Auto commit for release 'develop' on 2024-05-18

github-actionsa39f0e1891e5
diff --git a/app/Api/V2/Controllers/Autocomplete/AccountController.php b/app/Api/V2/Controllers/Autocomplete/AccountController.php
index 3acca2b8be..0ed4ada106 100644
--- a/app/Api/V2/Controllers/Autocomplete/AccountController.php
+++ b/app/Api/V2/Controllers/Autocomplete/AccountController.php
@@ -55,8 +55,9 @@ class AccountController extends Controller
$userGroup = $this->validateUserGroup($request);
$this->repository = app(AccountRepositoryInterface::class);
$this->repository->setUserGroup($userGroup);
- $this->default = app('amount')->getDefaultCurrency();
- $this->converter = app(ExchangeRateConverter::class);
+ $this->default = app('amount')->getDefaultCurrency();
+ $this->converter = app(ExchangeRateConverter::class);
+
return $next($request);
}
);
diff --git a/app/Api/V2/Controllers/Autocomplete/CategoryController.php b/app/Api/V2/Controllers/Autocomplete/CategoryController.php
index 0bde4bd6d7..cb4abf6fe5 100644
--- a/app/Api/V2/Controllers/Autocomplete/CategoryController.php
+++ b/app/Api/V2/Controllers/Autocomplete/CategoryController.php
@@ -64,13 +64,13 @@ class CategoryController extends Controller
public function categories(AutocompleteRequest $request): JsonResponse
{
$queryParameters = $request->getParameters();
- $result = $this->repository->searchCategory($queryParameters['query'], $queryParameters['size']);
- $filtered = $result->map(
+ $result = $this->repository->searchCategory($queryParameters['query'], $queryParameters['size']);
+ $filtered = $result->map(
static function (Category $item) {
return [
- 'id' => (string)$item->id,
+ 'id' => (string)$item->id,
'title' => $item->name,
- 'meta' => [],
+ 'meta' => [],
];
}
);
diff --git a/app/Api/V2/Controllers/Autocomplete/TransactionController.php b/app/Api/V2/Controllers/Autocomplete/TransactionController.php
index 9fd206f0f9..85fe587d1c 100644
--- a/app/Api/V2/Controllers/Autocomplete/TransactionController.php
+++ b/app/Api/V2/Controllers/Autocomplete/TransactionController.php
@@ -67,8 +67,8 @@ class TransactionController extends Controller
$result = $this->repository->searchJournalDescriptions($queryParameters['query'], $queryParameters['size']);
// limit and unique
- $filtered = $result->unique('description');
- $array = [];
+ $filtered = $result->unique('description');
+ $array = [];
/** @var TransactionJournal $journal */
foreach ($filtered as $journal) {
diff --git a/app/Api/V2/Request/Autocomplete/AutocompleteRequest.php b/app/Api/V2/Request/Autocomplete/AutocompleteRequest.php
index 7a9b55cb80..0d340b405c 100644
--- a/app/Api/V2/Request/Autocomplete/AutocompleteRequest.php
+++ b/app/Api/V2/Request/Autocomplete/AutocompleteRequest.php
@@ -73,28 +73,28 @@ class AutocompleteRequest extends FormRequest
];
}
-// public function getData(): array
-// {
-//
-// return [];
-// $types = $this->convertString('types');
-// $array = [];
-// if ('' !== $types) {
-// $array = explode(',', $types);
-// }
-// $limit = $this->convertInteger('limit');
-// $limit = 0 === $limit ? 10 : $limit;
-//
-// // remove 'initial balance' and another from allowed types. its internal
-// $array = array_diff($array, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION]);
-//
-// return [
-// 'types' => $array,
-// 'query' => $this->convertString('query'),
-// 'date' => $this->getCarbonDate('date'),
-// 'limit' => $limit,
-// ];
-// }
+ // public function getData(): array
+ // {
+ //
+ // return [];
+ // $types = $this->convertString('types');
+ // $array = [];
+ // if ('' !== $types) {
+ // $array = explode(',', $types);
+ // }
+ // $limit = $this->convertInteger('limit');
+ // $limit = 0 === $limit ? 10 : $limit;
+ //
+ // // remove 'initial balance' and another from allowed types. its internal
+ // $array = array_diff($array, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION]);
+ //
+ // return [
+ // 'types' => $array,
+ // 'query' => $this->convertString('query'),
+ // 'date' => $this->getCarbonDate('date'),
+ // 'limit' => $limit,
+ // ];
+ // }
public function rules(): array
{
diff --git a/app/Console/Commands/Correction/FixIbans.php b/app/Console/Commands/Correction/FixIbans.php
index 6a12bbfc8b..c20c21be02 100644
--- a/app/Console/Commands/Correction/FixIbans.php
+++ b/app/Console/Commands/Correction/FixIbans.php
@@ -37,9 +37,9 @@ class FixIbans extends Command
{
use ShowsFriendlyMessages;
- protected $description = 'Removes spaces from IBANs';
- protected $signature = 'firefly-iii:fix-ibans';
- private int $count = 0;
+ protected $description = 'Removes spaces from IBANs';
+ protected $signature = 'firefly-iii:fix-ibans';
+ private int $count = 0;
/**
* Execute the console command.
@@ -60,7 +60,7 @@ class FixIbans extends Command
{
/** @var Account $account */
foreach ($accounts as $account) {
- $iban = (string) $account->iban;
+ $iban = (string) $account->iban;
$newIban = app('steam')->filterSpaces($iban);
if ('' !== $iban && $iban !== $newIban) {
$account->iban = $newIban;
@@ -77,13 +77,13 @@ class FixIbans extends Command
/** @var Account $account */
foreach ($accounts as $account) {
- $userId = $account->user_id;
+ $userId = $account->user_id;
$set[$userId] ??= [];
- $iban = (string) $account->iban;
+ $iban = (string) $account->iban;
if ('' === $iban) {
continue;
}
- $type = $account->accountType->type;
+ $type = $account->accountType->type;
if (in_array($type, [AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], true)) {
$type = 'liabilities';
}
diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php
index 49033bb168..726acdb761 100644
--- a/app/Repositories/Account/AccountRepository.php
+++ b/app/Repositories/Account/AccountRepository.php
@@ -124,7 +124,7 @@ class AccountRepository implements AccountRepositoryInterface
public function findByIbanNull(string $iban, array $types): ?Account
{
- $iban = Steam::filterSpaces($iban);
+ $iban = Steam::filterSpaces($iban);
$query = $this->user->accounts()->where('iban', '!=', '')->whereNotNull('iban');
if (0 !== count($types)) {
diff --git a/app/Repositories/UserGroups/Account/AccountRepository.php b/app/Repositories/UserGroups/Account/AccountRepository.php
index bb4072dec0..32d3d266d2 100644
--- a/app/Repositories/UserGroups/Account/AccountRepository.php
+++ b/app/Repositories/UserGroups/Account/AccountRepository.php
@@ -81,7 +81,7 @@ class AccountRepository implements AccountRepositoryInterface
public function findByIbanNull(string $iban, array $types): ?Account
{
- $iban = Steam::filterSpaces($iban);
+ $iban = Steam::filterSpaces($iban);
$query = $this->userGroup->accounts()->where('iban', '!=', '')->whereNotNull('iban');
if (0 !== count($types)) {
diff --git a/app/Rules/UniqueIban.php b/app/Rules/UniqueIban.php
index 1124749cdd..00af099090 100644
--- a/app/Rules/UniqueIban.php
+++ b/app/Rules/UniqueIban.php
@@ -96,7 +96,6 @@ class UniqueIban implements ValidationRule
$maxCounts = $this->getMaxOccurrences();
foreach ($maxCounts as $type => $max) {
-
// make sure to trim the value of $value so all spaces are removed.
$value = Steam::filterSpaces($value);
diff --git a/app/Support/Request/ConvertsDataTypes.php b/app/Support/Request/ConvertsDataTypes.php
index a7600f75fe..a04d3fc02a 100644
--- a/app/Support/Request/ConvertsDataTypes.php
+++ b/app/Support/Request/ConvertsDataTypes.php
@@ -140,6 +140,7 @@ trait ConvertsDataTypes
public function clearIban(?string $string): ?string
{
$string = $this->clearString($string);
+
return Steam::filterSpaces($string);
}
diff --git a/app/Support/Steam.php b/app/Support/Steam.php
index 2f545782b3..746668a2a0 100644
--- a/app/Support/Steam.php
+++ b/app/Support/Steam.php
@@ -682,7 +682,7 @@ class Steam
"\u{3000}", // ideographic space
"\u{FEFF}", // zero width no -break space
"\x20", // plain old normal space,
- ' '
+ ' ',
];
// clear zalgo text
diff --git a/config/firefly.php b/config/firefly.php
index d96a94d98a..8cceceafac 100644
--- a/config/firefly.php
+++ b/config/firefly.php
@@ -117,7 +117,7 @@ return [
'expression_engine' => false,
// see cer.php for exchange rates feature flag.
],
- 'version' => 'develop/2024-05-16',
+ 'version' => 'develop/2024-05-18',
'api_version' => '2.0.14',
'db_version' => 24,
diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.php
index 468eff7378..d131ad94ca 100644
--- a/resources/lang/pt_BR/firefly.php
+++ b/resources/lang/pt_BR/firefly.php
@@ -2157,7 +2157,7 @@ return [
'logout' => 'Desconectar',
'logout_other_sessions' => 'Sair de todas as outras sessões',
'toggleNavigation' => 'Alternar navegação',
- 'toggle_dropdown' => 'Toggle dropdown',
+ 'toggle_dropdown' => 'Ativar/Desativar Menu Suspenso',
'searchPlaceholder' => 'Pesquisar...',
'version' => 'Versão',
'dashboard' => 'Painel de Controle',