Skip to content

Hooks/AlwaysReturnInFilter: add support for hook-ins using short arrays#563

Merged
GaryJones merged 1 commit intodevelopfrom
fix/358-alwaysreturninfilter-support-short-arrays
Jul 29, 2020
Merged

Hooks/AlwaysReturnInFilter: add support for hook-ins using short arrays#563
GaryJones merged 1 commit intodevelopfrom
fix/358-alwaysreturninfilter-support-short-arrays

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 AlwaysReturnInFilter sniff.

Includes unit tests.

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 `AlwaysReturnInFilter` 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:03
@GaryJones GaryJones merged commit b0c949f into develop Jul 29, 2020
@GaryJones GaryJones deleted the fix/358-alwaysreturninfilter-support-short-arrays branch July 29, 2020 00:25
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