Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
chore: fix various small sonacloud issues to see if the actions run correctly.
James Cole6ed5892cf9b6
diff --git a/app/Http/Controllers/Transaction/ShowController.php b/app/Http/Controllers/Transaction/ShowController.phpindex 60d5ec957c..bb182c7d10 100644--- a/app/Http/Controllers/Transaction/ShowController.php+++ b/app/Http/Controllers/Transaction/ShowController.php@@ -41,7 +41,7 @@ use Symfony\Component\HttpFoundation\ParameterBag;*/class ShowController extends Controller{- private ALERepositoryInterface $ALERepository;+ private ALERepositoryInterface $aleRepository;private TransactionGroupRepositoryInterface $repository;/**@@ -55,7 +55,7 @@ class ShowController extends Controller$this->middleware(function ($request, $next) {$this->repository = app(TransactionGroupRepositoryInterface::class);- $this->ALERepository = app(ALERepositoryInterface::class);+ $this->aleRepository = app(ALERepositoryInterface::class);app('view')->share('title', (string)trans('firefly.transactions'));app('view')->share('mainTitleIcon', 'fa-exchange');@@ -112,7 +112,7 @@ class ShowController extends Controller// get audit log entries:$logEntries = [];foreach ($transactionGroup->transactionJournals as $journal) {- $logEntries[$journal->id] = $this->ALERepository->getForObject($journal);+ $logEntries[$journal->id] = $this->aleRepository->getForObject($journal);}$events = $this->repository->getPiggyEvents($transactionGroup);diff --git a/app/Repositories/LinkType/LinkTypeRepository.php b/app/Repositories/LinkType/LinkTypeRepository.phpindex 83cf35e81b..596990606a 100644--- a/app/Repositories/LinkType/LinkTypeRepository.php+++ b/app/Repositories/LinkType/LinkTypeRepository.php@@ -212,7 +212,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterfacereturn $merged->filter(function (TransactionJournalLink $link) {- return (null !== $link->source && null !== $link->destination);+ return null !== $link->source && null !== $link->destination;});}diff --git a/app/Services/Internal/Update/RecurrenceUpdateService.php b/app/Services/Internal/Update/RecurrenceUpdateService.phpindex 455de69768..9ee14e9156 100644--- a/app/Services/Internal/Update/RecurrenceUpdateService.php+++ b/app/Services/Internal/Update/RecurrenceUpdateService.php@@ -125,9 +125,8 @@ class RecurrenceUpdateService$originalCount = $recurrence->recurrenceRepetitions()->count();if (1 === $originalCount) {Log::debug('Return the first one');- /** @var RecurrenceRepetition $result */- $result = $recurrence->recurrenceRepetitions()->first();- return $result;+ /** @var RecurrenceRepetition|null */+ return $recurrence->recurrenceRepetitions()->first();}// find it:$fields = [diff --git a/app/Support/Search/OperatorQuerySearch.php b/app/Support/Search/OperatorQuerySearch.phpindex 76c9c7d8b1..9081d6c219 100644--- a/app/Support/Search/OperatorQuerySearch.php+++ b/app/Support/Search/OperatorQuerySearch.php@@ -437,7 +437,7 @@ class OperatorQuerySearch implements SearchInterface$stringMethod = 'str_contains';}if (4 === $stringPosition) {- $stringMethod = 'str_is_equal';+ $stringMethod = 'stringIsEqual';}// get accounts:@@ -515,7 +515,7 @@ class OperatorQuerySearch implements SearchInterface$stringMethod = 'str_contains';}if (4 === $stringPosition) {- $stringMethod = 'str_is_equal';+ $stringMethod = 'stringIsEqual';}// search for accounts:diff --git a/bootstrap/app.php b/bootstrap/app.phpindex 96ecd9288a..7180e36c15 100644--- a/bootstrap/app.php+++ b/bootstrap/app.php@@ -52,14 +52,14 @@ if (!function_exists('envNonEmpty')) {}}-if (!function_exists('str_is_equal')) {+if (!function_exists('stringIsEqual')) {/*** @param string $left* @param string $right** @return bool*/- function str_is_equal(string $left, string $right): bool+ function stringIsEqual(string $left, string $right): bool{return $left === $right;}