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

False positive on deprecated functions after class definition - Fixes #464 #465

Merged
merged 1 commit into from
Jun 14, 2017

Conversation

wimg
Copy link
Member

@wimg wimg commented Jun 13, 2017

No description provided.

@wimg wimg requested a review from jrfnl June 13, 2017 22:55
@wimg wimg added this to the 7.1.5 milestone Jun 13, 2017
Copy link
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. weird that line 141 was already in the dataFalsePositives() array...
Also looks like line 136 is missing from the false positives array while it should be in there.
And that global PHP functions called like: \deprecatedFunction() would result in a false negative.

But... those are different issues, not directly related to this PR.

@jrfnl jrfnl merged commit 5d42644 into master Jun 14, 2017
@jrfnl jrfnl deleted the bugfix-fp-deprecatedfunction-class branch June 14, 2017 00:18
@jrfnl
Copy link
Member

jrfnl commented Jun 14, 2017

Oh... and the same fix should probably also be applied to the NewFunctions sniff ?

@wimg
Copy link
Member Author

wimg commented Jun 14, 2017

Not really sure how it's related to the NewFunctions sniff ?

@jrfnl
Copy link
Member

jrfnl commented Jun 14, 2017

Not really sure how it's related to the NewFunctions sniff ?

That sniff would also give a false positive if a class is named the same as a new function as T_CLASS is also not taken into account when determining whether a T_STRING is a function call or not.

@jrfnl jrfnl mentioned this pull request Jun 27, 2017
7 tasks
@jrfnl jrfnl added the bug label Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants