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

Use the statement stack when processing annotations #71

Open
tchule opened this issue Feb 21, 2017 · 0 comments
Open

Use the statement stack when processing annotations #71

tchule opened this issue Feb 21, 2017 · 0 comments

Comments

@tchule
Copy link
Contributor

tchule commented Feb 21, 2017

Instead of having in _processAnnotation :

if ($token == T_CLASS) {
	$this->_classSuppressWarnings[] = $suppressedCheck;
} elseif ($token == T_INTERFACE) {
	$this->_interfaceSuppressWarnings[] = $suppressedCheck;
} elseif ($token == T_FUNCTION) {
	$this->_functionSuppressWarnings[] = $suppressedCheck;
} elseif ($token == T_FILE) {
	$this->_fileSuppressWarnings[] = $suppressedCheck;
}

Store the annotation in the current stack item.

Then when analysing, check for all annontations in the stack (including parents).

@tchule tchule changed the title Use the statement stack when processing annontations Use the statement stack when processing annotations Feb 21, 2017
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