inpsyde / php-coding-standards

Style guide for writing consistent PHP for WordPress projects.
MIT License
98 stars 23 forks source link

Create the HookPriorityLimit Sniff #75

Closed antonioeatgoat closed 10 months ago

antonioeatgoat commented 11 months ago

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

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:

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: