Remove unused methods.

This commit is contained in:
James Cole
2018-07-22 21:09:57 +02:00
parent a616e06f9d
commit 67ea825d4a
26 changed files with 13 additions and 929 deletions

View File

@@ -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!