mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix another php7 bug.
This commit is contained in:
parent
cd871e5aad
commit
a4e699f781
@ -31,7 +31,7 @@ class BudgetLine
|
|||||||
/**
|
/**
|
||||||
* @return BudgetModel
|
* @return BudgetModel
|
||||||
*/
|
*/
|
||||||
public function getBudget()
|
public function getBudget(): BudgetModel
|
||||||
{
|
{
|
||||||
return $this->budget;
|
return $this->budget;
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ class BudgetLine
|
|||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getBudgeted()
|
public function getBudgeted(): string
|
||||||
{
|
{
|
||||||
return $this->budgeted;
|
return $this->budgeted;
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ class BudgetLine
|
|||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getLeft()
|
public function getLeft(): string
|
||||||
{
|
{
|
||||||
return $this->left;
|
return $this->left;
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ class BudgetLine
|
|||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getOverspent()
|
public function getOverspent(): string
|
||||||
{
|
{
|
||||||
return $this->overspent;
|
return $this->overspent;
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ class BudgetLine
|
|||||||
/**
|
/**
|
||||||
* @return LimitRepetition
|
* @return LimitRepetition
|
||||||
*/
|
*/
|
||||||
public function getRepetition()
|
public function getRepetition(): LimitRepetition
|
||||||
{
|
{
|
||||||
return $this->repetition;
|
return $this->repetition;
|
||||||
}
|
}
|
||||||
@ -111,7 +111,7 @@ class BudgetLine
|
|||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getSpent()
|
public function getSpent(): string
|
||||||
{
|
{
|
||||||
return $this->spent;
|
return $this->spent;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ class BudgetReportHelper implements BudgetReportHelperInterface
|
|||||||
*
|
*
|
||||||
* @return BudgetCollection
|
* @return BudgetCollection
|
||||||
*/
|
*/
|
||||||
public function getBudgetReport(Carbon $start, Carbon $end, Collection $accounts)
|
public function getBudgetReport(Carbon $start, Carbon $end, Collection $accounts): BudgetCollection
|
||||||
{
|
{
|
||||||
$object = new BudgetCollection;
|
$object = new BudgetCollection;
|
||||||
/** @var \FireflyIII\Repositories\Budget\BudgetRepositoryInterface $repository */
|
/** @var \FireflyIII\Repositories\Budget\BudgetRepositoryInterface $repository */
|
||||||
@ -77,7 +77,7 @@ class BudgetReportHelper implements BudgetReportHelperInterface
|
|||||||
// 200 en -200 is 0, vergeleken met 0 === 0
|
// 200 en -200 is 0, vergeleken met 0 === 0
|
||||||
// 200 en -300 is -100, vergeleken met 0 === -1
|
// 200 en -300 is -100, vergeleken met 0 === -1
|
||||||
|
|
||||||
$left = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? bcadd($repetition->amount, $expenses) : 0;
|
$left = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? bcadd($repetition->amount, $expenses) : '0';
|
||||||
$spent = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? $expenses : '0';
|
$spent = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? $expenses : '0';
|
||||||
$overspent = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? '0' : bcadd($expenses, $repetition->amount);
|
$overspent = bccomp(bcadd($repetition->amount, $expenses), '0') === 1 ? '0' : bcadd($expenses, $repetition->amount);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user