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

Hooks/PreGetPosts: add support for hook-ins using short arrays #564

Merged
merged 1 commit into from
Jul 29, 2020

Conversation

jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Jul 28, 2020

As VIPCS is currently using WPCS 2.x, we can use the WPCS Sniff::find_array_open_close() method to get the opener/closer for an array independently of the type of array (long/short).

Once VIPCS implements PHPCSUtils, this method call should be swopped out for the PHPCSUtils Arrays::getOpenClose() method.

Addresses #358 for the PreGetPosts sniff.

Includes unit tests.

@jrfnl jrfnl added this to the 2.2.0 milestone Jul 28, 2020
@jrfnl jrfnl requested a review from a team as a code owner July 28, 2020 01:04
GaryJones
GaryJones previously approved these changes Jul 29, 2020
@GaryJones
Copy link
Contributor

This one now has a merge conflict.

@jrfnl
Copy link
Collaborator Author

jrfnl commented Jul 29, 2020

Yup, I expected that one. Rebased & force pushed.

As VIPCS is currently using WPCS 2.x, we can use the WPCS `Sniff::find_array_open_close()` method to get the opener/closer for an array independently of the type of array (long/short).

Once VIPCS implements PHPCSUtils, this method call should be swopped out for the PHPCSUtils `Arrays::getOpenClose()` method.

Addresses #358 for the `PreGetPosts` sniff.

Includes unit tests.
@GaryJones GaryJones merged commit 8ff3fa9 into develop Jul 29, 2020
@GaryJones GaryJones deleted the fix/358-pregetpost-support-short-arrays branch July 29, 2020 01:17
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