Completed
Push — master ( 7733a3...6963af )
by Lars
05:10
created
src/voku/helper/data/ord.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -259,6 +259,6 @@
 block discarded – undo
259 259
     "\xFF" => 255,
260 260
 );
261 261
 
262
-$result =& $data;
262
+$result = & $data;
263 263
 unset($data);
264 264
 return $result;
Please login to merge, or discard this patch.
src/voku/helper/data/chr.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -259,6 +259,6 @@
 block discarded – undo
259 259
     255 => "\xFF",
260 260
 );
261 261
 
262
-$result =& $data;
262
+$result = & $data;
263 263
 unset($data);
264 264
 return $result;
Please login to merge, or discard this patch.
src/voku/helper/UTF8.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1020,16 +1020,16 @@
 block discarded – undo
1020 1020
       $str = self::$CHR[$code_point];
1021 1021
     } elseif ($code_point <= 0x7FF) {
1022 1022
       $str = self::$CHR[($code_point >> 6) + 0xC0] .
1023
-             self::$CHR[($code_point & 0x3F) + 0x80];
1023
+              self::$CHR[($code_point & 0x3F) + 0x80];
1024 1024
     } elseif ($code_point <= 0xFFFF) {
1025 1025
       $str = self::$CHR[($code_point >> 12) + 0xE0] .
1026
-             self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] .
1027
-             self::$CHR[($code_point & 0x3F) + 0x80];
1026
+              self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] .
1027
+              self::$CHR[($code_point & 0x3F) + 0x80];
1028 1028
     } else {
1029 1029
       $str = self::$CHR[($code_point >> 18) + 0xF0] .
1030
-             self::$CHR[(($code_point >> 12) & 0x3F) + 0x80] .
1031
-             self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] .
1032
-             self::$CHR[($code_point & 0x3F) + 0x80];
1030
+              self::$CHR[(($code_point >> 12) & 0x3F) + 0x80] .
1031
+              self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] .
1032
+              self::$CHR[($code_point & 0x3F) + 0x80];
1033 1033
     }
1034 1034
 
1035 1035
     if ($encoding !== 'UTF-8') {
Please login to merge, or discard this patch.
Spacing   +77 added lines, -79 removed lines patch added patch discarded remove patch
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
   public static function add_bom_to_string($str)
866 866
   {
867 867
     if (self::string_has_bom($str) === false) {
868
-      $str = self::bom() . $str;
868
+      $str = self::bom().$str;
869 869
     }
870 870
 
871 871
     return $str;
@@ -986,10 +986,10 @@  discard block
 block discarded – undo
986 986
         &&
987 987
         self::$SUPPORT['mbstring'] === false
988 988
     ) {
989
-      trigger_error('UTF8::chr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
989
+      trigger_error('UTF8::chr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
990 990
     }
991 991
 
992
-    $cacheKey = $code_point . $encoding;
992
+    $cacheKey = $code_point.$encoding;
993 993
     if (isset($CHAR_CACHE[$cacheKey]) === true) {
994 994
       return $CHAR_CACHE[$cacheKey];
995 995
     }
@@ -1019,16 +1019,16 @@  discard block
 block discarded – undo
1019 1019
     if ($code_point <= 0x7F) {
1020 1020
       $str = self::$CHR[$code_point];
1021 1021
     } elseif ($code_point <= 0x7FF) {
1022
-      $str = self::$CHR[($code_point >> 6) + 0xC0] .
1022
+      $str = self::$CHR[($code_point >> 6) + 0xC0].
1023 1023
              self::$CHR[($code_point & 0x3F) + 0x80];
1024 1024
     } elseif ($code_point <= 0xFFFF) {
1025
-      $str = self::$CHR[($code_point >> 12) + 0xE0] .
1026
-             self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] .
1025
+      $str = self::$CHR[($code_point >> 12) + 0xE0].
1026
+             self::$CHR[(($code_point >> 6) & 0x3F) + 0x80].
1027 1027
              self::$CHR[($code_point & 0x3F) + 0x80];
1028 1028
     } else {
1029
-      $str = self::$CHR[($code_point >> 18) + 0xF0] .
1030
-             self::$CHR[(($code_point >> 12) & 0x3F) + 0x80] .
1031
-             self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] .
1029
+      $str = self::$CHR[($code_point >> 18) + 0xF0].
1030
+             self::$CHR[(($code_point >> 12) & 0x3F) + 0x80].
1031
+             self::$CHR[(($code_point >> 6) & 0x3F) + 0x80].
1032 1032
              self::$CHR[($code_point & 0x3F) + 0x80];
1033 1033
     }
1034 1034
 
@@ -1078,7 +1078,7 @@  discard block
 block discarded – undo
1078 1078
     }
