Code cleanup

This commit is contained in:
James Cole
2024-12-22 08:43:12 +01:00
parent 5751f7e5a3
commit 565bd87959
574 changed files with 4600 additions and 4604 deletions

View File

@@ -122,12 +122,12 @@ class NetWorth implements NetWorthInterface
$netWorth[$currencyCode] ??= [
'balance' => '0',
'native_balance' => '0',
'currency_id' => (string)$currency->id,
'currency_id' => (string) $currency->id,
'currency_code' => $currency->code,
'currency_name' => $currency->name,
'currency_symbol' => $currency->symbol,
'currency_decimal_places' => $currency->decimal_places,
'native_currency_id' => (string)$default->id,
'native_currency_id' => (string) $default->id,
'native_currency_code' => $default->code,
'native_currency_name' => $default->name,
'native_currency_symbol' => $default->symbol,
@@ -199,7 +199,7 @@ class NetWorth implements NetWorthInterface
}
$return[$currency->id] ??= [
'id' => (string)$currency->id,
'id' => (string) $currency->id,
'name' => $currency->name,
'symbol' => $currency->symbol,
'code' => $currency->code,
@@ -221,7 +221,7 @@ class NetWorth implements NetWorthInterface
/** @var Account $account */
foreach ($accounts as $account) {
if (1 === (int)$this->getRepository()->getMetaValue($account, 'include_net_worth')) {
if (1 === (int) $this->getRepository()->getMetaValue($account, 'include_net_worth')) {
$filtered->push($account);
}
}

View File

@@ -66,7 +66,7 @@ class PopupReport implements PopupReportInterface
if (null !== $currencyId) {
/** @var CurrencyRepositoryInterface $repos */
$repos = app(CurrencyRepositoryInterface::class);
$currency = $repos->find((int)$currencyId);
$currency = $repos->find((int) $currencyId);
}
/** @var GroupCollectorInterface $collector */
@@ -98,7 +98,7 @@ class PopupReport implements PopupReportInterface
if (null !== $currencyId) {
/** @var CurrencyRepositoryInterface $repos */
$repos = app(CurrencyRepositoryInterface::class);
$currency = $repos->find((int)$currencyId);
$currency = $repos->find((int) $currencyId);
}
/** @var GroupCollectorInterface $collector */
@@ -135,7 +135,7 @@ class PopupReport implements PopupReportInterface
if (null !== $currencyId) {
/** @var CurrencyRepositoryInterface $repos */
$repos = app(CurrencyRepositoryInterface::class);
$currency = $repos->find((int)$currencyId);
$currency = $repos->find((int) $currencyId);
}
/** @var GroupCollectorInterface $collector */
@@ -174,7 +174,7 @@ class PopupReport implements PopupReportInterface
if (null !== $currencyId) {
/** @var CurrencyRepositoryInterface $repos */
$repos = app(CurrencyRepositoryInterface::class);
$currency = $repos->find((int)$currencyId);
$currency = $repos->find((int) $currencyId);
}
/** @var JournalRepositoryInterface $repository */

View File

@@ -128,7 +128,7 @@ class ReportHelper implements ReportHelperInterface
$currentEnd = clone $start;
$currentEnd->endOfMonth();
$months[$year]['months'][] = [
'formatted' => $start->isoFormat((string)trans('config.month_js')),
'formatted' => $start->isoFormat((string) trans('config.month_js')),
'start' => $start->format('Y-m-d'),
'end' => $currentEnd->format('Y-m-d'),
'month' => $start->month,