CoreFiles by mySites.guru
NormalizeStep.php23 lines, 506 bytes, from Joomla_5.1.0-alpha4-Alpha-Full_Package.zip
Raw History Compare with 5.1.0-alpha3
md5
4a620de124d6483f20e8155b1c2a1025
sha1
9763bc8fac6b2ee5ef46832e451082354f5128e6
sha256
9ef648bf7a6af2e5d23fbda3e22bba287bf09c43ac47f19e983e0a83b20d02e8
<?php

declare(strict_types=1);

namespace SpomkyLabs\Pki\X501\StringPrep;

use Normalizer;

/**
 * Implements 'Normalize' step of the Internationalized String Preparation as specified by RFC 4518.
 *
 * @see https://tools.ietf.org/html/rfc4518#section-2.3
 */
final class NormalizeStep implements PrepareStep
{
    /**
     * @param string $string UTF-8 encoded string
     */
    public function apply(string $string): string
    {
        return normalizer_normalize($string, Normalizer::NFKC);
    }
}

The same content is in 158 releases, Joomla 5.0.0-alpha1 to 6.3.0-alpha1. See them all, or every version of this file.