mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-28 09:51:21 -06:00
Removed unused methods.
This commit is contained in:
parent
f3460cca49
commit
ba2a40bdf3
@ -187,16 +187,6 @@ class Bill implements CUDInterface, CommonDatabaseCallsInterface, BillInterface
|
||||
throw new NotImplementedException;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all objects.
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getActive()
|
||||
{
|
||||
return $this->getUser()->bills()->where('active', 1)->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Bill $bill
|
||||
*
|
||||
|
@ -261,26 +261,6 @@ class Budget implements CUDInterface, CommonDatabaseCallsInterface, BudgetInterf
|
||||
return $budget->limitrepetitions()->where('limit_repetitions.startdate', $date)->first(['limit_repetitions.*']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Budget $budget
|
||||
* @param int $limit
|
||||
*
|
||||
* @return \Illuminate\Pagination\Paginator
|
||||
*/
|
||||
public function getTransactionJournals(\Budget $budget, $limit = 50)
|
||||
{
|
||||
$offset = intval(\Input::get('page')) > 0 ? intval(\Input::get('page')) * $limit : 0;
|
||||
$set = $budget->transactionJournals()->withRelevantData()->take($limit)->offset($offset)->orderBy('date', 'DESC')->get(['transaction_journals.*']);
|
||||
$count = $budget->transactionJournals()->count();
|
||||
$items = [];
|
||||
foreach ($set as $entry) {
|
||||
$items[] = $entry;
|
||||
}
|
||||
|
||||
return \Paginator::make($items, $count, $limit);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Budget $budget
|
||||
* @param Carbon $date
|
||||
|
@ -78,14 +78,11 @@ class PiggyBankShared
|
||||
*
|
||||
* @return Collection
|
||||
* @throws NotImplementedException
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function getByIds(array $ids)
|
||||
{
|
||||
return \PiggyBank::
|
||||
leftJoin('accounts', 'accounts.id', '=', 'piggy_banks.account_id')->whereIn('piggy_banks.id', [$ids])->where(
|
||||
'accounts.user_id', $this->getUser()->id
|
||||
)
|
||||
->first(['piggy_banks.*']);
|
||||
throw new NotImplementedException;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -397,11 +397,15 @@ class TransactionJournal implements TransactionJournalInterface, CUDInterface, C
|
||||
*
|
||||
* @param int $objectId
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
* @throws NotImplementedException
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*
|
||||
* @return \Eloquent
|
||||
*/
|
||||
public function find($objectId)
|
||||
{
|
||||
return $this->getUser()->transactionjournals()->find($objectId);
|
||||
throw new NotImplementedException;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -424,11 +428,11 @@ class TransactionJournal implements TransactionJournalInterface, CUDInterface, C
|
||||
* Returns all objects.
|
||||
*
|
||||
* @return Collection
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
return $this->getUser()->transactionjournals()->with(['TransactionType', 'transactions', 'transactions.account', 'transactions.account.accountType'])
|
||||
->get();
|
||||
throw new NotImplementedException;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -462,17 +466,6 @@ class TransactionJournal implements TransactionJournalInterface, CUDInterface, C
|
||||
return $this->getUser()->transactionjournals()->orderBy('date', 'ASC')->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getInDateRange(Carbon $start, Carbon $end)
|
||||
{
|
||||
return $this->getuser()->transactionjournals()->withRelevantData()->before($end)->after($start)->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Carbon $date
|
||||
*
|
||||
|
@ -19,14 +19,6 @@ interface TransactionJournalInterface
|
||||
*/
|
||||
public function first();
|
||||
|
||||
/**
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getInDateRange(Carbon $start, Carbon $end);
|
||||
|
||||
/**
|
||||
* @param Carbon $date
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user