chore: reformat code.

This commit is contained in:
James Cole
2023-06-21 12:34:58 +02:00
parent 8d87abde64
commit 3dcb35710b
799 changed files with 23319 additions and 22173 deletions

View File

@@ -127,65 +127,8 @@ class Cron extends Command
}
/**
* @param bool $force
* @param Carbon|null $date
*
*/
private function autoBudgetCronJob(bool $force, ?Carbon $date): void
{
$autoBudget = new AutoBudgetCronjob();
$autoBudget->setForce($force);
// set date in cron job:
if (null !== $date) {
$autoBudget->setDate($date);
}
$autoBudget->fire();
if ($autoBudget->jobErrored) {
$this->friendlyError(sprintf('Error in "create auto budgets" cron: %s', $autoBudget->message));
}
if ($autoBudget->jobFired) {
$this->friendlyInfo(sprintf('"Create auto budgets" cron fired: %s', $autoBudget->message));
}
if ($autoBudget->jobSucceeded) {
$this->friendlyPositive(sprintf('"Create auto budgets" cron ran with success: %s', $autoBudget->message));
}
}
/**
* @param bool $force
* @param Carbon|null $date
*
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function billWarningCronJob(bool $force, ?Carbon $date): void
{
$autoBudget = new BillWarningCronjob();
$autoBudget->setForce($force);
// set date in cron job:
if (null !== $date) {
$autoBudget->setDate($date);
}
$autoBudget->fire();
if ($autoBudget->jobErrored) {
$this->friendlyError(sprintf('Error in "bill warnings" cron: %s', $autoBudget->message));
}
if ($autoBudget->jobFired) {
$this->friendlyInfo(sprintf('"Send bill warnings" cron fired: %s', $autoBudget->message));
}
if ($autoBudget->jobSucceeded) {
$this->friendlyPositive(sprintf('"Send bill warnings" cron ran with success: %s', $autoBudget->message));
}
}
/**
* @param bool $force
* @param Carbon|null $date
* @param bool $force
* @param Carbon|null $date
*/
private function exchangeRatesCronJob(bool $force, ?Carbon $date): void
{
@@ -210,8 +153,8 @@ class Cron extends Command
}
/**
* @param bool $force
* @param Carbon|null $date
* @param bool $force
* @param Carbon|null $date
*
* @throws ContainerExceptionInterface
* @throws FireflyException
@@ -238,4 +181,61 @@ class Cron extends Command
$this->friendlyPositive(sprintf('"Create recurring transactions" cron ran with success: %s', $recurring->message));
}
}
/**
* @param bool $force
* @param Carbon|null $date
*
*/
private function autoBudgetCronJob(bool $force, ?Carbon $date): void
{
$autoBudget = new AutoBudgetCronjob();
$autoBudget->setForce($force);
// set date in cron job:
if (null !== $date) {
$autoBudget->setDate($date);
}
$autoBudget->fire();
if ($autoBudget->jobErrored) {
$this->friendlyError(sprintf('Error in "create auto budgets" cron: %s', $autoBudget->message));
}
if ($autoBudget->jobFired) {
$this->friendlyInfo(sprintf('"Create auto budgets" cron fired: %s', $autoBudget->message));
}
if ($autoBudget->jobSucceeded) {
$this->friendlyPositive(sprintf('"Create auto budgets" cron ran with success: %s', $autoBudget->message));
}
}
/**
* @param bool $force
* @param Carbon|null $date
*
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function billWarningCronJob(bool $force, ?Carbon $date): void
{
$autoBudget = new BillWarningCronjob();
$autoBudget->setForce($force);
// set date in cron job:
if (null !== $date) {
$autoBudget->setDate($date);
}
$autoBudget->fire();
if ($autoBudget->jobErrored) {
$this->friendlyError(sprintf('Error in "bill warnings" cron: %s', $autoBudget->message));
}
if ($autoBudget->jobFired) {
$this->friendlyInfo(sprintf('"Send bill warnings" cron fired: %s', $autoBudget->message));
}
if ($autoBudget->jobSucceeded) {
$this->friendlyPositive(sprintf('"Send bill warnings" cron ran with success: %s', $autoBudget->message));
}
}
}