mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
Rename method from default to primary.
This commit is contained in:
@@ -417,7 +417,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface, UserGroupInterf
|
||||
|
||||
// currency must be made default.
|
||||
if (true === $default) {
|
||||
$this->makeDefault($currency);
|
||||
$this->makePrimary($currency);
|
||||
}
|
||||
|
||||
/** @var CurrencyUpdateService $service */
|
||||
@@ -426,7 +426,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface, UserGroupInterf
|
||||
return $service->update($currency, $data);
|
||||
}
|
||||
|
||||
public function makeDefault(TransactionCurrency $currency): void
|
||||
public function makePrimary(TransactionCurrency $currency): void
|
||||
{
|
||||
$current = app('amount')->getPrimaryCurrencyByUserGroup($this->userGroup);
|
||||
Log::debug(sprintf('Enabled + made default currency %s for user #%d', $currency->code, $this->userGroup->id));
|
||||
|
@@ -102,7 +102,7 @@ interface CurrencyRepositoryInterface
|
||||
|
||||
public function isFallbackCurrency(TransactionCurrency $currency): bool;
|
||||
|
||||
public function makeDefault(TransactionCurrency $currency): void;
|
||||
public function makePrimary(TransactionCurrency $currency): void;
|
||||
|
||||
public function searchCurrency(string $search, int $limit): Collection;
|
||||
|
||||
|
@@ -209,7 +209,7 @@ class UserGroupRepository implements UserGroupRepositoryInterface, UserGroupInte
|
||||
$currency = $repository->find((int) $data['primary_currency_id']);
|
||||
}
|
||||
if (null !== $currency) {
|
||||
$repository->makeDefault($currency);
|
||||
$repository->makePrimary($currency);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -365,7 +365,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
|
||||
// currency must be made default.
|
||||
if (true === $default) {
|
||||
$this->makeDefault($currency);
|
||||
$this->makePrimary($currency);
|
||||
}
|
||||
|
||||
/** @var CurrencyUpdateService $service */
|
||||
@@ -374,7 +374,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
return $service->update($currency, $data);
|
||||
}
|
||||
|
||||
public function makeDefault(TransactionCurrency $currency): void
|
||||
public function makePrimary(TransactionCurrency $currency): void
|
||||
{
|
||||
$current = app('amount')->getPrimaryCurrencyByUserGroup($this->userGroup);
|
||||
Log::debug(sprintf('Enabled + made default currency %s for user #%d', $currency->code, $this->userGroup->id));
|
||||
|
@@ -89,7 +89,7 @@ interface CurrencyRepositoryInterface
|
||||
|
||||
public function isFallbackCurrency(TransactionCurrency $currency): bool;
|
||||
|
||||
public function makeDefault(TransactionCurrency $currency): void;
|
||||
public function makePrimary(TransactionCurrency $currency): void;
|
||||
|
||||
public function searchCurrency(string $search, int $limit): Collection;
|
||||
|
||||
|
Reference in New Issue
Block a user