Completed
Push — master ( fc3bc1...47a19f )
by kill
07:04
created
core/helpers/Chaos.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,10 +117,14 @@
 block discarded – undo
117 117
 	function setPinyin($str) {
118 118
 		$py = mt_rand(0, iconv_strlen( $str, 'UTF-8' )-1);
119 119
 		$t_str = iconv_substr( $str, $py, 1, 'UTF-8');
120
-		if(mt_rand(0,10) > 5) $pinyin = " ";
120
+		if(mt_rand(0,10) > 5) {
121
+		    $pinyin = " ";
122
+		}
121 123
 		$pinyin = $this->_pinyin->convert($t_str,PINYIN_UNICODE);
122 124
         $pinyin=implode(" ",$pinyin);
123
-		if(mt_rand(0,10) > 5) $pinyin .= " ";
125
+		if(mt_rand(0,10) > 5) {
126
+		    $pinyin .= " ";
127
+		}
124 128
 		if($t_str != "%"){
125 129
 			$str = preg_replace("'$t_str'", $pinyin, $str, 1);
126 130
 		}
Please login to merge, or discard this patch.