Make wfForeignMemcKey consistent with wfMemcKey
[lhc/web/wiklou.git] / includes / StringUtils.php
index f4c98f1..48cde0e 100644 (file)
@@ -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;
        }