mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Remove unused methods.
This commit is contained in:
@@ -107,44 +107,6 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find by ID.
|
||||
*
|
||||
* @param int $currencyId
|
||||
*
|
||||
* @deprecated
|
||||
*
|
||||
* @return TransactionCurrency
|
||||
*/
|
||||
public function find(int $currencyId): TransactionCurrency
|
||||
{
|
||||
$currency = TransactionCurrency::find($currencyId);
|
||||
if (null === $currency) {
|
||||
$currency = new TransactionCurrency;
|
||||
}
|
||||
|
||||
return $currency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find by currency code.
|
||||
*
|
||||
* @deprecated
|
||||
*
|
||||
* @param string $currencyCode
|
||||
*
|
||||
* @return TransactionCurrency
|
||||
*/
|
||||
public function findByCode(string $currencyCode): TransactionCurrency
|
||||
{
|
||||
$currency = TransactionCurrency::where('code', $currencyCode)->first();
|
||||
if (null === $currency) {
|
||||
$currency = new TransactionCurrency;
|
||||
}
|
||||
|
||||
return $currency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find by currency code, return NULL if unfound.
|
||||
* Used in Import Currency!
|
||||
@@ -158,25 +120,6 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
return TransactionCurrency::where('code', $currencyCode)->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find by currency name.
|
||||
*
|
||||
* @param string $currencyName
|
||||
*
|
||||
* @deprecated
|
||||
*
|
||||
* @return TransactionCurrency
|
||||
*/
|
||||
public function findByName(string $currencyName): TransactionCurrency
|
||||
{
|
||||
$preferred = TransactionCurrency::whereName($currencyName)->first();
|
||||
if (null === $preferred) {
|
||||
$preferred = new TransactionCurrency;
|
||||
}
|
||||
|
||||
return $preferred;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find by currency name or return null.
|
||||
* Used in Import Currency!
|
||||
@@ -190,25 +133,6 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
return TransactionCurrency::whereName($currencyName)->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find by currency symbol.
|
||||
*
|
||||
* @deprecated
|
||||
*
|
||||
* @param string $currencySymbol
|
||||
*
|
||||
* @return TransactionCurrency
|
||||
*/
|
||||
public function findBySymbol(string $currencySymbol): TransactionCurrency
|
||||
{
|
||||
$currency = TransactionCurrency::whereSymbol($currencySymbol)->first();
|
||||
if (null === $currency) {
|
||||
$currency = new TransactionCurrency;
|
||||
}
|
||||
|
||||
return $currency;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find by currency symbol or return NULL
|
||||
* Used in Import Currency!
|
||||
|
Reference in New Issue
Block a user