mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 20:16:22 +00:00
Code cleanup according to PHPStorm.
This commit is contained in:
@@ -5,7 +5,6 @@ namespace FireflyIII\Repositories\Shared;
|
||||
use Carbon\Carbon;
|
||||
use DB;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
@@ -26,18 +25,6 @@ class ComponentRepository
|
||||
*/
|
||||
protected function commonBalanceInPeriod($object, Carbon $start, Carbon $end, Collection $accounts)
|
||||
{
|
||||
$cache = new CacheProperties; // we must cache this.
|
||||
$cache->addProperty($object->id);
|
||||
$cache->addProperty(get_class($object));
|
||||
$cache->addProperty($start);
|
||||
$cache->addProperty($end);
|
||||
$cache->addProperty($accounts);
|
||||
$cache->addProperty('balanceInPeriodList');
|
||||
|
||||
if ($cache->has()) {
|
||||
return $cache->get(); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
$ids = $accounts->pluck('id')->toArray();
|
||||
|
||||
|
||||
@@ -51,8 +38,6 @@ class ComponentRepository
|
||||
->first([DB::Raw('SUM(`transactions`.`amount`) as `journalAmount`')]);
|
||||
$amount = $entry->journalAmount;
|
||||
|
||||
$cache->store($amount);
|
||||
|
||||
return $amount;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user