Fix code quality with rector [skip ci]

This commit is contained in:
James Cole
2025-11-09 09:08:03 +01:00
parent d2610be790
commit 68183a0a0e
209 changed files with 1021 additions and 1248 deletions

View File

@@ -79,7 +79,7 @@ class RecurringRepository implements RecurringRepositoryInterface, UserGroupInte
foreach ($set as $journalMeta) {
$count = TransactionJournalMeta::where(static function (Builder $q2) use ($date): void {
$string = (string) $date;
app('log')->debug(sprintf('Search for date: %s', json_encode($string)));
Log::debug(sprintf('Search for date: %s', json_encode($string)));
$q2->where('name', 'recurrence_date');
$q2->where('data', json_encode($string));
})
@@ -87,7 +87,7 @@ class RecurringRepository implements RecurringRepositoryInterface, UserGroupInte
->count()
;
if ($count > 0) {
app('log')->debug(sprintf('Looks like journal #%d was already created', $journalMeta->transaction_journal_id));
Log::debug(sprintf('Looks like journal #%d was already created', $journalMeta->transaction_journal_id));
return true;
}
@@ -373,7 +373,7 @@ class RecurringRepository implements RecurringRepositoryInterface, UserGroupInte
*/
public function getXOccurrencesSince(RecurrenceRepetition $repetition, Carbon $date, Carbon $afterDate, int $count): array
{
app('log')->debug('Now in getXOccurrencesSince()');
Log::debug('Now in getXOccurrencesSince()');
$skipMod = $repetition->repetition_skip + 1;
$occurrences = [];
@@ -433,7 +433,7 @@ class RecurringRepository implements RecurringRepositoryInterface, UserGroupInte
*/
public function repetitionDescription(RecurrenceRepetition $repetition): string
{
app('log')->debug('Now in repetitionDescription()');
Log::debug('Now in repetitionDescription()');
/** @var Preference $pref */
$pref = app('preferences')->getForUser($this->user, 'language', config('firefly.default_language', 'en_US'));
@@ -546,8 +546,8 @@ class RecurringRepository implements RecurringRepositoryInterface, UserGroupInte
$mutator = clone $start;
$mutator->startOfDay();
$skipMod = $repetition->repetition_skip + 1;
app('log')->debug(sprintf('Calculating occurrences for rep type "%s"', $repetition->repetition_type));
app('log')->debug(sprintf('Mutator is now: %s', $mutator->format('Y-m-d')));
Log::debug(sprintf('Calculating occurrences for rep type "%s"', $repetition->repetition_type));
Log::debug(sprintf('Mutator is now: %s', $mutator->format('Y-m-d')));
if ('daily' === $repetition->repetition_type) {
$occurrences = $this->getDailyInRange($mutator, $end, $skipMod);