Debian Codegraph @

lib/3rdParty/composer/spomky-labs/pki-framework/src/X501/StringPrep/NormalizeStep.php

raw symbols SCIP
1 <?php
2
3 declare(strict_types=1);
4
5 namespace SpomkyLabs\Pki\X501\StringPrep;
6
7 use Normalizer;
8
9 /**
10 * Implements 'Normalize' step of the Internationalized String Preparation as specified by RFC 4518.
11 *
12 * @see https://tools.ietf.org/html/rfc4518#section-2.3
13 */
14 final class NormalizeStep implements PrepareStep
15 {
16 /**
17 * @param string $string UTF-8 encoded string
18 */
19 public function apply(string $string): string
20 {
21 return normalizer_normalize($string, Normalizer::NFKC);
22 }
23 }