You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a PHPStan rule to detect the use of apply_filters and prompt developers to use wpm_apply_filters_typed() instead.
Justification: Code Quality: Encourages the use of typed filters, improving type safety and reducing potential errors. Consistency: Promotes a consistent approach to applying filters across the codebase.
This rule will help ensure that all filters in the WP Rocket codebase are applied using the more robust and type-safe wpm_apply_filters_typed() function
The text was updated successfully, but these errors were encountered:
Add a PHPStan rule to detect the use of
apply_filters
and prompt developers to usewpm_apply_filters_typed()
instead.Justification:
Code Quality: Encourages the use of typed filters, improving type safety and reducing potential errors.
Consistency: Promotes a consistent approach to applying filters across the codebase.
Example:
The following will prompt an error:
In favor of:
This rule will help ensure that all filters in the WP Rocket codebase are applied using the more robust and type-safe
wpm_apply_filters_typed()
functionThe text was updated successfully, but these errors were encountered: