Code cleanup

This commit is contained in:
James Cole
2023-11-04 14:18:49 +01:00
parent 5a35960434
commit ba0843d0bb
211 changed files with 566 additions and 568 deletions

View File

@@ -68,14 +68,14 @@ class RecurringRepository implements RecurringRepositoryInterface
{
// if not, loop set and try to read the recurrence_date. If it matches start or end, return it as well.
$set
= TransactionJournalMeta::where(function (Builder $q1) use ($recurrence) {
= TransactionJournalMeta::where(static function (Builder $q1) use ($recurrence) {
$q1->where('name', 'recurrence_id');
$q1->where('data', json_encode((string)$recurrence->id));
})->get(['journal_meta.transaction_journal_id']);
// there are X journals made for this recurrence. Any of them meant for today?
foreach ($set as $journalMeta) {
$count = TransactionJournalMeta::where(function (Builder $q2) use ($date) {
$count = TransactionJournalMeta::where(static function (Builder $q2) use ($date) {
$string = (string)$date;
app('log')->debug(sprintf('Search for date: %s', json_encode($string)));
$q2->where('name', 'recurrence_date');