Skip to content

Firefly III: a personal finances manager

Marked some unused stuff as deprecated.

James Colec61fb7a598a4
diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php
index 4376e02ff9..1dfa4d133c 100644
--- a/app/Repositories/Account/AccountRepository.php
+++ b/app/Repositories/Account/AccountRepository.php
@@ -646,6 +646,7 @@ class AccountRepository implements AccountRepositoryInterface
}
/**
+ * @deprecated
* @param $accountId
*
* @return Account
diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php
index a3bdd05ec7..8bbcf7c6b2 100644
--- a/app/Repositories/Account/AccountRepositoryInterface.php
+++ b/app/Repositories/Account/AccountRepositoryInterface.php
@@ -26,6 +26,7 @@ interface AccountRepositoryInterface
/**
* @param $accountId
+ * @deprecated
*
* @return Account
*/
diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php
index 0e0b9d1623..2338cc8436 100644
--- a/app/Repositories/Budget/BudgetRepository.php
+++ b/app/Repositories/Budget/BudgetRepository.php
@@ -229,6 +229,8 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
}
/**
+ * @deprecated
+ *
* @param Budget $budget
*
* @return Carbon
@@ -244,6 +246,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn
}
/**
+ * @deprecated
* @param Budget $budget
* @param Carbon $date
*
diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.php
index ad298b47a2..2e886960bf 100644
--- a/app/Repositories/Budget/BudgetRepositoryInterface.php
+++ b/app/Repositories/Budget/BudgetRepositoryInterface.php
@@ -96,6 +96,7 @@ interface BudgetRepositoryInterface
public function getJournals(Budget $budget, LimitRepetition $repetition = null, $take = 50);
/**
+ * @deprecated
* @param Budget $budget
*
* @return Carbon
@@ -103,6 +104,7 @@ interface BudgetRepositoryInterface
public function getLastBudgetLimitDate(Budget $budget);
/**
+ * @deprecated
* @param Budget $budget
* @param Carbon $date
*
diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php
index 55554da840..b966737d1f 100644
--- a/app/Repositories/Category/CategoryRepository.php
+++ b/app/Repositories/Category/CategoryRepository.php
@@ -304,6 +304,7 @@ class CategoryRepository extends ComponentRepository implements CategoryReposito
}
/**
+ * @deprecated
* This method returns the sum of the journals in the category, optionally
* limited by a start or end date.
*
diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php
index 9a2116c8d7..60cd43a755 100644
--- a/app/Repositories/Category/CategoryRepositoryInterface.php
+++ b/app/Repositories/Category/CategoryRepositoryInterface.php
@@ -146,6 +146,7 @@ interface CategoryRepositoryInterface
public function getJournalsInRange(Category $category, $page, Carbon $start, Carbon $end);
/**
+ * @deprecated
* This method returns the sum of the journals in the category, optionally
* limited by a start or end date.
*
diff --git a/app/Repositories/PiggyBank/PiggybankPart.php b/app/Repositories/PiggyBank/PiggybankPart.php
deleted file mode 100644
index 79090311fe..0000000000
--- a/app/Repositories/PiggyBank/PiggybankPart.php
+++ /dev/null
@@ -1,149 +0,0 @@
-<?php
-
-namespace FireflyIII\Repositories\PiggyBank;
-
-use Carbon\Carbon;
-use FireflyIII\Models\PiggyBankRepetition;
-
-/**
- * Class PiggyBankPart
- *
- * @codeCoverageIgnore
- * @package FireflyIII\Collection
- */
-class PiggyBankPart
-{
- /** @var float */
- public $amountPerBar;
- /** @var float */
- public $cumulativeAmount;
- /** @var float */
- public $currentamount;
-
- /** @var PiggyBankRepetition */
- public $repetition;
-
- /** @var Carbon */
- public $startdate;
-
- /** @var Carbon */
- public $targetdate;
-
- /**
- * @return PiggyBankRepetition
- */
- public function getRepetition()
- {
- return $this->repetition;
- }
-
- /**
- * @param PiggyBankRepetition $repetition
- */
- public function setRepetition($repetition)
- {
- $this->repetition = $repetition;
- }
-
- /**
- * @return Carbon
- */
- public function getStartdate()
- {
- return $this->startdate;
- }
-
- /**
- * @param Carbon $startdate
- */
- public function setStartdate($startdate)
- {
- $this->startdate = $startdate;
- }
-
- /**
- * @return Carbon
- */
- public function getTargetdate()
- {
- return $this->targetdate;
- }
-
- /**
- * @param Carbon $targetdate
- */
- public function setTargetdate($targetdate)
- {
- $this->targetdate = $targetdate;
- }
-
- /**
- * @return float|int
- */
- public function percentage()
- {
- bcscale(2);
- if ($this->getCurrentamount() < $this->getCumulativeAmount()) {
- $pct = 0;
- // calculate halfway point?
- if (bcsub($this->getCumulativeAmount(), $this->getCurrentamount()) < $this->getAmountPerBar()) {
- $left = $this->getCurrentamount() % $this->getAmountPerBar();
- $pct = round($left / $this->getAmountPerBar() * 100);
- }
-
- return $pct;
- } else {
- return 100;
- }
- }
-
- /**
- * @return float
- */
- public function getCurrentamount()
- {
- return $this->currentamount;
- }
-
- /**
- * @param float $currentamount
- */
- public function setCurrentamount($currentamount)
- {
- $this->currentamount = $currentamount;
- }
-
- /**
- * @return float
- */
- public function getCumulativeAmount()
- {
- return $this->cumulativeAmount;
- }
-
- /**
- * @param float $cumulativeAmount
- */
- public function setCumulativeAmount($cumulativeAmount)
- {
- $this->cumulativeAmount = $cumulativeAmount;
- }
-
- /**
- * @return float
- */
- public function getAmountPerBar()
- {
- return $this->amountPerBar;
- }
-
- /**
- * @param float $amountPerBar
- */
- public function setAmountPerBar($amountPerBar)
- {
- $this->amountPerBar = $amountPerBar;
- }
-
-
-}
diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php
index 77d4ca4f41..d57eb6d9ce 100644
--- a/app/Repositories/Tag/TagRepository.php
+++ b/app/Repositories/Tag/TagRepository.php
@@ -54,6 +54,7 @@ class TagRepository implements TagRepositoryInterface
}
/**
+ * @deprecated
* This method scans the transaction journals from or to the given asset account
* and checks if these are part of a balancing act. If so, it will sum up the amounts
* transferred into the balancing act (if any) and return this amount.
diff --git a/app/Repositories/Tag/TagRepositoryInterface.php b/app/Repositories/Tag/TagRepositoryInterface.php
index 7d76fa30e8..75c6a4df96 100644
--- a/app/Repositories/Tag/TagRepositoryInterface.php
+++ b/app/Repositories/Tag/TagRepositoryInterface.php
@@ -27,6 +27,7 @@ interface TagRepositoryInterface
public function connect(TransactionJournal $journal, Tag $tag);
/**
+ * @deprecated
* This method scans the transaction journals from or to the given asset account
* and checks if these are part of a balancing act. If so, it will sum up the amounts
* transferred into the balancing act (if any) and return this amount.