mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 12:11:19 +00:00
Code cleanup
This commit is contained in:
@@ -37,7 +37,7 @@ class AutoBudgetCronjob extends AbstractCronjob
|
||||
{
|
||||
/** @var Configuration $config */
|
||||
$config = app('fireflyconfig')->get('last_ab_job', 0);
|
||||
$lastTime = (int)$config->data;
|
||||
$lastTime = (int) $config->data;
|
||||
$diff = time() - $lastTime;
|
||||
$diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
|
||||
if (0 === $lastTime) {
|
||||
@@ -78,7 +78,7 @@ class AutoBudgetCronjob extends AbstractCronjob
|
||||
$this->jobSucceeded = true;
|
||||
$this->message = 'Auto-budget cron job fired successfully.';
|
||||
|
||||
app('fireflyconfig')->set('last_ab_job', (int)$this->date->format('U'));
|
||||
app('fireflyconfig')->set('last_ab_job', (int) $this->date->format('U'));
|
||||
app('log')->info('Done with auto budget cron job task.');
|
||||
}
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ class BillWarningCronjob extends AbstractCronjob
|
||||
|
||||
/** @var Configuration $config */
|
||||
$config = app('fireflyconfig')->get('last_bw_job', 0);
|
||||
$lastTime = (int)$config->data;
|
||||
$lastTime = (int) $config->data;
|
||||
$diff = time() - $lastTime;
|
||||
$diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
|
||||
|
||||
@@ -91,8 +91,8 @@ class BillWarningCronjob extends AbstractCronjob
|
||||
$this->jobSucceeded = true;
|
||||
$this->message = 'Bill warning cron job fired successfully.';
|
||||
|
||||
app('fireflyconfig')->set('last_bw_job', (int)$this->date->format('U'));
|
||||
app('log')->info(sprintf('Marked the last time this job has run as "%s" (%d)', $this->date->format('Y-m-d H:i:s'), (int)$this->date->format('U')));
|
||||
app('fireflyconfig')->set('last_bw_job', (int) $this->date->format('U'));
|
||||
app('log')->info(sprintf('Marked the last time this job has run as "%s" (%d)', $this->date->format('Y-m-d H:i:s'), (int) $this->date->format('U')));
|
||||
app('log')->info('Done with bill warning cron job task.');
|
||||
}
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ class ExchangeRatesCronjob extends AbstractCronjob
|
||||
{
|
||||
/** @var Configuration $config */
|
||||
$config = app('fireflyconfig')->get('last_cer_job', 0);
|
||||
$lastTime = (int)$config->data;
|
||||
$lastTime = (int) $config->data;
|
||||
$diff = time() - $lastTime;
|
||||
$diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
|
||||
if (0 === $lastTime) {
|
||||
@@ -79,7 +79,7 @@ class ExchangeRatesCronjob extends AbstractCronjob
|
||||
$this->jobSucceeded = true;
|
||||
$this->message = 'Exchange rates cron job fired successfully.';
|
||||
|
||||
app('fireflyconfig')->set('last_cer_job', (int)$this->date->format('U'));
|
||||
app('fireflyconfig')->set('last_cer_job', (int) $this->date->format('U'));
|
||||
app('log')->info('Done with exchange rates job task.');
|
||||
}
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ class RecurringCronjob extends AbstractCronjob
|
||||
|
||||
/** @var Configuration $config */
|
||||
$config = app('fireflyconfig')->get('last_rt_job', 0);
|
||||
$lastTime = (int)$config->data;
|
||||
$lastTime = (int) $config->data;
|
||||
$diff = time() - $lastTime;
|
||||
$diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
|
||||
|
||||
@@ -88,8 +88,8 @@ class RecurringCronjob extends AbstractCronjob
|
||||
$this->jobSucceeded = true;
|
||||
$this->message = 'Recurring transactions cron job fired successfully.';
|
||||
|
||||
app('fireflyconfig')->set('last_rt_job', (int)$this->date->format('U'));
|
||||
app('log')->info(sprintf('Marked the last time this job has run as "%s" (%d)', $this->date->format('Y-m-d H:i:s'), (int)$this->date->format('U')));
|
||||
app('fireflyconfig')->set('last_rt_job', (int) $this->date->format('U'));
|
||||
app('log')->info(sprintf('Marked the last time this job has run as "%s" (%d)', $this->date->format('Y-m-d H:i:s'), (int) $this->date->format('U')));
|
||||
app('log')->info('Done with recurring cron job task.');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user