Marked some unused stuff as deprecated.

This commit is contained in:
James Cole 2015-12-25 07:52:56 +01:00
parent 33d9148029
commit c61fb7a598
9 changed files with 11 additions and 149 deletions

View File

@ -646,6 +646,7 @@ class AccountRepository implements AccountRepositoryInterface
}
/**
* @deprecated
* @param $accountId
*
* @return Account

View File

@ -26,6 +26,7 @@ interface AccountRepositoryInterface
/**
* @param $accountId
* @deprecated
*
* @return Account
*/

View File

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

View File

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

View File

@ -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.
*

View File

@ -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.
*

View File

@ -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;
}
}

View File

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

View File

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