1079 1079
 
1080 1080
     return array_map(
1081
-        function ($data) {
1081
+        function($data) {
1082 1082
           return UTF8::strlen($data, '8BIT');
1083 1083
         },
1084 1084
         self::split($str)
@@ -1320,7 +1320,7 @@  discard block
 block discarded – undo
1320 1320
       $flags = ENT_QUOTES;
1321 1321
     }
1322 1322
 
1323
-    return self::html_entity_decode('&#' . $int . ';', $flags);
1323
+    return self::html_entity_decode('&#'.$int.';', $flags);
1324 1324
   }
1325 1325
 
1326 1326
   /**
@@ -1398,7 +1398,7 @@  discard block
 block discarded – undo
1398 1398
           &&
1399 1399
           self::$SUPPORT['mbstring'] === false
1400 1400
       ) {
1401
-        trigger_error('UTF8::encode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
1401
+        trigger_error('UTF8::encode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
1402 1402
       }
1403 1403
 
1404 1404
       $strEncoded = \mb_convert_encoding(
@@ -1607,7 +1607,7 @@  discard block
 block discarded – undo
1607 1607
           ) {
1608 1608
             // Prevent leading combining chars
1609 1609
             // for NFC-safe concatenations.
1610
-            $var = $leading_combining . $var;
1610
+            $var = $leading_combining.$var;
1611 1611
           }
1612 1612
         }
1613 1613
 
@@ -2031,7 +2031,7 @@  discard block
 block discarded – undo
2031 2031
    */
2032 2032
   private static function getData($file)
