Some code cleanup.

This commit is contained in:
James Cole
2015-05-26 08:17:58 +02:00
parent c3c59d0627
commit 812aae358f
22 changed files with 49 additions and 382 deletions

View File

@@ -26,6 +26,10 @@ class AccountController extends Controller
* @param GChart $chart
* @param AccountRepositoryInterface $repository
*
* @param $year
* @param $month
* @param bool $shared
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function all(GChart $chart, AccountRepositoryInterface $repository, $year, $month, $shared = false)
@@ -38,7 +42,6 @@ class AccountController extends Controller
/** @var Collection $accounts */
$accounts = $repository->getAccounts(['Default account', 'Asset account']);
if ($shared === false) {
// remove the shared accounts from the collection:
/** @var Account $account */
foreach ($accounts as $index => $account) {
if ($account->getMeta('accountRole') == 'sharedAsset') {
@@ -71,7 +74,6 @@ class AccountController extends Controller
$chart->generate();
return Response::json($chart->getData());
}
/**