Fix code quality with rector [skip ci]

This commit is contained in:
James Cole
2025-11-09 09:08:03 +01:00
parent d2610be790
commit 68183a0a0e
209 changed files with 1021 additions and 1248 deletions

View File

@@ -45,7 +45,7 @@ class FrontpageChartGenerator
private readonly BudgetLimitRepositoryInterface $blRepository;
private readonly BudgetRepositoryInterface $budgetRepository;
private Carbon $end;
private string $monthAndDayFormat;
private string $monthAndDayFormat = '';
private Carbon $start;
/**
@@ -56,7 +56,6 @@ class FrontpageChartGenerator
$this->budgetRepository = app(BudgetRepositoryInterface::class);
$this->blRepository = app(BudgetLimitRepositoryInterface::class);
$this->opsRepository = app(OperationsRepositoryInterface::class);
$this->monthAndDayFormat = '';
}
/**
@@ -192,7 +191,7 @@ class FrontpageChartGenerator
Log::debug(sprintf('Process spent row (%s)', $entry['currency_code']));
$data = $this->processRow($data, $budget, $limit, $entry);
}
if (!($entry['currency_id'] === $limit->transaction_currency_id || $usePrimary)) {
if ($entry['currency_id'] !== $limit->transaction_currency_id && !$usePrimary) {
Log::debug(sprintf('Skipping spent row (%s).', $entry['currency_code']));
}
}

View File

@@ -45,7 +45,7 @@ class FrontpageChartGenerator
public bool $convertToPrimary = false;
public TransactionCurrency $primaryCurrency;
private AccountRepositoryInterface $accountRepos;
private array $currencies;
private array $currencies = [];
private NoCategoryRepositoryInterface $noCatRepos;
private OperationsRepositoryInterface $opsRepos;
private CategoryRepositoryInterface $repository;
@@ -55,7 +55,6 @@ class FrontpageChartGenerator
*/
public function __construct(private Carbon $start, private Carbon $end)
{
$this->currencies = [];
$this->repository = app(CategoryRepositoryInterface::class);
$this->accountRepos = app(AccountRepositoryInterface::class);
$this->opsRepos = app(OperationsRepositoryInterface::class);

View File

@@ -31,12 +31,7 @@ use FireflyIII\Exceptions\FireflyException;
*/
class ChartData
{
private array $series;
public function __construct()
{
$this->series = [];
}
private array $series = [];
/**
* @throws FireflyException