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

Helpers: add some more defensive coding #2269

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jun 28, 2023

The Helper classes containing stand-alone static methods can be used by both WPCS itself as well as external standards extending WPCS.

As these methods have been made stand-alone, they should probably contain a little more defensive coding in select places.

Note: this code will not be "covered" by tests at this moment as the WPCS code as-is will never hit these conditions.

At a later point in time, we may want to add dedicated tests for the Helper methods which aren't moving to PHPCSUtils. When we do, we can make sure this defensive code gets covered too.

The `Helper` classes containing stand-alone `static` methods can be used by both WPCS itself as well as external standards extending WPCS.

As these methods have been made stand-alone, they should probably contain a little more defensive coding in select places.

Note: this code will not be "covered" by tests at this moment as the WPCS code as-is will never hit these conditions.

At a later point in time, we may want to add dedicated tests for the Helper methods which aren't moving to PHPCSUtils. When we do, we can make sure this defensive code gets covered too.
@jrfnl jrfnl force-pushed the feature/helpers-add-extra-defensive-coding branch from cee7da5 to 2e0c47a Compare June 28, 2023 22:28
@dingo-d dingo-d merged commit b42708d into develop Jul 4, 2023
35 checks passed
@dingo-d dingo-d deleted the feature/helpers-add-extra-defensive-coding branch July 4, 2023 07:15
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.

3 participants