mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-18 12:28:46 +00:00
Reformat various code.
This commit is contained in:
@@ -32,10 +32,10 @@ use Carbon\Carbon;
|
||||
*/
|
||||
abstract class AbstractCronjob
|
||||
{
|
||||
public bool $jobErrored;
|
||||
public bool $jobFired;
|
||||
public bool $jobSucceeded;
|
||||
public ?string $message;
|
||||
public bool $jobErrored;
|
||||
public bool $jobFired;
|
||||
public bool $jobSucceeded;
|
||||
public ?string $message;
|
||||
public int $timeBetweenRuns = 43200;
|
||||
protected Carbon $date;
|
||||
protected bool $force;
|
||||
|
||||
@@ -42,7 +42,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 = Carbon::now()->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
|
||||
if (0 === $lastTime) {
|
||||
@@ -89,7 +89,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'));
|
||||
Log::info('Done with auto budget cron job task.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class BillWarningCronjob extends AbstractCronjob
|
||||
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||
/** @var Configuration $config */
|
||||
$config = app('fireflyconfig')->get('last_bw_job', 0);
|
||||
$lastTime = (int)$config->data;
|
||||
$lastTime = (int) $config->data;
|
||||
$diff = time() - $lastTime;
|
||||
$diffForHumans = Carbon::now()->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
|
||||
|
||||
@@ -95,8 +95,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'));
|
||||
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'));
|
||||
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')));
|
||||
Log::info('Done with bill warning cron job task.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user