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

@@ -175,22 +175,6 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
return true;
}
/**
* @param int $piggyBankid
*
* @deprecated
* @return PiggyBank
*/
public function find(int $piggyBankid): PiggyBank
{
$piggyBank = $this->user->piggyBanks()->where('piggy_banks.id', $piggyBankid)->first(['piggy_banks.*']);
if (null !== $piggyBank) {
return $piggyBank;
}
return new PiggyBank();
}
/**
* Find by name or return NULL.
*
@@ -425,24 +409,6 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
return true;
}
/**
* Set all piggy banks to order 0.
*
* @return bool
*/
public function reset(): bool
{
// split query to make it work in sqlite:
$set = PiggyBank::leftJoin('accounts', 'accounts.id', '=', 'piggy_banks.id')
->where('accounts.user_id', $this->user->id)->get(['piggy_banks.*']);
foreach ($set as $e) {
$e->order = 0;
$e->save();
}
return true;
}
/**
* set id of piggy bank.
*