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

Move sanitization functions related functionality to dedicated SanitizingFunctionsTrait #2259

Merged
merged 3 commits into from
Jun 23, 2023

Commits on Jun 20, 2023

  1. Move sanitization functions related functionality to dedicated `Sanit…

    …izationFunctionsTrait`
    
    The sanitization function lists are only used by a small set of sniffs, so are better placed in a dedicated trait.
    
    The choice for a `trait` over a `class` is due to the `public` properties allowing for adding additional functions to the lists.
    
    Moving both the base function lists + the `public` properties to the same trait will allow us to encapsulate all the functionality related to the use of these lists in one place.
    
    The `$sanitizingFunctions` and the `$unslashingSanitizingFunctions` property, containing the base lists, have also been made `private`.
    
    Checking whether or not something is a sanitization function should now be done by calling the `SanitizationFunctionsTrait::is_sanitization_function()` or the `SanitizationFunctionsTrait::is_sanitization_and_unslashing_function()` method.
    
    Related to 1465
    jrfnl committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    dc0a7fe View commit details
    Browse the repository at this point in the history
  2. Fix up spelling

    jrfnl committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    ee21c3d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d9272f2 View commit details
    Browse the repository at this point in the history