mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-15 07:41:20 +00:00
Fix phpstan issues
This commit is contained in:
@@ -47,8 +47,7 @@ class ShowController extends Controller
|
||||
{
|
||||
use GetConfigurationData;
|
||||
|
||||
/** @var RecurringRepositoryInterface Recurring repository */
|
||||
private $recurring;
|
||||
private RecurringRepositoryInterface $repository;
|
||||
|
||||
/**
|
||||
* IndexController constructor.
|
||||
@@ -64,7 +63,7 @@ class ShowController extends Controller
|
||||
app('view')->share('mainTitleIcon', 'fa-paint-brush');
|
||||
app('view')->share('title', (string) trans('firefly.recurrences'));
|
||||
|
||||
$this->recurring = app(RecurringRepositoryInterface::class);
|
||||
$this->repository = app(RecurringRepositoryInterface::class);
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
@@ -87,6 +86,7 @@ class ShowController extends Controller
|
||||
$admin = auth()->user();
|
||||
$enrichment = new RecurringEnrichment();
|
||||
$enrichment->setUser($admin);
|
||||
/** @var Recurrence $recurrence */
|
||||
$recurrence = $enrichment->enrichSingle($recurrence);
|
||||
|
||||
/** @var RecurrenceTransformer $transformer */
|
||||
@@ -95,10 +95,10 @@ class ShowController extends Controller
|
||||
|
||||
$array = $transformer->transform($recurrence);
|
||||
|
||||
$groups = $this->recurring->getTransactions($recurrence);
|
||||
$groups = $this->repository->getTransactions($recurrence);
|
||||
$today = today(config('app.timezone'));
|
||||
$array['repeat_until'] = null !== $array['repeat_until'] ? new Carbon($array['repeat_until']) : null;
|
||||
$array['journal_count'] = $this->recurring->getJournalCount($recurrence);
|
||||
$array['journal_count'] = $this->repository->getJournalCount($recurrence);
|
||||
|
||||
// transform dates back to Carbon objects and expand information
|
||||
foreach ($array['repetitions'] as $index => $repetition) {
|
||||
@@ -106,8 +106,8 @@ class ShowController extends Controller
|
||||
$date = new Carbon($occurrence)->startOfDay();
|
||||
$set = [
|
||||
'date' => $date,
|
||||
'fired' => $this->recurring->createdPreviously($recurrence, $date)
|
||||
|| $this->recurring->getJournalCount($recurrence, $date) > 0,
|
||||
'fired' => $this->repository->createdPreviously($recurrence, $date)
|
||||
|| $this->repository->getJournalCount($recurrence, $date) > 0,
|
||||
];
|
||||
$array['repetitions'][$index]['occurrences'][$item] = $set;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user