Code cleanup according to PHPStorm.

This commit is contained in:
James Cole
2016-01-02 19:33:44 +01:00
parent 9dc3f614af
commit 6573bd6b4b
8 changed files with 3 additions and 193 deletions

View File

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