Various code clean up. [skip ci]

This commit is contained in:
James Cole
2016-08-26 08:21:31 +02:00
parent e7a0a5937c
commit d0c6afc3a9
56 changed files with 205 additions and 184 deletions

View File

@@ -32,14 +32,12 @@ class BalanceLine
/** @var BudgetModel */
protected $budget;
/** @var Carbon */
protected $startDate;
/** @var Carbon */
protected $endDate;
/** @var int */
protected $role = self::ROLE_DEFAULTROLE;
/** @var Carbon */
protected $startDate;
/**
*
@@ -90,6 +88,22 @@ class BalanceLine
$this->budget = $budget;
}
/**
* @return Carbon
*/
public function getEndDate()
{
return $this->endDate;
}
/**
* @param Carbon $endDate
*/
public function setEndDate($endDate)
{
$this->endDate = $endDate;
}
/**
* @return int
*/
@@ -106,6 +120,22 @@ class BalanceLine
$this->role = $role;
}
/**
* @return Carbon
*/
public function getStartDate()
{
return $this->startDate;
}
/**
* @param Carbon $startDate
*/
public function setStartDate($startDate)
{
$this->startDate = $startDate;
}
/**
* @return string
*/
@@ -127,39 +157,6 @@ class BalanceLine
return '';
}
/**
* @return Carbon
*/
public function getStartDate()
{
return $this->startDate;
}
/**
* @param Carbon $startDate
*/
public function setStartDate($startDate)
{
$this->startDate = $startDate;
}
/**
* @return Carbon
*/
public function getEndDate()
{
return $this->endDate;
}
/**
* @param Carbon $endDate
*/
public function setEndDate($endDate)
{
$this->endDate = $endDate;
}
/**
* If a BalanceLine has a budget/repetition, each BalanceEntry in this BalanceLine
* should have a "spent" value, which is the amount of money that has been spent

View File

@@ -47,6 +47,7 @@ class Budget
public function addBudgetLine(BudgetLine $budgetLine): Budget
{
$this->budgetLines->push($budgetLine);
return $this;
}
@@ -59,6 +60,7 @@ class Budget
{
$add = strval(round($add, 2));
$this->budgeted = bcadd($this->budgeted, $add);
return $this;
}
@@ -71,6 +73,7 @@ class Budget
{
$add = strval(round($add, 2));
$this->left = bcadd($this->left, $add);
return $this;
}
@@ -83,6 +86,7 @@ class Budget
{
$add = strval(round($add, 2));
$this->overspent = bcadd($this->overspent, $add);
return $this;
}
@@ -95,6 +99,7 @@ class Budget
{
$add = strval(round($add, 2));
$this->spent = bcadd($this->spent, $add);
return $this;
}

View File

@@ -51,6 +51,7 @@ class BudgetLine
public function setBudget(BudgetModel $budget): BudgetLine
{
$this->budget = $budget;
return $this;
}
@@ -70,6 +71,7 @@ class BudgetLine
public function setBudgeted(string $budgeted): BudgetLine
{
$this->budgeted = $budgeted;
return $this;
}
@@ -89,6 +91,7 @@ class BudgetLine
public function setLeft(string $left): BudgetLine
{
$this->left = $left;
return $this;
}
@@ -108,6 +111,7 @@ class BudgetLine
public function setOverspent(string $overspent): BudgetLine
{
$this->overspent = $overspent;
return $this;
}
@@ -127,6 +131,7 @@ class BudgetLine
public function setRepetition(LimitRepetition $repetition): BudgetLine
{
$this->repetition = $repetition;
return $this;
}
@@ -146,6 +151,7 @@ class BudgetLine
public function setSpent(string $spent): BudgetLine
{
$this->spent = $spent;
return $this;
}