Cleanup controllers and small bug fixes.

This commit is contained in:
James Cole
2014-09-09 20:00:04 +02:00
parent 309177ca9c
commit f9dc627d84
15 changed files with 143 additions and 98 deletions

View File

@@ -7,6 +7,8 @@ use Firefly\Storage\Component\ComponentRepositoryInterface as CRI;
/**
* Class JsonController
*
* @SuppressWarnings(PHPMD.CamelCasePropertyName)
*/
class JsonController extends BaseController
{
@@ -24,9 +26,9 @@ class JsonController extends BaseController
public function __construct(ARI $accounts, CRI $components, Cat $categories, Bud $budgets)
{
$this->_components = $components;
$this->_accounts = $accounts;
$this->_accounts = $accounts;
$this->_categories = $categories;
$this->_budgets = $budgets;
$this->_budgets = $budgets;
}
/**
@@ -34,7 +36,7 @@ class JsonController extends BaseController
*/
public function beneficiaries()
{
$list = $this->_accounts->getBeneficiaries();
$list = $this->_accounts->getBeneficiaries();
$return = [];
foreach ($list as $entry) {
$return[] = $entry->name;
@@ -49,7 +51,7 @@ class JsonController extends BaseController
*/
public function categories()
{
$list = $this->_categories->get();
$list = $this->_categories->get();
$return = [];
foreach ($list as $entry) {
$return[] = $entry->name;