Skip to content

Firefly III: a personal finances manager

Removed unused methods.

James Coleba2a40bdf392
diff --git a/app/lib/FireflyIII/Database/Bill/Bill.php b/app/lib/FireflyIII/Database/Bill/Bill.php
index 4bca112659..75b4800497 100644
--- a/app/lib/FireflyIII/Database/Bill/Bill.php
+++ b/app/lib/FireflyIII/Database/Bill/Bill.php
@@ -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
*
diff --git a/app/lib/FireflyIII/Database/Budget/Budget.php b/app/lib/FireflyIII/Database/Budget/Budget.php
index 013a931297..86d3f0b5f8 100644
--- a/app/lib/FireflyIII/Database/Budget/Budget.php
+++ b/app/lib/FireflyIII/Database/Budget/Budget.php
@@ -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
diff --git a/app/lib/FireflyIII/Database/PiggyBank/PiggyBankShared.php b/app/lib/FireflyIII/Database/PiggyBank/PiggyBankShared.php
index ecd39623de..212e3b77db 100644
--- a/app/lib/FireflyIII/Database/PiggyBank/PiggyBankShared.php
+++ b/app/lib/FireflyIII/Database/PiggyBank/PiggyBankShared.php
@@ -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;
}
/**
diff --git a/app/lib/FireflyIII/Database/TransactionJournal/TransactionJournal.php b/app/lib/FireflyIII/Database/TransactionJournal/TransactionJournal.php
index 032e722283..1f44b5c6f5 100644
--- a/app/lib/FireflyIII/Database/TransactionJournal/TransactionJournal.php
+++ b/app/lib/FireflyIII/Database/TransactionJournal/TransactionJournal.php
@@ -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
*
diff --git a/app/lib/FireflyIII/Database/TransactionJournal/TransactionJournalInterface.php b/app/lib/FireflyIII/Database/TransactionJournal/TransactionJournalInterface.php
index 0268d53d81..264aeb5200 100644
--- a/app/lib/FireflyIII/Database/TransactionJournal/TransactionJournalInterface.php
+++ b/app/lib/FireflyIII/Database/TransactionJournal/TransactionJournalInterface.php
@@ -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
*