Small code cleanup.

This commit is contained in:
James Cole
2017-02-11 15:52:55 +01:00
parent fb73baca6a
commit 4c2d9e0eee
8 changed files with 11 additions and 30 deletions

View File

@@ -21,6 +21,7 @@ use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
use FireflyIII\User;
use Illuminate\Support\Collection;
use Steam;
/**
* Class MetaPieChart
@@ -268,10 +269,7 @@ class MetaPieChart implements MetaPieChartInterface
$object = $repository->find(intval($objectId));
$names[$objectId] = $object->name;
}
if (bccomp($amount, '0') === -1) {
$amount = bcmul($amount, '-1');
}
$amount = Steam::positive($amount);
$this->total = bcadd($this->total, $amount);
$chartData[$names[$objectId]] = $amount;
}