Fix method.

This commit is contained in:
James Cole
2023-10-23 20:09:10 +02:00
parent e90fb98613
commit a9d490263b
3 changed files with 21 additions and 1 deletions

View File

@@ -84,7 +84,7 @@ class DownloadExchangeRates implements ShouldQueue
public function handle(): void
{
Log::debug('Now in handle()');
$currencies = $this->repository->get();
$currencies = $this->repository->getCompleteSet();
/** @var TransactionCurrency $currency */
foreach ($currencies as $currency) {

View File

@@ -201,6 +201,17 @@ class CurrencyRepository implements CurrencyRepositoryInterface
return $all;
}
/**
* Returns the complete set of transactions but needs
* no user object.
*
* @return Collection
*/
public function getCompleteSet(): Collection
{
return TransactionCurrency::orderBy('code', 'ASC')->get();
}
/**
* @param TransactionCurrency $currency
*

View File

@@ -37,6 +37,15 @@ use Illuminate\Support\Collection;
*/
interface CurrencyRepositoryInterface
{
/**
* Returns the complete set of transactions but needs
* no user object.
*
* @return Collection
*/
public function getCompleteSet(): Collection;
/**
* @param TransactionCurrency $currency
*