Skip to content

Add filters always return sniff#177

Merged
sboisvert merged 6 commits intomasterfrom
add-filters-always-return-sniff
Aug 9, 2018
Merged

Add filters always return sniff#177
sboisvert merged 6 commits intomasterfrom
add-filters-always-return-sniff

Conversation

@david-binda
Copy link
Contributor

No description provided.

The sniff is supposed to flag cases when a callback to a filter hook is not returning any value.
… naming, and taking conditional closures into account (similarly to classes inside conditionals)
use PHP_CodeSniffer_Tokens as Tokens;

/**
* This sniff validates a propper usage of pre_get_posts action callback
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This summary and description is incorrect.

@tomjn tomjn requested review from gudmdharalds and sboisvert August 9, 2018 02:54
@tomjn tomjn self-assigned this Aug 9, 2018
Copy link
Contributor

@sboisvert sboisvert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@sboisvert sboisvert merged commit 917c5a4 into master Aug 9, 2018
@tomjn tomjn deleted the add-filters-always-return-sniff branch November 5, 2018 21:13
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.

4 participants