2033 2033
   {
2034
-    $file = __DIR__ . '/data/' . $file . '.php';
2034
+    $file = __DIR__.'/data/'.$file.'.php';
2035 2035
     if (file_exists($file)) {
2036 2036
       /** @noinspection PhpIncludeInspection */
2037 2037
       return require $file;
@@ -2176,7 +2176,7 @@  discard block
 block discarded – undo
2176 2176
     return implode(
2177 2177
         '',
2178 2178
         array_map(
2179
-            function ($data) use ($keepAsciiChars, $encoding) {
2179
+            function($data) use ($keepAsciiChars, $encoding) {
2180 2180
               return UTF8::single_chr_html_encode($data, $keepAsciiChars, $encoding);
2181 2181
             },
2182 2182
             self::split($str)
@@ -2297,7 +2297,7 @@  discard block
 block discarded – undo
2297 2297
         &&
2298 2298
         self::$SUPPORT['mbstring'] === false
2299 2299
     ) {
2300
-      trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
2300
+      trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
2301 2301
     }
2302 2302
 
2303 2303
     do {
@@ -2305,7 +2305,7 @@  discard block
 block discarded – undo
2305 2305
 
2306 2306
       $str = preg_replace_callback(
2307 2307
           "/&#\d{2,6};/",
2308
-          function ($matches) use ($encoding) {
2308
+          function($matches) use ($encoding) {
2309 2309
             $returnTmp = \mb_convert_encoding($matches[0], $encoding, 'HTML-ENTITIES');
2310 2310
 
2311 2311
             if ($returnTmp !== '"' && $returnTmp !== "'") {
@@ -2639,9 +2639,9 @@  discard block
 block discarded – undo
2639 2639
     if ((int)$int === $int) {
2640 2640
       $hex = dechex($int);
2641 2641
 
2642
-      $hex = (strlen($hex) < 4 ? substr('0000' . $hex, -4) : $hex);
2642
+      $hex = (strlen($hex) < 4 ? substr('0000'.$hex, -4) : $hex);
2643 2643
 
2644
-      return $pfix . $hex;
2644
+      return $pfix.$hex;
2645 2645
     }
2646 2646
 
2647 2647
     return '';
@@ -3386,7 +3386,7 @@  discard block
 block discarded – undo
3386 3386
         $cleanUtf8
3387 3387
     );
3388 3388
 
3389
-    return $strPartOne . $strPartTwo;
3389
+    return $strPartOne.$strPartTwo;
3390 3390
   }
3391 3391
 
3392 3392
   /**
@@ -3476,7 +3476,7 @@  discard block
 block discarded – undo
3476 3476
       return preg_replace('/^[\pZ\pC]+/u', '', $str);
3477 3477
     }
3478 3478
 
3479
-    return preg_replace('/^' . self::rxClass($chars) . '+/u', '', $str);
3479
+    return preg_replace('/^'.self::rxClass($chars).'+/u', '', $str);
3480 3480
   }
3481 3481
 
3482 3482
   /**
@@ -3845,7 +3845,7 @@  discard block
 block discarded – undo
3845 3845
       }
3846 3846
     }
3847 3847
 
3848
-    $cacheKey = $chr_orig . $encoding;
3848
+    $cacheKey = $chr_orig.$encoding;
3849 3849
     if (isset($CHAR_CACHE[$cacheKey]) === true) {
3850 3850
       return $CHAR_CACHE[$cacheKey];
3851 3851
     }
@@ -4079,7 +4079,7 @@  discard block
 block discarded – undo
4079 4079
     if (is_array($what) === true) {
4080 4080
       /** @noinspection ForeachSourceInspection */
4081 4081
       foreach ($what as $item) {
4082
-        $str = preg_replace('/(' . preg_quote($item, '/') . ')+/', $item, $str);
4082
+        $str = preg_replace('/('.preg_quote($item, '/').')+/', $item, $str);
4083 4083
       }
4084 4084
     }
4085 4085
 
@@ -4187,7 +4187,7 @@  discard block
 block discarded – undo
4187 4187
       return preg_replace('/[\pZ\pC]+$/u', '', $str);
4188 4188
     }
4189 4189
 
4190
-    return preg_replace('/' . self::rxClass($chars) . '+$/u', '', $str);
4190
+    return preg_replace('/'.self::rxClass($chars).'+$/u', '', $str);
4191 4191
   }
4192 4192
 
4193 4193
   /**
@@ -4202,7 +4202,7 @@  discard block
 block discarded – undo
4202 4202
   {
4203 4203
     static $RX_CLASSS_CACHE = array();
4204 4204
 
4205
-    $cacheKey = $s . $class;
4205
+    $cacheKey = $s.$class;
4206 4206
 
4207 4207
     if (isset($RX_CLASSS_CACHE[$cacheKey])) {
4208 4208
       return $RX_CLASSS_CACHE[$cacheKey];
@@ -4214,7 +4214,7 @@  discard block
 block discarded – undo
4214 4214
     /** @noinspection SuspiciousLoopInspection */
4215 4215
     foreach (self::str_split($s) as $s) {
4216 4216
       if ('-' === $s) {
4217
-        $class[0] = '-' . $class[0];
4217
+        $class[0] = '-'.$class[0];
4218 4218
       } elseif (!isset($s[2])) {
4219 4219
         $class[0] .= preg_quote($s, '/');
4220 4220
       } elseif (1 === self::strlen($s)) {
@@ -4225,13 +4225,13 @@  discard block
 block discarded – undo
4225 4225
     }
4226 4226
 
4227 4227
     if ($class[0]) {
4228
-      $class[0] = '[' . $class[0] . ']';
4228
+      $class[0] = '['.$class[0].']';
4229 4229
     }
4230 4230
 
4231 4231
     if (1 === count($class)) {
4232 4232
       $return = $class[0];
4233 4233
     } else {
4234
-      $return = '(?:' . implode('|', $class) . ')';
4234
+      $return = '(?:'.implode('|', $class).')';
4235 4235
     }
4236 4236
 
4237 4237
     $RX_CLASSS_CACHE[$cacheKey] = $return;
@@ -4250,7 +4250,7 @@  discard block
 block discarded – undo
4250 4250
 
4251 4251
     echo '<pre>';
4252 4252
     foreach (self::$SUPPORT as $key => $value) {
4253
-      echo $key . ' - ' . print_r($value, true) . "\n<br>";
4253
+      echo $key.' - '.print_r($value, true)."\n<br>";
4254 4254
     }
4255 4255
     echo '</pre>';
4256 4256
   }
@@ -4284,7 +4284,7 @@  discard block
 block discarded – undo
4284 4284
       $encoding = self::normalize_encoding($encoding, 'UTF-8');
4285 4285
     }
4286 4286
 
4287
-    return '&#' . self::ord($char, $encoding) . ';';
4287
+    return '&#'.self::ord($char, $encoding).';';
4288 4288
   }
4289 4289
 
4290 4290
   /**
@@ -4351,7 +4351,7 @@  discard block
 block discarded – undo
4351 4351
         ) {
4352 4352
 
4353 4353
           if (($str[$i + 1] & "\xC0") === "\x80") {
4354
-            $ret[] = $str[$i] . $str[$i + 1];
4354
+            $ret[] = $str[$i].$str[$i + 1];
4355 4355
 
4356 4356
             $i++;
4357 4357
           }
@@ -4367,7 +4367,7 @@  discard block
 block discarded – undo
4367 4367
               &&
4368 4368
               ($str[$i + 2] & "\xC0") === "\x80"
4369 4369
           ) {
4370
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2];
4370
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2];
4371 4371
 
4372 4372
             $i += 2;
4373 4373
           }
@@ -4385,7 +4385,7 @@  discard block
 block discarded – undo
4385 4385
               &&
4386 4386
               ($str[$i + 3] & "\xC0") === "\x80"
4387 4387
           ) {
4388
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3];
4388
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3];
4389 4389
 
4390 4390
             $i += 3;
4391 4391
           }
@@ -4398,7 +4398,7 @@  discard block
 block discarded – undo
4398 4398
       $ret = array_chunk($ret, $length);
4399 4399
 
4400 4400
       return array_map(
4401
-          function ($item) {
4401
+          function($item) {
4402 4402
             return implode('', $item);
4403 4403
           }, $ret
4404 4404
       );
@@ -4504,7 +4504,7 @@  discard block
 block discarded – undo
4504 4504
     foreach (self::$ICONV_ENCODING as $encodingTmp) {
4505 4505
       # INFO: //IGNORE and //TRANSLIT still throw notice
4506 4506
       /** @noinspection PhpUsageOfSilenceOperatorInspection */
4507
-      if (md5(@\iconv($encodingTmp, $encodingTmp . '//IGNORE', $str)) === $md5) {
4507
+      if (md5(@\iconv($encodingTmp, $encodingTmp.'//IGNORE', $str)) === $md5) {
4508 4508
         return $encodingTmp;
4509 4509
       }
4510 4510
     }
@@ -4594,7 +4594,7 @@  discard block
 block discarded – undo
4594 4594
       if ('' === $s .= '') {
4595 4595
         $s = '/^(?<=.)$/';
4596 4596
       } else {
4597
-        $s = '/' . preg_quote($s, '/') . '/ui';
4597
+        $s = '/'.preg_quote($s, '/').'/ui';
4598 4598
       }
4599 4599
     }
4600 4600
 
@@ -4652,7 +4652,7 @@  discard block
 block discarded – undo
4652 4652
     }
