Use PSR-12 code style

This commit is contained in:
James Cole
2022-10-30 12:23:16 +01:00
parent 8edfb1460c
commit bdcd9825ec
32 changed files with 78 additions and 105 deletions

View File

@@ -56,7 +56,7 @@ class ApplyRules extends Command
*
* @var string
*/
protected $signature
protected $signature
= 'firefly-iii:apply-rules
{--user=1 : The user ID.}
{--token= : The user\'s access token.}
@@ -161,13 +161,13 @@ class ApplyRules extends Command
private function stupidLaravel(): void
{
$this->allRules = false;
$this->accounts = new Collection;
$this->accounts = new Collection();
$this->ruleSelection = [];
$this->ruleGroupSelection = [];
$this->ruleRepository = app(RuleRepositoryInterface::class);
$this->ruleGroupRepository = app(RuleGroupRepositoryInterface::class);
$this->acceptedAccounts = [AccountType::DEFAULT, AccountType::DEBT, AccountType::ASSET, AccountType::LOAN, AccountType::MORTGAGE];
$this->groups = new Collection;
$this->groups = new Collection();
}
/**
@@ -205,7 +205,7 @@ class ApplyRules extends Command
return false;
}
$finalList = new Collection;
$finalList = new Collection();
$accountList = explode(',', $accountString);
/** @var AccountRepositoryInterface $accountRepository */
@@ -227,7 +227,6 @@ class ApplyRules extends Command
$this->accounts = $finalList;
return true;
}
/**
@@ -325,7 +324,7 @@ class ApplyRules extends Command
*/
private function getRulesToApply(): Collection
{
$rulesToApply = new Collection;
$rulesToApply = new Collection();
/** @var RuleGroup $group */
foreach ($this->groups as $group) {
$rules = $this->ruleGroupRepository->getActiveStoreRules($group);

View File

@@ -129,7 +129,7 @@ class Cron extends Command
*/
private function recurringCronJob(bool $force, ?Carbon $date): void
{
$recurring = new RecurringCronjob;
$recurring = new RecurringCronjob();
$recurring->setForce($force);
// set date in cron job:
@@ -156,7 +156,7 @@ class Cron extends Command
*/
private function autoBudgetCronJob(bool $force, ?Carbon $date): void
{
$autoBudget = new AutoBudgetCronjob;
$autoBudget = new AutoBudgetCronjob();
$autoBudget->setForce($force);
// set date in cron job:
if (null !== $date) {
@@ -174,7 +174,6 @@ class Cron extends Command
if ($autoBudget->jobSucceeded) {
$this->info(sprintf('"Create auto budgets" cron ran with success: %s', $autoBudget->message));
}
}
/**
@@ -184,7 +183,7 @@ class Cron extends Command
*/
private function billWarningCronJob(bool $force, ?Carbon $date): void
{
$autoBudget = new BillWarningCronjob;
$autoBudget = new BillWarningCronjob();
$autoBudget->setForce($force);
// set date in cron job:
if (null !== $date) {
@@ -202,7 +201,6 @@ class Cron extends Command
if ($autoBudget->jobSucceeded) {
$this->info(sprintf('"Send bill warnings" cron ran with success: %s', $autoBudget->message));
}
}
/**
@@ -212,7 +210,7 @@ class Cron extends Command
*/
private function exchangeRatesCronJob(bool $force, ?Carbon $date): void
{
$exchangeRates = new ExchangeRatesCronjob;
$exchangeRates = new ExchangeRatesCronjob();
$exchangeRates->setForce($force);
// set date in cron job:
if (null !== $date) {
@@ -230,6 +228,5 @@ class Cron extends Command
if ($exchangeRates->jobSucceeded) {
$this->info(sprintf('"Exchange rates" cron ran with success: %s', $exchangeRates->message));
}
}
}