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

ForbiddenCallTimePassByReference: fix false positive for "bitwise and" preceded by global constant #562

Merged
merged 1 commit into from
Dec 24, 2017

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Dec 23, 2017

This was a known false positive and annotated as such in the unit test files.

Simplified the isCallTimePassByReferenceParam() method by using the upstream isReference() function to determine whether a bitwise and is a reference or not.
The upstream method has some issues pre PHPCS 3.1.1, but none which impact this sniff.

Fixes #39

…" preceded by global constant

This was a known false positive and annotated as such in the unit test files.

Simplified the `isCallTimePassByReferenceParam()` method by using the upstream `isReference()` function to determine whether a _bitwise and_ is a reference or not.
The upstream method has some issues pre PHPCS 3.1.1, but none which impact this sniff.

 Fixes 39
@jrfnl jrfnl added the bug label Dec 23, 2017
@jrfnl jrfnl requested a review from wimg December 23, 2017 16:37
@wimg wimg merged commit 5949f12 into master Dec 24, 2017
@wimg wimg deleted the feature/39-fix-false-positive-calltime-pass-by-ref branch December 24, 2017 12:00
@jrfnl jrfnl added this to the 8.1.0 milestone Dec 24, 2017
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