Removed for-loop in favour of "pluck()" aka: RTFM.

This commit is contained in:
James Cole
2015-12-30 09:17:14 +01:00
parent 9f87890ead
commit f99e46bf75
2 changed files with 3 additions and 13 deletions

View File

@@ -39,11 +39,7 @@ class ComponentRepository
return $cache->get(); // @codeCoverageIgnore
}
$ids = [];
/** @var Account $account */
foreach ($accounts as $account) {
$ids[] = $account->id;
}
$ids = $accounts->pluck('id')->toArray();
$entry = $object->transactionjournals()