Fix various issues and code quality things.

This commit is contained in:
James Cole
2026-02-20 06:04:21 +01:00
parent 474680dbbf
commit 7c76fc7721
3 changed files with 4 additions and 6 deletions

View File

@@ -45,11 +45,9 @@ class CategoryReportController extends Controller
use AugumentData;
use TransactionCalculation;
/** @var GeneratorInterface Chart generation methods. */
private $generator;
private GeneratorInterface $generator;
/** @var OperationsRepositoryInterface */
private $opsRepository;
private OperationsRepositoryInterface $opsRepository;
/**
* CategoryReportController constructor.

View File

@@ -448,7 +448,7 @@ class Navigation
$locale = Steam::getLocale();
// define period to increment
$increment = 'addDay';
$format = $this->preferredCarbonFormat($start, $end);
$format = $this->preferredCarbonLocalizedFormat($start, $end);
$displayFormat = (string) trans('config.month_and_day_js', [], $locale);
$diff = $start->diffInMonths($end, true);
// increment by month (for year)

View File

@@ -246,7 +246,7 @@ class UpdatePiggyBank implements ActionInterface
Log::warning(sprintf('Cannot remove %s from piggy bank.', $amount));
$currency = $accountRepository->getAccountCurrency($account) ?? Amount::getPrimaryCurrency();
event(new RuleActionFailedOnArray($this->action, $array, trans('rules.cannot_remove_from_piggy', [
'amount' => Amount::formatAnything($amount, $currency, false),
'amount' => Amount::formatAnything($currency, $amount, false),
'name' => $piggyBank->name,
])));