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

Add plugin for redefining loop variable within inner loop #3045

Closed
TysonAndre opened this issue Aug 5, 2019 · 0 comments · Fixed by #3290
Closed

Add plugin for redefining loop variable within inner loop #3045

TysonAndre opened this issue Aug 5, 2019 · 0 comments · Fixed by #3290
Labels
enhancement This improves the quality of Phan's analysis of a codebase

Comments

@TysonAndre
Copy link
Member

Warn about any assignments to the loop variable that aren't based on the old value, e.g.

for ($i = 0; $i < 10; $i++) {
    // various code or scopes....
    foreach ($array as $i => $value) {
    }
}
@TysonAndre TysonAndre added the enhancement This improves the quality of Phan's analysis of a codebase label Aug 5, 2019
TysonAndre added a commit to TysonAndre/phan that referenced this issue Sep 18, 2019
TysonAndre added a commit to TysonAndre/phan that referenced this issue Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This improves the quality of Phan's analysis of a codebase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant