X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fnormal%2FUtfNormal.php;h=5a091afc96e162dbcb65d0af936cb6289392051b;hb=6134bd4cd7b85f48d88e663a8a630e527ee5cfb3;hp=f5b698a55d6674afdf8f8402fd9172d324f77246;hpb=c8ddc2ab37639803ff5987b57179e4967d33063d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/normal/UtfNormal.php b/includes/normal/UtfNormal.php index f5b698a55d..5a091afc96 100644 --- a/includes/normal/UtfNormal.php +++ b/includes/normal/UtfNormal.php @@ -37,7 +37,7 @@ define( 'NORMALIZE_INTL', function_exists( 'normalizer_normalize' ) ); * * Not as fast as I'd like, but should be usable for most purposes. * UtfNormal::toNFC() will bail early if given ASCII text or text - * it can quickly deterimine is already normalized. + * it can quickly determine is already normalized. * * All functions can be called static. * @@ -73,7 +73,7 @@ class UtfNormal { * Fast return for pure ASCII strings; some lesser optimizations for * strings containing only known-good characters. Not as fast as toNFC(). * - * @param $string String: a UTF-8 string + * @param string $string a UTF-8 string * @return string a clean, shiny, normalized UTF-8 string */ static function cleanUp( $string ) { @@ -114,7 +114,7 @@ class UtfNormal { * Fast return for pure ASCII strings; some lesser optimizations for * strings containing only known-good characters. * - * @param $string String: a valid UTF-8 string. Input is not validated. + * @param string $string a valid UTF-8 string. Input is not validated. * @return string a UTF-8 string in normal form C */ static function toNFC( $string ) { @@ -132,7 +132,7 @@ class UtfNormal { * Convert a UTF-8 string to normal form D, canonical decomposition. * Fast return for pure ASCII strings. * - * @param $string String: a valid UTF-8 string. Input is not validated. + * @param string $string a valid UTF-8 string. Input is not validated. * @return string a UTF-8 string in normal form D */ static function toNFD( $string ) { @@ -151,7 +151,7 @@ class UtfNormal { * This may cause irreversible information loss, use judiciously. * Fast return for pure ASCII strings. * - * @param $string String: a valid UTF-8 string. Input is not validated. + * @param string $string a valid UTF-8 string. Input is not validated. * @return string a UTF-8 string in normal form KC */ static function toNFKC( $string ) { @@ -170,7 +170,7 @@ class UtfNormal { * This may cause irreversible information loss, use judiciously. * Fast return for pure ASCII strings. * - * @param $string String: a valid UTF-8 string. Input is not validated. + * @param string $string a valid UTF-8 string. Input is not validated. * @return string a UTF-8 string in normal form KD */ static function toNFKD( $string ) { @@ -190,14 +190,14 @@ class UtfNormal { */ static function loadData() { if( !isset( self::$utfCombiningClass ) ) { - require_once( __DIR__ . '/UtfNormalData.inc' ); + require_once __DIR__ . '/UtfNormalData.inc'; } } /** * Returns true if the string is _definitely_ in NFC. * Returns false if not or uncertain. - * @param $string String: a valid UTF-8 string. Input is not validated. + * @param string $string a valid UTF-8 string. Input is not validated. * @return bool */ static function quickIsNFC( $string ) { @@ -237,7 +237,7 @@ class UtfNormal { /** * Returns true if the string is _definitely_ in NFC. * Returns false if not or uncertain. - * @param $string String: a UTF-8 string, altered on output to be valid UTF-8 safe for XML. + * @param string $string a UTF-8 string, altered on output to be valid UTF-8 safe for XML. * @return bool */ static function quickIsNFCVerify( &$string ) { @@ -491,7 +491,7 @@ class UtfNormal { */ static function NFKD( $string ) { if( !isset( self::$utfCompatibilityDecomp ) ) { - require_once( 'UtfNormalDataK.inc' ); + require_once 'UtfNormalDataK.inc'; } return self::fastCombiningSort( self::fastDecompose( $string, self::$utfCompatibilityDecomp ) ); @@ -503,8 +503,8 @@ class UtfNormal { * (depending on which decomposition map is passed to us). * Input is assumed to be *valid* UTF-8. Invalid code will break. * @private - * @param $string String: valid UTF-8 string - * @param $map Array: hash of expanded decomposition map + * @param string $string valid UTF-8 string + * @param array $map hash of expanded decomposition map * @return string a UTF-8 string decomposed, not yet normalized (needs sorting) */ static function fastDecompose( $string, $map ) { @@ -564,7 +564,7 @@ class UtfNormal { * Sorts combining characters into canonical order. This is the * final step in creating decomposed normal forms D and KD. * @private - * @param $string String: a valid, decomposed UTF-8 string. Input is not validated. + * @param string $string a valid, decomposed UTF-8 string. Input is not validated. * @return string a UTF-8 string with combining characters sorted in canonical order */ static function fastCombiningSort( $string ) { @@ -616,7 +616,7 @@ class UtfNormal { * Produces canonically composed sequences, i.e. normal form C or KC. * * @private - * @param $string String: a valid UTF-8 string in sorted normal form D or KD. Input is not validated. + * @param string $string a valid UTF-8 string in sorted normal form D or KD. Input is not validated. * @return string a UTF-8 string with canonical precomposed characters used where possible */ static function fastCompose( $string ) { @@ -762,7 +762,7 @@ class UtfNormal { * Function to replace some characters that we don't want * but most of the native normalize functions keep. * - * @param $string String The string + * @param string $string The string * @return String String with the character codes replaced. */ private static function replaceForNativeNormalize( $string ) {