Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In api controller, don't define $json variable in models #730

Closed
pascalchevrel opened this issue Apr 13, 2016 · 0 comments
Closed

In api controller, don't define $json variable in models #730

pascalchevrel opened this issue Apr 13, 2016 · 0 comments
Assignees

Comments

@pascalchevrel
Copy link
Member

instead of doing that:
Controller:

include MODELS . 'api/repository_locales.php';
...
include VIEWS . 'json.php';

Model:

return $json = foo();

Which includes a $json variable that we use in the view.

Let's do that:
Controller:

$json = include MODELS . 'api/repository_locales.php';
...
include VIEWS . 'json.php';

Model:

return foo();

That will bring more clarity as to where this $json value is defined as it will be defined in a single file.

@pascalchevrel pascalchevrel self-assigned this Apr 13, 2016
pascalchevrel added a commit that referenced this issue Apr 18, 2016
fix #730: small refactoring of  variable use in api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant