mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-04 11:43:02 +00:00
chore: fix various small sonacloud issues to see if the actions run correctly.
This commit is contained in:
@@ -41,7 +41,7 @@ use Symfony\Component\HttpFoundation\ParameterBag;
|
|||||||
*/
|
*/
|
||||||
class ShowController extends Controller
|
class ShowController extends Controller
|
||||||
{
|
{
|
||||||
private ALERepositoryInterface $ALERepository;
|
private ALERepositoryInterface $aleRepository;
|
||||||
private TransactionGroupRepositoryInterface $repository;
|
private TransactionGroupRepositoryInterface $repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,7 +55,7 @@ class ShowController extends Controller
|
|||||||
$this->middleware(
|
$this->middleware(
|
||||||
function ($request, $next) {
|
function ($request, $next) {
|
||||||
$this->repository = app(TransactionGroupRepositoryInterface::class);
|
$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('title', (string)trans('firefly.transactions'));
|
||||||
app('view')->share('mainTitleIcon', 'fa-exchange');
|
app('view')->share('mainTitleIcon', 'fa-exchange');
|
||||||
@@ -112,7 +112,7 @@ class ShowController extends Controller
|
|||||||
// get audit log entries:
|
// get audit log entries:
|
||||||
$logEntries = [];
|
$logEntries = [];
|
||||||
foreach ($transactionGroup->transactionJournals as $journal) {
|
foreach ($transactionGroup->transactionJournals as $journal) {
|
||||||
$logEntries[$journal->id] = $this->ALERepository->getForObject($journal);
|
$logEntries[$journal->id] = $this->aleRepository->getForObject($journal);
|
||||||
}
|
}
|
||||||
|
|
||||||
$events = $this->repository->getPiggyEvents($transactionGroup);
|
$events = $this->repository->getPiggyEvents($transactionGroup);
|
||||||
|
@@ -212,7 +212,7 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface
|
|||||||
|
|
||||||
return $merged->filter(
|
return $merged->filter(
|
||||||
function (TransactionJournalLink $link) {
|
function (TransactionJournalLink $link) {
|
||||||
return (null !== $link->source && null !== $link->destination);
|
return null !== $link->source && null !== $link->destination;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -125,9 +125,8 @@ class RecurrenceUpdateService
|
|||||||
$originalCount = $recurrence->recurrenceRepetitions()->count();
|
$originalCount = $recurrence->recurrenceRepetitions()->count();
|
||||||
if (1 === $originalCount) {
|
if (1 === $originalCount) {
|
||||||
Log::debug('Return the first one');
|
Log::debug('Return the first one');
|
||||||
/** @var RecurrenceRepetition $result */
|
/** @var RecurrenceRepetition|null */
|
||||||
$result = $recurrence->recurrenceRepetitions()->first();
|
return $recurrence->recurrenceRepetitions()->first();
|
||||||
return $result;
|
|
||||||
}
|
}
|
||||||
// find it:
|
// find it:
|
||||||
$fields = [
|
$fields = [
|
||||||
|
@@ -437,7 +437,7 @@ class OperatorQuerySearch implements SearchInterface
|
|||||||
$stringMethod = 'str_contains';
|
$stringMethod = 'str_contains';
|
||||||
}
|
}
|
||||||
if (4 === $stringPosition) {
|
if (4 === $stringPosition) {
|
||||||
$stringMethod = 'str_is_equal';
|
$stringMethod = 'stringIsEqual';
|
||||||
}
|
}
|
||||||
|
|
||||||
// get accounts:
|
// get accounts:
|
||||||
@@ -515,7 +515,7 @@ class OperatorQuerySearch implements SearchInterface
|
|||||||
$stringMethod = 'str_contains';
|
$stringMethod = 'str_contains';
|
||||||
}
|
}
|
||||||
if (4 === $stringPosition) {
|
if (4 === $stringPosition) {
|
||||||
$stringMethod = 'str_is_equal';
|
$stringMethod = 'stringIsEqual';
|
||||||
}
|
}
|
||||||
|
|
||||||
// search for accounts:
|
// search for accounts:
|
||||||
|
@@ -52,14 +52,14 @@ if (!function_exists('envNonEmpty')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!function_exists('str_is_equal')) {
|
if (!function_exists('stringIsEqual')) {
|
||||||
/**
|
/**
|
||||||
* @param string $left
|
* @param string $left
|
||||||
* @param string $right
|
* @param string $right
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function str_is_equal(string $left, string $right): bool
|
function stringIsEqual(string $left, string $right): bool
|
||||||
{
|
{
|
||||||
return $left === $right;
|
return $left === $right;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user