<?php

// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound -- APD is the established namespace shared with the Pro add-on and retained for backward compatibility.
namespace APD\Support;

defined('ABSPATH') || exit;

class Sanitizer
{
    public static function deep(mixed $value) : mixed
    {
        if (is_array($value)) {
            return array_map([self::class, 'deep'], $value);
        }

        if (is_string($value)) {
            return sanitize_text_field($value);
        }

        return $value;
    }
}
