X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FStringUtils.php;h=48cde0eb19e93de51050681d8330a570eefb49b9;hb=392e68ab855beca7a5084e3423e84c6781a92961;hp=f4c98f1d54e3e943bc0b30f2e06bcb8e65b1d262;hpb=827ff83afe215c5011c2846125b7577ea30ddaae;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/StringUtils.php b/includes/StringUtils.php index f4c98f1d54..48cde0eb19 100644 --- a/includes/StringUtils.php +++ b/includes/StringUtils.php @@ -65,7 +65,7 @@ class StringUtils { | [\xf8-\xfb][\x80-\xbf]{4} | \xfc[\x84-\xbf][\x80-\xbf]{4} )+$/x', $value ); - return ($hasUtf8 > 0 ); + return ( $hasUtf8 > 0 ); } } @@ -233,7 +233,7 @@ class StringUtils { // Explode, then put the replaced separators back in $items = explode( $separator, $cleaned ); - foreach( $items as $i => $str ) { + foreach ( $items as $i => $str ) { $items[$i] = str_replace( $placeholder, $separator, $str ); } @@ -440,7 +440,7 @@ class ReplacementArray { * @param $data array */ function removeArray( $data ) { - foreach( $data as $from => $to ) { + foreach ( $data as $from => $to ) { $this->removePair( $from ); } $this->fss = false; @@ -452,16 +452,16 @@ class ReplacementArray { */ function replace( $subject ) { if ( function_exists( 'fss_prep_replace' ) ) { - wfProfileIn( __METHOD__.'-fss' ); + wfProfileIn( __METHOD__ . '-fss' ); if ( $this->fss === false ) { $this->fss = fss_prep_replace( $this->data ); } $result = fss_exec_replace( $this->fss, $subject ); - wfProfileOut( __METHOD__.'-fss' ); + wfProfileOut( __METHOD__ . '-fss' ); } else { - wfProfileIn( __METHOD__.'-strtr' ); + wfProfileIn( __METHOD__ . '-strtr' ); $result = strtr( $subject, $this->data ); - wfProfileOut( __METHOD__.'-strtr' ); + wfProfileOut( __METHOD__ . '-strtr' ); } return $result; }