4653 4653
 
4654 4654
     if (self::substr($str, $length - 1, 1) === ' ') {
4655
-      return (string)self::substr($str, 0, $length - 1) . $strAddOn;
4655
+      return (string)self::substr($str, 0, $length - 1).$strAddOn;
4656 4656
     }
4657 4657
 
4658 4658
     $str = (string)self::substr($str, 0, $length);
@@ -4661,9 +4661,9 @@  discard block
 block discarded – undo
4661 4661
     $new_str = implode(' ', $array);
4662 4662
 
4663 4663
     if ($new_str === '') {
4664
-      $str = (string)self::substr($str, 0, $length - 1) . $strAddOn;
4664
+      $str = (string)self::substr($str, 0, $length - 1).$strAddOn;
4665 4665
     } else {
4666
-      $str = $new_str . $strAddOn;
4666
+      $str = $new_str.$strAddOn;
4667 4667
     }
4668 4668
 
4669 4669
     return $str;
@@ -4718,7 +4718,7 @@  discard block
 block discarded – undo
4718 4718
           $pre = '';
4719 4719
       }
4720 4720
 
4721
-      return $pre . $str . $post;
4721
+      return $pre.$str.$post;
4722 4722
     }
4723 4723
 
4724 4724
     return $str;
@@ -4868,7 +4868,7 @@  discard block
 block discarded – undo
