Some code cleanup courtesy of PHPStorm.

This commit is contained in:
James Cole
2016-01-15 17:53:54 +01:00
parent 820722f44e
commit f69be86c74
12 changed files with 39 additions and 93 deletions

View File

@@ -43,6 +43,8 @@ class CategoryController extends Controller
* @param SCRI $repository
* @param Category $category
*
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*
* @return \Symfony\Component\HttpFoundation\Response
*/
public function all(SCRI $repository, Category $category)
@@ -67,7 +69,6 @@ class CategoryController extends Controller
$spentArray = $repository->spentPerDay($category, $start, $end);
$earnedArray = $repository->earnedPerDay($category, $start, $end);
while ($start <= $end) {
$currentEnd = Navigation::endOfPeriod($start, $range);
@@ -161,23 +162,8 @@ class CategoryController extends Controller
return Response::json($cache->get()); // @codeCoverageIgnore
}
/**
* category
* year:
* spent: x
* earned: x
* year
* spent: x
* earned: x
*/
$entries = new Collection;
// go by category, not by year.
// given a set of categories and accounts, it should not be difficult to get
// the exact array of data we need.
// then get the data for "no category".
$set = $repository->listMultiYear($categories, $accounts, $start, $end);
$set = $repository->listMultiYear($categories, $accounts, $start, $end);
/** @var Category $category */
foreach ($categories as $category) {