Skip to content

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

Merged
wimg merged 1 commit intomasterfrom
feature/39-fix-false-positive-calltime-pass-by-ref
Dec 24, 2017
Merged

ForbiddenCallTimePassByReference: fix false positive for "bitwise and" preceded by global constant#562
wimg merged 1 commit intomasterfrom
feature/39-fix-false-positive-calltime-pass-by-ref

Conversation

@jrfnl
Copy link
Copy Markdown
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 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants