It checks if PHP_INT_MAX or PHP_INT_MIN are added used for add_filter or add_action.
Please check if the PR fulfills these requirements
[X] The commit message follows our guidelines
[X] Tests for the changes have been added (for bug fixes/features)
[X] Docs have been added/updated (for bug fixes/features)
What kind of change does this PR introduce?
Feature
What is the current behavior?
No warnings are raised for PHP_INT_MAX or PHP_INT_MIN.
What is the new behavior (if this is a feature change)?
It raises a warning if:
PHP_INT_MAX is used for add_filter.
PHP_INT_MIN is used for add_action or add_filter.
Does this PR introduce a breaking change?
No
Other information:
The code is not very robust I think, but I spent a a good amount of time on it and this is the only working solution I was able to produce, feel free to discard it totally if there is a better way.
Anyway, there are many things I am still not sure:
The Sniff name.
The error code (The code itself and if they should be the same or not in both case).
It checks if
PHP_INT_MAX
orPHP_INT_MIN
are added used foradd_filter
oradd_action
.Please check if the PR fulfills these requirements
What kind of change does this PR introduce? Feature
What is the current behavior? No warnings are raised for
PHP_INT_MAX
orPHP_INT_MIN
.What is the new behavior (if this is a feature change)? It raises a warning if:
PHP_INT_MAX
is used foradd_filter
.PHP_INT_MIN
is used foradd_action
oradd_filter
.Does this PR introduce a breaking change? No
Other information: The code is not very robust I think, but I spent a a good amount of time on it and this is the only working solution I was able to produce, feel free to discard it totally if there is a better way.
Anyway, there are many things I am still not sure: