mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Better order for method arguments.
This commit is contained in:
@@ -96,7 +96,7 @@ class IndexController extends Controller
|
|||||||
[
|
[
|
||||||
$startBalances,
|
$startBalances,
|
||||||
$endBalances,
|
$endBalances,
|
||||||
] = Steam::accountsBalancesInRange($start, $end, $accounts, $this->primaryCurrency, $this->convertToPrimary);
|
] = Steam::accountsBalancesInRange($accounts, $start, $end, $this->primaryCurrency, $this->convertToPrimary);
|
||||||
$activities = Steam::getLastActivities($ids);
|
$activities = Steam::getLastActivities($ids);
|
||||||
|
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ class IndexController extends Controller
|
|||||||
[
|
[
|
||||||
$startBalances,
|
$startBalances,
|
||||||
$endBalances,
|
$endBalances,
|
||||||
] = Steam::accountsBalancesInRange($start, $end, $accounts, $this->primaryCurrency, $this->convertToPrimary);
|
] = Steam::accountsBalancesInRange($accounts, $start, $end, $this->primaryCurrency, $this->convertToPrimary);
|
||||||
$activities = Steam::getLastActivities($ids);
|
$activities = Steam::getLastActivities($ids);
|
||||||
|
|
||||||
|
|
||||||
|
@@ -120,7 +120,7 @@ class AccountController extends Controller
|
|||||||
[
|
[
|
||||||
$startBalances,
|
$startBalances,
|
||||||
$endBalances,
|
$endBalances,
|
||||||
] = Steam::accountsBalancesInRange($start, $end, $accounts, $this->primaryCurrency, $this->convertToPrimary);
|
] = Steam::accountsBalancesInRange($accounts, $start, $end, $this->primaryCurrency, $this->convertToPrimary);
|
||||||
Log::debug('Done collecting balances');
|
Log::debug('Done collecting balances');
|
||||||
// loop the accounts, then check for balance and currency info.
|
// loop the accounts, then check for balance and currency info.
|
||||||
foreach ($accounts as $account) {
|
foreach ($accounts as $account) {
|
||||||
@@ -671,7 +671,7 @@ class AccountController extends Controller
|
|||||||
[
|
[
|
||||||
$startBalances,
|
$startBalances,
|
||||||
$endBalances,
|
$endBalances,
|
||||||
] = Steam::accountsBalancesInRange($start, $end, $accounts, $this->primaryCurrency, $this->convertToPrimary);
|
] = Steam::accountsBalancesInRange($accounts, $start, $end , $this->primaryCurrency, $this->convertToPrimary);
|
||||||
|
|
||||||
|
|
||||||
// loop the accounts, then check for balance and currency info.
|
// loop the accounts, then check for balance and currency info.
|
||||||
|
@@ -54,7 +54,7 @@ class AccountTasker implements AccountTaskerInterface, UserGroupInterface
|
|||||||
[
|
[
|
||||||
$startSet,
|
$startSet,
|
||||||
$endSet,
|
$endSet,
|
||||||
] = Steam::accountsBalancesInRange($yesterday, $end, $accounts);
|
] = Steam::accountsBalancesInRange($accounts, $yesterday, $end);
|
||||||
Log::debug('Start of accountreport');
|
Log::debug('Start of accountreport');
|
||||||
|
|
||||||
/** @var AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
|
@@ -292,7 +292,7 @@ class AccountEnrichment implements EnrichmentInterface
|
|||||||
[
|
[
|
||||||
$this->startBalances,
|
$this->startBalances,
|
||||||
$this->endBalances,
|
$this->endBalances,
|
||||||
] = Steam::accountsBalancesInRange($this->start, $this->end, $this->collection, $this->primaryCurrency, $this->convertToPrimary);
|
] = Steam::accountsBalancesInRange($this->collection, $this->start, $this->end, $this->primaryCurrency, $this->convertToPrimary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -127,7 +127,7 @@ class Steam
|
|||||||
/**
|
/**
|
||||||
* Calls accountsBalancesOptimized for the given accounts and makes sure that inclusive is set to false, so it properly gets the balance of a range.
|
* Calls accountsBalancesOptimized for the given accounts and makes sure that inclusive is set to false, so it properly gets the balance of a range.
|
||||||
*/
|
*/
|
||||||
public function accountsBalancesInRange(Carbon $start, Carbon $end, Collection $accounts, ?TransactionCurrency $primary = null, ?bool $convertToPrimary = null): array
|
public function accountsBalancesInRange(Collection $accounts, Carbon $start, Carbon $end, ?TransactionCurrency $primary = null, ?bool $convertToPrimary = null): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
$this->accountsBalancesOptimized($accounts, $start, $primary, $convertToPrimary, inclusive: false),
|
$this->accountsBalancesOptimized($accounts, $start, $primary, $convertToPrimary, inclusive: false),
|
||||||
@@ -373,6 +373,9 @@ class Steam
|
|||||||
return $final;
|
return $final;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
public function finalAccountBalanceInRange(Account $account, Carbon $start, Carbon $end, bool $convertToPrimary): array
|
public function finalAccountBalanceInRange(Account $account, Carbon $start, Carbon $end, bool $convertToPrimary): array
|
||||||
{
|
{
|
||||||
// expand period.
|
// expand period.
|
||||||
|
Reference in New Issue
Block a user