Various code cleanup.

This commit is contained in:
James Cole
2021-04-06 17:00:16 +02:00
parent 8572280b7b
commit 38d0f0427f
61 changed files with 419 additions and 369 deletions

View File

@@ -65,7 +65,7 @@ abstract class AbstractCronjob
/**
* @param Carbon $date
*/
public function setDate(Carbon $date): void
final public function setDate(Carbon $date): void
{
$newDate = clone $date;
$this->date = $newDate;
@@ -74,7 +74,7 @@ abstract class AbstractCronjob
/**
* @param bool $force
*/
public function setForce(bool $force): void
final public function setForce(bool $force): void
{
$this->force = $force;
}

View File

@@ -43,7 +43,7 @@ class AutoBudgetCronjob extends AbstractCronjob
$config = app('fireflyconfig')->get('last_ab_job', 0);
$lastTime = (int)$config->data;
$diff = time() - $lastTime;
$diffForHumans = Carbon::now()->diffForHumans(Carbon::createFromTimestamp($lastTime), true);
$diffForHumans = Carbon::now()->diffForHumans(Carbon::createFromTimestamp($lastTime),null, true);
if (0 === $lastTime) {
Log::info('Auto budget cron-job has never fired before.');
}

View File

@@ -44,7 +44,7 @@ class RecurringCronjob extends AbstractCronjob
$config = app('fireflyconfig')->get('last_rt_job', 0);
$lastTime = (int)$config->data;
$diff = time() - $lastTime;
$diffForHumans = Carbon::now()->diffForHumans(Carbon::createFromTimestamp($lastTime), true);
$diffForHumans = Carbon::now()->diffForHumans(Carbon::createFromTimestamp($lastTime), null,true);
if (0 === $lastTime) {
Log::info('Recurring transactions cron-job has never fired before.');

View File

@@ -54,7 +54,7 @@ class TelemetryCronjob extends AbstractCronjob
$config = app('fireflyconfig')->get('last_tm_job', 0);
$lastTime = (int)$config->data;
$diff = time() - $lastTime;
$diffForHumans = Carbon::now()->diffForHumans(Carbon::createFromTimestamp($lastTime), true);
$diffForHumans = Carbon::now()->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
if (0 === $lastTime) {
Log::info('Telemetry cron-job has never fired before.');
}