4868 4868
     }
4869 4869
 
4870 4870
     /** @noinspection PhpInternalEntityUsedInspection */
4871
-    preg_match_all('/' . self::GRAPHEME_CLUSTER_RX . '/u', $str, $a);
4871
+    preg_match_all('/'.self::GRAPHEME_CLUSTER_RX.'/u', $str, $a);
4872 4872
     $a = $a[0];
4873 4873
 
4874 4874
     if ($len === 1) {
@@ -5104,7 +5104,7 @@  discard block
 block discarded – undo
5104 5104
   public static function strcmp($str1, $str2)
5105 5105
   {
5106 5106
     /** @noinspection PhpUndefinedClassInspection */
5107
-    return $str1 . '' === $str2 . '' ? 0 : strcmp(
5107
+    return $str1.'' === $str2.'' ? 0 : strcmp(
5108 5108
         \Normalizer::normalize($str1, \Normalizer::NFD),
5109 5109
         \Normalizer::normalize($str2, \Normalizer::NFD)
5110 5110
     );
@@ -5139,7 +5139,7 @@  discard block
 block discarded – undo
5139 5139
       return null;
5140 5140
     }
5141 5141
 
5142
-    if (preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) {
5142
+    if (preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) {
5143 5143
       /** @noinspection OffsetOperationsInspection */
5144 5144
       return self::strlen($length[1]);
5145 5145
     }
@@ -5350,7 +5350,7 @@  discard block
 block discarded – undo
5350 5350
         &&
5351 5351
         self::$SUPPORT['mbstring'] === false
5352 5352
     ) {
5353
-      trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5353
+      trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5354 5354
     }
5355 5355
 
5356 5356
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5371,7 +5371,7 @@  discard block
 block discarded – undo
5371 5371
       return stristr($haystack, $needle, $before_needle);
5372 5372
     }
5373 5373
 
5374
-    preg_match('/^(.*?)' . preg_quote($needle, '/') . '/usi', $haystack, $match);
5374
+    preg_match('/^(.*?)'.preg_quote($needle, '/').'/usi', $haystack, $match);
5375 5375
 
5376 5376
     if (!isset($match[1])) {
5377 5377
       return false;
@@ -5446,7 +5446,7 @@  discard block
 block discarded – undo
5446 5446
         &&
5447 5447
         self::$SUPPORT['iconv'] === false
5448 5448
     ) {
5449
-      trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5449
+      trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5450 5450
     }
5451 5451
 
5452 5452
     if (
@@ -5525,7 +5525,7 @@  discard block
 block discarded – undo
5525 5525
    */
5526 5526
   public static function strnatcmp($str1, $str2)
5527 5527
   {
5528
-    return $str1 . '' === $str2 . '' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
5528
+    return $str1.'' === $str2.'' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
5529 5529
   }
5530 5530
 
5531 5531
   /**
@@ -5586,7 +5586,7 @@  discard block
 block discarded – undo
5586 5586
       return false;
5587 5587
     }
5588 5588
 
5589
-    if (preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) {
5589
+    if (preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) {
5590 5590
       return substr($haystack, strpos($haystack, $m[0]));
5591 5591
     }
5592 5592
 
@@ -5663,7 +5663,7 @@  discard block
 block discarded – undo
5663 5663
         &&
5664 5664
         self::$SUPPORT['mbstring'] === false
5665 5665
     ) {
5666
-      trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5666
+      trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5667 5667
     }
5668 5668
 
5669 5669
     if (
@@ -5895,7 +5895,7 @@  discard block
 block discarded – undo
5895 5895
         &&
5896 5896
         self::$SUPPORT['mbstring'] === false
5897 5897
     ) {
5898
-      trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5898
+      trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5899 5899
     }
5900 5900
 
5901 5901
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5978,7 +5978,7 @@  discard block
 block discarded – undo
5978 5978
         &&
5979 5979
         self::$SUPPORT['mbstring'] === false
5980 5980
     ) {
5981
-      trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5981
+      trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5982 5982
     }
5983 5983
 
5984 5984
     if (self::$SUPPORT['mbstring'] === true) {
@@ -6046,7 +6046,7 @@  discard block
 block discarded – undo
6046 6046
       return 0;
6047 6047
     }
6048 6048
 
6049
-    return preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0;
6049
+    return preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0;
6050 6050
   }
6051 6051
 
6052 6052
   /**
@@ -6092,7 +6092,7 @@  discard block
 block discarded – undo
6092 6092
         &&
6093 6093
         self::$SUPPORT['mbstring'] === false
6094 6094
     ) {
6095
-      trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
6095
+      trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
6096 6096
     }
6097 6097
 
6098 6098
     if (self::$SUPPORT['mbstring'] === true) {
@@ -6109,7 +6109,7 @@  discard block
 block discarded – undo
6109 6109
       return \grapheme_strstr($haystack, $needle, $before_needle);
6110 6110
     }
6111 6111
 
6112
-    preg_match('/^(.*?)' . preg_quote($needle, '/') . '/us', $haystack, $match);
6112
+    preg_match('/^(.*?)'.preg_quote($needle, '/').'/us', $haystack, $match);
6113 6113
 
6114 6114
     if (!isset($match[1])) {
6115 6115
       return false;
@@ -6215,9 +6215,9 @@  discard block
 block discarded – undo
6215 6215
           Bootup::is_php('5.4') === true
6216 6216
       ) {
6217 6217
 
6218
-        $langCode = $lang . '-Lower';
6218
+        $langCode = $lang.'-Lower';
6219 6219
         if (!in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) {
6220
-          trigger_error('UTF8::strtolower() without intl for special language: ' . $lang, E_USER_WARNING);
6220
+          trigger_error('UTF8::strtolower() without intl for special language: '.$lang, E_USER_WARNING);
6221 6221
 
6222 6222
           $langCode = 'Any-Lower';
6223 6223
         }
@@ -6225,7 +6225,7 @@  discard block
 block discarded – undo
6225 6225
         return transliterator_transliterate($langCode, $str);
6226 6226
       }
6227 6227
 
6228
-      trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING);
6228
+      trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING);
6229 6229
     }
6230 6230
 
6231 6231
     return \mb_strtolower($str, $encoding);
@@ -6285,9 +6285,9 @@  discard block
 block discarded – undo
6285 6285
           Bootup::is_php('5.4') === true
6286 6286
       ) {
6287 6287
 
6288
-        $langCode = $lang . '-Upper';
6288
+        $langCode = $lang.'-Upper';
6289 6289
         if (!in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) {
6290
-          trigger_error('UTF8::strtoupper() without intl for special language: ' . $lang, E_USER_WARNING);
6290
+          trigger_error('UTF8::strtoupper() without intl for special language: '.$lang, E_USER_WARNING);
6291 6291
 
6292 6292
           $langCode = 'Any-Upper';
6293 6293
         }
@@ -6295,7 +6295,7 @@  discard block
 block discarded – undo
6295 6295
         return transliterator_transliterate($langCode, $str);
6296 6296
       }
6297 6297
 
6298
-      trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING);
6298
+      trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING);
6299 6299
     }
6300 6300
 
6301 6301
     return \mb_strtoupper($str, $encoding);
@@ -6400,7 +6400,7 @@  discard block
 block discarded – undo
6400 6400
 
6401 6401
     $return = array();
6402 6402
     foreach ($array as $key => $value) {
6403
-      if ($case  === CASE_LOWER) {
6403
+      if ($case === CASE_LOWER) {
6404 6404
         $key = self::strtolower($key);
6405 6405
       } else {
6406 6406
         $key = self::strtoupper($key);
@@ -6495,7 +6495,7 @@  discard block
 block discarded – undo
6495 6495
         &&
6496 6496
         self::$SUPPORT['mbstring'] === false
6497 6497
     ) {
6498
-      trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
6498
+      trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
6499 6499
     }
6500 6500
 
6501 6501
     if (self::$SUPPORT['mbstring'] === true) {
@@ -6522,8 +6522,7 @@  discard block
 block discarded – undo
6522 6522
 
6523 6523
     if (self::is_ascii($str)) {
6524 6524
       return ($length === null) ?
6525
-          substr($str, $offset) :
6526
-          substr($str, $offset, $length);
6525
+          substr($str, $offset) : substr($str, $offset, $length);
6527 6526
     }
6528 6527
 
6529 6528
     // fallback via vanilla php
@@ -6658,14 +6657,14 @@  discard block
 block discarded – undo
6658 6657
         &&
6659 6658
         self::$SUPPORT['mbstring'] === false
6660 6659
     ) {
6661
-      trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
6660
+      trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
6662 6661
     }
6663 6662
 
6664 6663
     if (self::$SUPPORT['mbstring'] === true) {
6665 6664
       return \mb_substr_count($haystack, $needle, $encoding);
6666 6665
     }
6667 6666
 
6668
-    preg_match_all('/' . preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER);
6667
+    preg_match_all('/'.preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER);
6669 6668
 
6670 6669
     return count($matches);
6671 6670
   }
@@ -6855,8 +6854,7 @@  discard block
 block discarded – undo
6855 6854
 
6856 6855
     if (self::is_ascii($str)) {
6857 6856
       return ($length === null) ?
6858
-          substr_replace($str, $replacement, $offset) :
6859
-          substr_replace($str, $replacement, $offset, $length);
6857
+          substr_replace($str, $replacement, $offset) : substr_replace($str, $replacement, $offset, $length);
6860 6858
     }
6861 6859
 
6862 6860
     preg_match_all('/./us', $str, $smatches);
@@ -6932,7 +6930,7 @@  discard block
 block discarded – undo
6932 6930
 
6933 6931
     $strSwappedCase = preg_replace_callback(
6934 6932
         '/[\S]/u',
6935
-        function ($match) use ($encoding) {
6933
+        function($match) use ($encoding) {
6936 6934
           $marchToUpper = UTF8::strtoupper($match[0], $encoding);
6937 6935
 
6938 6936
           if ($match[0] === $marchToUpper) {
@@ -7279,7 +7277,7 @@  discard block
 block discarded – undo
7279 7277
           $c2 = $i + 1 >= $max ? "\x00" : $str[$i + 1];
7280 7278
 
7281 7279
           if ($c2 >= "\x80" && $c2 <= "\xBF") { // yeah, almost sure it's UTF8 already
7282
-            $buf .= $c1 . $c2;
7280
+            $buf .= $c1.$c2;
7283 7281
             $i++;
7284 7282
           } else { // not valid UTF8 - convert it
7285 7283
             $buf .= self::to_utf8_convert($c1);
@@ -7291,7 +7289,7 @@  discard block
 block discarded – undo
7291 7289
           $c3 = $i + 2 >= $max ? "\x00" : $str[$i + 2];
7292 7290
 
7293 7291
           if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF") { // yeah, almost sure it's UTF8 already
7294
-            $buf .= $c1 . $c2 . $c3;
7292
+            $buf .= $c1.$c2.$c3;
7295 7293
             $i += 2;
7296 7294
           } else { // not valid UTF8 - convert it
7297 7295
             $buf .= self::to_utf8_convert($c1);
@@ -7304,7 +7302,7 @@  discard block
 block discarded – undo
7304 7302
           $c4 = $i + 3 >= $max ? "\x00" : $str[$i + 3];
7305 7303
 
7306 7304
           if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF" && $c4 >= "\x80" && $c4 <= "\xBF") { // yeah, almost sure it's UTF8 already
7307
-            $buf .= $c1 . $c2 . $c3 . $c4;
7305
+            $buf .= $c1.$c2.$c3.$c4;
7308 7306
             $i += 3;
7309 7307
           } else { // not valid UTF8 - convert it
7310 7308
             $buf .= self::to_utf8_convert($c1);
@@ -7326,7 +7324,7 @@  discard block
 block discarded – undo
7326 7324
     // decode unicode escape sequences
7327 7325
     $buf = preg_replace_callback(
7328 7326
         '/\\\\u([0-9a-f]{4})/i',
7329
-        function ($match) {
7327
+        function($match) {
7330 7328
           return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');
7331 7329
         },
7332 7330
         $buf
@@ -7364,7 +7362,7 @@  discard block
 block discarded – undo
7364 7362
     } else {
7365 7363
       $cc1 = self::$CHR[$ordC1 / 64] | "\xC0";
7366 7364
       $cc2 = ($int & "\x3F") | "\x80";
7367
-      $buf .= $cc1 . $cc2;
7365
+      $buf .= $cc1.$cc2;
7368 7366
     }
7369 7367
 
7370 7368
     return $buf;
@@ -7427,7 +7425,7 @@  discard block
 block discarded – undo
7427 7425
         $cleanUtf8
7428 7426
     );
7429 7427
 
7430
-    return $strPartOne . $strPartTwo;
7428
+    return $strPartOne.$strPartTwo;
7431 7429
   }
7432 7430
 
7433 7431
   /**
@@ -7472,7 +7470,7 @@  discard block
 block discarded – undo
7472 7470
       $str = self::clean($str);
7473 7471
     }
7474 7472
 
7475
-    $usePhpDefaultFunctions = !(bool)($charlist . implode('', $exceptions));
7473
+    $usePhpDefaultFunctions = !(bool)($charlist.implode('', $exceptions));
7476 7474
 
7477 7475
     if (
7478 7476
         $usePhpDefaultFunctions === true
@@ -7984,7 +7982,7 @@  discard block
 block discarded – undo
7984 7982
       return '';
7985 7983
     }
7986 7984
 
7987
-    preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $str, $matches);
7985
+    preg_match('/^\s*+(?:\S++\s*+){1,'.$limit.'}/u', $str, $matches);
7988 7986
 
7989 7987
     if (
7990 7988
         !isset($matches[0])
@@ -7994,7 +7992,7 @@  discard block
 block discarded – undo
7994 7992
       return $str;
7995 7993
     }
7996 7994
 
7997
-    return self::rtrim($matches[0]) . $strAddOn;
7995
+    return self::rtrim($matches[0]).$strAddOn;
7998 7996
   }
7999 7997
 
8000 7998
   /**
@@ -8062,7 +8060,7 @@  discard block
 block discarded – undo
8062 8060
       $strReturn .= $break;
8063 8061
     }
8064 8062
 
8065
-    return $strReturn . implode('', $chars);
8063
+    return $strReturn.implode('', $chars);
8066 8064
   }
8067 8065
 
8068 8066
   /**
Please login to merge, or discard this patch.