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

Local variables should not have the same name as class fields #28

Closed
mahmoodahmad100 opened this issue Oct 24, 2022 · 0 comments
Closed
Labels
enhancement New feature or request

Comments

@mahmoodahmad100
Copy link
Member

  • we need to update the $json variable to be something like $current_json in src/Core/Module/UnitTest.stub (testItShouldGetListingOfTheResource() method)

  • the same thing as above, $model should be something like $current_model in src/Core/Base/ApiController.stub (update() and destroy() methods)

reference:
https://wiki.sei.cmu.edu/confluence/display/c/DCL01-C.+Do+not+reuse+variable+names+in+subscopes
https://wiki.sei.cmu.edu/confluence/display/java/DCL51-J.+Do+not+shadow+or+obscure+identifiers+in+subscopes

source of issues mentioned was:
SonarQube

@mahmoodahmad100 mahmoodahmad100 added the enhancement New feature or request label Oct 26, 2022
mahmoodahmad100 added a commit that referenced this issue Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant