More PHP8.4 updates

This commit is contained in:
James Cole
2025-05-04 13:47:00 +02:00
parent e42107c03c
commit 51e86448c7
195 changed files with 524 additions and 715 deletions

View File

@@ -152,7 +152,7 @@ class CreateController extends Controller
];
// fill prefilled with journal info
$type = strtolower($journal->transactionType->type);
$type = strtolower((string) $journal->transactionType->type);
/** @var Transaction $source */
$source = $journal->transactions()->where('amount', '<', 0)->first();

View File

@@ -135,7 +135,7 @@ class EditController extends Controller
$hasOldInput = null !== $request->old('_token');
$preFilled = [
'transaction_type' => strtolower($recurrence->transactionType->type),
'transaction_type' => strtolower((string) $recurrence->transactionType->type),
'active' => $hasOldInput ? (bool) $request->old('active') : $recurrence->active,
'apply_rules' => $hasOldInput ? (bool) $request->old('apply_rules') : $recurrence->apply_rules,
'deposit_source_id' => $array['transactions'][0]['source_id'],

View File

@@ -94,7 +94,7 @@ class ShowController extends Controller
// transform dates back to Carbon objects and expand information
foreach ($array['repetitions'] as $index => $repetition) {
foreach ($repetition['occurrences'] as $item => $occurrence) {
$date = (new Carbon($occurrence))->startOfDay();
$date = new Carbon($occurrence)->startOfDay();
$set = [
'date' => $date,
'fired' => $this->recurring->createdPreviously($recurrence, $date)