Completed
Push — master ( f6356b...75d693 )
by Lars
03:03
created
src/voku/helper/data/caseFolding_full.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -217,6 +217,6 @@
 block discarded – undo
217 217
         ),
218 218
 );
219 219
 
220
-$result =& $data;
220
+$result = & $data;
221 221
 unset($data);
222 222
 return $result;
Please login to merge, or discard this patch.
src/voku/helper/Bootup.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     if (!preg_match('//u', urldecode($uri))) {
90 90
       $uri = preg_replace_callback(
91 91
           '/[\x80-\xFF]+/',
92
-          function ($m) {
92
+          function($m) {
93 93
             return urlencode($m[0]);
94 94
           },
95 95
           $uri
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
       $uri = preg_replace_callback(
99 99
           '/(?:%[89A-F][0-9A-F])+/i',
100
-          function ($m) {
100
+          function($m) {
101 101
             return urlencode(UTF8::encode('UTF-8', urldecode($m[0])));
102 102
           },
103 103
           $uri
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
         // Use ob_start() to buffer content and avoid problem of headers already sent...
108 108
         if (headers_sent() === false) {
109 109
           $severProtocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1');
110
-          header($severProtocol . ' 301 Moved Permanently');
111
-          header('Location: ' . $uri);
110
+          header($severProtocol.' 301 Moved Permanently');
111
+          header('Location: '.$uri);
112 112
           exit();
113 113
         }
114 114
       }
Please login to merge, or discard this patch.
src/voku/helper/UTF8.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2397,7 +2397,7 @@  discard block
 block discarded – undo
2397 2397
   /**
2398 2398
    * Check if the input is binary... (is look like a hack).
2399 2399
    *
2400
-   * @param mixed $input
2400
+   * @param string $input
2401 2401
    *
2402 2402
    * @return bool
2403 2403
    */
@@ -4409,7 +4409,7 @@  discard block
 block discarded – undo
4409 4409
    * @param string  $encoding  [optional] <p>Set the charset for e.g. "\mb_" function.</p>
4410 4410
    * @param boolean $cleanUtf8 [optional] <p>Clean non UTF-8 chars from the string.</p>
4411 4411
    *
4412
-   * @return int|false <p>
4412
+   * @return string <p>
4413 4413
    *                   The numeric position of the first occurrence of needle in the haystack string.<br />
4414 4414
    *                   If needle is not found it returns false.
4415 4415
    *                   </p>
@@ -4618,7 +4618,7 @@  discard block
 block discarded – undo
4618 4618
    * @link http://php.net/manual/en/function.mb-strrpos.php
4619 4619
    *
4620 4620
    * @param string     $haystack  <p>The string being checked, for the last occurrence of needle</p>
4621
-   * @param string|int $needle    <p>The string to find in haystack.<br />Or a code point as int.</p>
4621
+   * @param string $needle    <p>The string to find in haystack.<br />Or a code point as int.</p>
4622 4622
    * @param int        $offset    [optional] <p>May be specified to begin searching an arbitrary number of characters
4623 4623
    *                              into the string. Negative values will stop searching at an arbitrary point prior to
4624 4624
    *                              the end of the string.
@@ -5360,7 +5360,7 @@  discard block
 block discarded – undo
5360 5360
    * 2) when any of these: àáâãäåæçèéêëìíîï  are followed by TWO chars from group B,
5361 5361
    * 3) when any of these: ðñòó  are followed by THREE chars from group B.
5362 5362
    *
5363
-   * @param string|string[] $str <p>Any string or array.</p>
5363
+   * @param string $str <p>Any string or array.</p>
5364 5364
    *
5365 5365
    * @return string|string[] <p>The UTF-8 encoded string.</p>
5366 5366
    */
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -933,16 +933,16 @@
 block discarded – undo
933 933
       $str = chr($code_point);
934 934
     } elseif (0x800 > $code_point) {
935 935
       $str = chr(0xC0 | $code_point >> 6) .
936
-             chr(0x80 | $code_point & 0x3F);
936
+              chr(0x80 | $code_point & 0x3F);
937 937
     } elseif (0x10000 > $code_point) {
938 938
       $str = chr(0xE0 | $code_point >> 12) .
939
-             chr(0x80 | $code_point >> 6 & 0x3F) .
940
-             chr(0x80 | $code_point & 0x3F);
939
+              chr(0x80 | $code_point >> 6 & 0x3F) .
940
+              chr(0x80 | $code_point & 0x3F);
941 941
     } else {
942 942
       $str = chr(0xF0 | $code_point >> 18) .
943
-             chr(0x80 | $code_point >> 12 & 0x3F) .
944
-             chr(0x80 | $code_point >> 6 & 0x3F) .
945
-             chr(0x80 | $code_point & 0x3F);
943
+              chr(0x80 | $code_point >> 12 & 0x3F) .
944
+              chr(0x80 | $code_point >> 6 & 0x3F) .
945
+              chr(0x80 | $code_point & 0x3F);
946 946
     }
947 947
 
948 948
     if ($encoding !== 'UTF-8') {
Please login to merge, or discard this patch.
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
   public static function add_bom_to_string($str)
840 840
   {
841 841
     if (self::string_has_bom($str) === false) {
842
-      $str = self::bom() . $str;
842
+      $str = self::bom().$str;
843 843
     }
844 844
 
845 845
     return $str;
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
 
939 939
     // use static cache, if there is no support for "IntlChar"
940 940
     static $cache = array();
941
-    $cacheKey = $code_point . $encoding;
941
+    $cacheKey = $code_point.$encoding;
942 942
     if (isset($cache[$cacheKey]) === true) {
943 943
       return $cache[$cacheKey];
944 944
     }
@@ -946,16 +946,16 @@  discard block
 block discarded – undo
946 946
     if (0x80 > $code_point %= 0x200000) {
947 947
       $str = chr($code_point);
948 948
     } elseif (0x800 > $code_point) {
949
-      $str = chr(0xC0 | $code_point >> 6) .
949
+      $str = chr(0xC0 | $code_point >> 6).
950 950
              chr(0x80 | $code_point & 0x3F);
951 951
     } elseif (0x10000 > $code_point) {
952
-      $str = chr(0xE0 | $code_point >> 12) .
953
-             chr(0x80 | $code_point >> 6 & 0x3F) .
952
+      $str = chr(0xE0 | $code_point >> 12).
953
+             chr(0x80 | $code_point >> 6 & 0x3F).
954 954
              chr(0x80 | $code_point & 0x3F);
955 955
     } else {
956
-      $str = chr(0xF0 | $code_point >> 18) .
957
-             chr(0x80 | $code_point >> 12 & 0x3F) .
958
-             chr(0x80 | $code_point >> 6 & 0x3F) .
956
+      $str = chr(0xF0 | $code_point >> 18).
957
+             chr(0x80 | $code_point >> 12 & 0x3F).
958
+             chr(0x80 | $code_point >> 6 & 0x3F).
959 959
              chr(0x80 | $code_point & 0x3F);
960 960
     }
961 961
 
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
   public static function decimal_to_chr($code)
1212 1212
   {
1213 1213
     return \mb_convert_encoding(
1214
-        '&#x' . dechex($code) . ';',
1214
+        '&#x'.dechex($code).';',
1215 1215
         'UTF-8',
1216 1216
         'HTML-ENTITIES'
1217 1217
     );
@@ -1477,7 +1477,7 @@  discard block
 block discarded – undo
1477 1477
           ) {
1478 1478
             // Prevent leading combining chars
1479 1479
             // for NFC-safe concatenations.
1480
-            $var = $leading_combining . $var;
1480
+            $var = $leading_combining.$var;
1481 1481
           }
1482 1482
         }
1483 1483
         break;
@@ -1895,7 +1895,7 @@  discard block
 block discarded – undo
1895 1895
    */
1896 1896
   private static function getData($file)
1897 1897
   {
1898
-    $file = __DIR__ . '/data/' . $file . '.php';
1898
+    $file = __DIR__.'/data/'.$file.'.php';
1899 1899
     if (file_exists($file)) {
1900 1900
       /** @noinspection PhpIncludeInspection */
1901 1901
       return require $file;
@@ -1998,7 +1998,7 @@  discard block
 block discarded – undo
1998 1998
     return implode(
1999 1999
         '',
2000 2000
         array_map(
2001
-            function ($data) use ($keepAsciiChars, $encoding) {
2001
+            function($data) use ($keepAsciiChars, $encoding) {
2002 2002
               return UTF8::single_chr_html_encode($data, $keepAsciiChars, $encoding);
2003 2003
             },
2004 2004
             self::split($str)
@@ -2117,7 +2117,7 @@  discard block
 block discarded – undo
2117 2117
 
2118 2118
       $str = preg_replace_callback(
2119 2119
           "/&#\d{2,6};/",
2120
-          function ($matches) use ($encoding) {
2120
+          function($matches) use ($encoding) {
2121 2121
             $returnTmp = \mb_convert_encoding($matches[0], $encoding, 'HTML-ENTITIES');
2122 2122
 
2123 2123
             if ($returnTmp !== '"' && $returnTmp !== "'") {
@@ -2426,9 +2426,9 @@  discard block
 block discarded – undo
2426 2426
     if (ctype_digit((string)$int)) {
2427 2427
       $hex = dechex((int)$int);
2428 2428
 
2429
-      $hex = (strlen($hex) < 4 ? substr('0000' . $hex, -4) : $hex);
2429
+      $hex = (strlen($hex) < 4 ? substr('0000'.$hex, -4) : $hex);
2430 2430
 
2431
-      return $pfix . $hex;
2431
+      return $pfix.$hex;
2432 2432
     }
2433 2433
 
2434 2434
     return '';
@@ -3114,7 +3114,7 @@  discard block
 block discarded – undo
3114 3114
    */
3115 3115
   public static function lcfirst($str)
3116 3116
   {
3117
-    return self::strtolower(self::substr($str, 0, 1)) . self::substr($str, 1);
3117
+    return self::strtolower(self::substr($str, 0, 1)).self::substr($str, 1);
3118 3118
   }
3119 3119
 
3120 3120
   /**
@@ -3138,7 +3138,7 @@  discard block
 block discarded – undo
3138 3138
       return preg_replace('/^[\pZ\pC]+/u', '', $str);
3139 3139
     }
3140 3140
 
3141
-    return preg_replace('/^' . self::rxClass($chars) . '+/u', '', $str);
3141
+    return preg_replace('/^'.self::rxClass($chars).'+/u', '', $str);
3142 3142
   }
3143 3143
 
3144 3144
   /**
@@ -3635,7 +3635,7 @@  discard block
 block discarded – undo
3635 3635
     if (is_array($what)) {
3636 3636
       /** @noinspection ForeachSourceInspection */
3637 3637
       foreach ($what as $item) {
3638
-        $str = preg_replace('/(' . preg_quote($item, '/') . ')+/', $item, $str);
3638
+        $str = preg_replace('/('.preg_quote($item, '/').')+/', $item, $str);
3639 3639
       }
3640 3640
     }
3641 3641
 
@@ -3720,7 +3720,7 @@  discard block
 block discarded – undo
3720 3720
       return preg_replace('/[\pZ\pC]+$/u', '', $str);
3721 3721
     }
3722 3722
 
3723
-    return preg_replace('/' . self::rxClass($chars) . '+$/u', '', $str);
3723
+    return preg_replace('/'.self::rxClass($chars).'+$/u', '', $str);
3724 3724
   }
3725 3725
 
3726 3726
   /**
@@ -3735,7 +3735,7 @@  discard block
 block discarded – undo
3735 3735
   {
3736 3736
     static $rxClassCache = array();
3737 3737
 
3738
-    $cacheKey = $s . $class;
3738
+    $cacheKey = $s.$class;
3739 3739
 
3740 3740
     if (isset($rxClassCache[$cacheKey])) {
3741 3741
       return $rxClassCache[$cacheKey];
@@ -3747,7 +3747,7 @@  discard block
 block discarded – undo
3747 3747
     /** @noinspection SuspiciousLoopInspection */
3748 3748
     foreach (self::str_split($s) as $s) {
3749 3749
       if ('-' === $s) {
3750
-        $class[0] = '-' . $class[0];
3750
+        $class[0] = '-'.$class[0];
3751 3751
       } elseif (!isset($s[2])) {
3752 3752
         $class[0] .= preg_quote($s, '/');
3753 3753
       } elseif (1 === self::strlen($s)) {
@@ -3758,13 +3758,13 @@  discard block
 block discarded – undo
3758 3758
     }
3759 3759
 
3760 3760
     if ($class[0]) {
3761
-      $class[0] = '[' . $class[0] . ']';
3761
+      $class[0] = '['.$class[0].']';
3762 3762
     }
3763 3763
 
3764 3764
     if (1 === count($class)) {
3765 3765
       $return = $class[0];
3766 3766
     } else {
3767
-      $return = '(?:' . implode('|', $class) . ')';
3767
+      $return = '(?:'.implode('|', $class).')';
3768 3768
     }
3769 3769
 
3770 3770
     $rxClassCache[$cacheKey] = $return;
@@ -3778,7 +3778,7 @@  discard block
 block discarded – undo
3778 3778
   public static function showSupport()
3779 3779
   {
3780 3780
     foreach (self::$support as $utf8Support) {
3781
-      echo $utf8Support . "\n<br>";
3781
+      echo $utf8Support."\n<br>";
3782 3782
     }
3783 3783
   }
3784 3784
 
@@ -3812,7 +3812,7 @@  discard block
 block discarded – undo
3812 3812
       $encoding = self::normalize_encoding($encoding);
3813 3813
     }
3814 3814
 
3815
-    return '&#' . self::ord($char, $encoding) . ';';
3815
+    return '&#'.self::ord($char, $encoding).';';
3816 3816
   }
3817 3817
 
3818 3818
   /**
@@ -3864,19 +3864,19 @@  discard block
 block discarded – undo
3864 3864
           $ret[] = $str[$i];
3865 3865
         } elseif ((($str[$i] & "\xE0") === "\xC0") && isset($str[$i + 1])) {
3866 3866
           if (($str[$i + 1] & "\xC0") === "\x80") {
3867
-            $ret[] = $str[$i] . $str[$i + 1];
3867
+            $ret[] = $str[$i].$str[$i + 1];
3868 3868
 
3869 3869
             $i++;
3870 3870
           }
3871 3871
         } elseif ((($str[$i] & "\xF0") === "\xE0") && isset($str[$i + 2])) {
3872 3872
           if ((($str[$i + 1] & "\xC0") === "\x80") && (($str[$i + 2] & "\xC0") === "\x80")) {
3873
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2];
3873
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2];
3874 3874
 
3875 3875
             $i += 2;
3876 3876
           }
3877 3877
         } elseif ((($str[$i] & "\xF8") === "\xF0") && isset($str[$i + 3])) {
3878 3878
           if ((($str[$i + 1] & "\xC0") === "\x80") && (($str[$i + 2] & "\xC0") === "\x80") && (($str[$i + 3] & "\xC0") === "\x80")) {
3879
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3];
3879
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3];
3880 3880
 
3881 3881
             $i += 3;
3882 3882
           }
@@ -3888,7 +3888,7 @@  discard block
 block discarded – undo
3888 3888
       $ret = array_chunk($ret, $length);
3889 3889
 
3890 3890
       return array_map(
3891
-          function ($item) {
3891
+          function($item) {
3892 3892
             return implode('', $item);
3893 3893
           }, $ret
3894 3894
       );
@@ -4077,7 +4077,7 @@  discard block
 block discarded – undo
4077 4077
       if ('' === $s .= '') {
4078 4078
         $s = '/^(?<=.)$/';
4079 4079
       } else {
4080
-        $s = '/' . preg_quote($s, '/') . '/ui';
4080
+        $s = '/'.preg_quote($s, '/').'/ui';
4081 4081
       }
4082 4082
     }
4083 4083
 
@@ -4135,7 +4135,7 @@  discard block
 block discarded – undo
4135 4135
     }
4136 4136
 
4137 4137
     if (self::substr($str, $length - 1, 1) === ' ') {
4138
-      return self::substr($str, 0, $length - 1) . $strAddOn;
4138
+      return self::substr($str, 0, $length - 1).$strAddOn;
4139 4139
     }
4140 4140
 
4141 4141
     $str = self::substr($str, 0, $length);
@@ -4144,9 +4144,9 @@  discard block
 block discarded – undo
4144 4144
     $new_str = implode(' ', $array);
4145 4145
 
4146 4146
     if ($new_str === '') {
4147
-      $str = self::substr($str, 0, $length - 1) . $strAddOn;
4147
+      $str = self::substr($str, 0, $length - 1).$strAddOn;
4148 4148
     } else {
4149
-      $str = $new_str . $strAddOn;
4149
+      $str = $new_str.$strAddOn;
4150 4150
     }
4151 4151
 
4152 4152
     return $str;
@@ -4201,7 +4201,7 @@  discard block
 block discarded – undo
4201 4201
           $pre = '';
4202 4202
       }
4203 4203
 
4204
-      return $pre . $str . $post;
4204
+      return $pre.$str.$post;
4205 4205
     }
4206 4206
 
4207 4207
     return $str;
@@ -4331,7 +4331,7 @@  discard block
 block discarded – undo
4331 4331
     }
4332 4332
 
4333 4333
     /** @noinspection PhpInternalEntityUsedInspection */
4334
-    preg_match_all('/' . Grapheme::GRAPHEME_CLUSTER_RX . '/u', $str, $a);
4334
+    preg_match_all('/'.Grapheme::GRAPHEME_CLUSTER_RX.'/u', $str, $a);
4335 4335
     $a = $a[0];
4336 4336
 
4337 4337
     if ($len === 1) {
@@ -4506,7 +4506,7 @@  discard block
 block discarded – undo
4506 4506
   public static function strcmp($str1, $str2)
4507 4507
   {
4508 4508
     /** @noinspection PhpUndefinedClassInspection */
4509
-    return $str1 . '' === $str2 . '' ? 0 : strcmp(
4509
+    return $str1.'' === $str2.'' ? 0 : strcmp(
4510 4510
         \Normalizer::normalize($str1, \Normalizer::NFD),
4511 4511
         \Normalizer::normalize($str2, \Normalizer::NFD)
4512 4512
     );
@@ -4537,7 +4537,7 @@  discard block
 block discarded – undo
4537 4537
       return null;
4538 4538
     }
4539 4539
 
4540
-    if (preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) {
4540
+    if (preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) {
4541 4541
       /** @noinspection OffsetOperationsInspection */
4542 4542
       return self::strlen($length[1]);
4543 4543
     }
@@ -4738,7 +4738,7 @@  discard block
 block discarded – undo
4738 4738
       return \grapheme_stristr($haystack, $needle, $before_needle);
4739 4739
     }
4740 4740
 
4741
-    preg_match('/^(.*?)' . preg_quote($needle, '/') . '/usi', $haystack, $match);
4741
+    preg_match('/^(.*?)'.preg_quote($needle, '/').'/usi', $haystack, $match);
4742 4742
 
4743 4743
     if (!isset($match[1])) {
4744 4744
       return false;
@@ -4856,7 +4856,7 @@  discard block
 block discarded – undo
4856 4856
    */
4857 4857
   public static function strnatcmp($str1, $str2)
4858 4858
   {
4859
-    return $str1 . '' === $str2 . '' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
4859
+    return $str1.'' === $str2.'' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
4860 4860
   }
4861 4861
 
4862 4862
   /**
@@ -4917,7 +4917,7 @@  discard block
 block discarded – undo
4917 4917
       return false;
4918 4918
     }
4919 4919
 
4920
-    if (preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) {
4920
+    if (preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) {
4921 4921
       return substr($haystack, strpos($haystack, $m[0]));
4922 4922
     } else {
4923 4923
       return false;
@@ -5299,7 +5299,7 @@  discard block
 block discarded – undo
5299 5299
       return 0;
5300 5300
     }
5301 5301
 
5302
-    return preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0;
5302
+    return preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0;
5303 5303
   }
5304 5304
 
5305 5305
   /**
@@ -5352,7 +5352,7 @@  discard block
 block discarded – undo
5352 5352
       return \grapheme_strstr($haystack, $needle, $before_needle);
5353 5353
     }
5354 5354
 
5355
-    preg_match('/^(.*?)' . preg_quote($needle, '/') . '/us', $haystack, $match);
5355
+    preg_match('/^(.*?)'.preg_quote($needle, '/').'/us', $haystack, $match);
5356 5356
 
5357 5357
     if (!isset($match[1])) {
5358 5358
       return false;
@@ -5721,7 +5721,7 @@  discard block
 block discarded – undo
5721 5721
       return \mb_substr_count($haystack, $needle, $encoding);
5722 5722
     }
5723 5723
 
5724
-    preg_match_all('/' . preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER);
5724
+    preg_match_all('/'.preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER);
5725 5725
 
5726 5726
     return count($matches);
5727 5727
   }
@@ -5943,7 +5943,7 @@  discard block
 block discarded – undo
5943 5943
 
5944 5944
     $strSwappedCase = preg_replace_callback(
5945 5945
         '/[\S]/u',
5946
-        function ($match) use ($encoding) {
5946
+        function($match) use ($encoding) {
5947 5947
           $marchToUpper = UTF8::strtoupper($match[0], $encoding);
5948 5948
 
5949 5949
           if ($match[0] === $marchToUpper) {
@@ -6125,7 +6125,7 @@  discard block
 block discarded – undo
6125 6125
 
6126 6126
       $bank = $ord >> 8;
6127 6127
       if (!array_key_exists($bank, (array)$UTF8_TO_ASCII)) {
6128
-        $bankfile = __DIR__ . '/data/' . sprintf('x%02x', $bank) . '.php';
6128
+        $bankfile = __DIR__.'/data/'.sprintf('x%02x', $bank).'.php';
6129 6129
         if (file_exists($bankfile)) {
6130 6130
           /** @noinspection PhpIncludeInspection */
6131 6131
           require $bankfile;
@@ -6246,40 +6246,40 @@  discard block
 block discarded – undo
6246 6246
         if ($c1 >= "\xc0" & $c1 <= "\xdf") { // looks like 2 bytes UTF8
6247 6247
 
6248 6248
           if ($c2 >= "\x80" && $c2 <= "\xbf") { // yeah, almost sure it's UTF8 already
6249
-            $buf .= $c1 . $c2;
6249
+            $buf .= $c1.$c2;
6250 6250
             $i++;
6251 6251
           } else { // not valid UTF8 - convert it
6252 6252
             $cc1 = (chr(ord($c1) / 64) | "\xc0");
6253 6253
             $cc2 = ($c1 & "\x3f") | "\x80";
6254
-            $buf .= $cc1 . $cc2;
6254
+            $buf .= $cc1.$cc2;
6255 6255
           }
6256 6256
 
6257 6257
         } elseif ($c1 >= "\xe0" & $c1 <= "\xef") { // looks like 3 bytes UTF8
6258 6258
 
6259 6259
           if ($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf") { // yeah, almost sure it's UTF8 already
6260
-            $buf .= $c1 . $c2 . $c3;
6260
+            $buf .= $c1.$c2.$c3;
6261 6261
             $i += 2;
6262 6262
           } else { // not valid UTF8 - convert it
6263 6263
             $cc1 = (chr(ord($c1) / 64) | "\xc0");
6264 6264
             $cc2 = ($c1 & "\x3f") | "\x80";
6265
-            $buf .= $cc1 . $cc2;
6265
+            $buf .= $cc1.$cc2;
6266 6266
           }
6267 6267
 
6268 6268
         } elseif ($c1 >= "\xf0" & $c1 <= "\xf7") { // looks like 4 bytes UTF8
6269 6269
 
6270 6270
           if ($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf" && $c4 >= "\x80" && $c4 <= "\xbf") { // yeah, almost sure it's UTF8 already
6271
-            $buf .= $c1 . $c2 . $c3 . $c4;
6271
+            $buf .= $c1.$c2.$c3.$c4;
6272 6272
             $i += 3;
6273 6273
           } else { // not valid UTF8 - convert it
6274 6274
             $cc1 = (chr(ord($c1) / 64) | "\xc0");
6275 6275
             $cc2 = ($c1 & "\x3f") | "\x80";
6276
-            $buf .= $cc1 . $cc2;
6276
+            $buf .= $cc1.$cc2;
6277 6277
           }
6278 6278
 
6279 6279
         } else { // doesn't look like UTF8, but should be converted
6280 6280
           $cc1 = (chr(ord($c1) / 64) | "\xc0");
6281 6281
           $cc2 = (($c1 & "\x3f") | "\x80");
6282
-          $buf .= $cc1 . $cc2;
6282
+          $buf .= $cc1.$cc2;
6283 6283
         }
6284 6284
 
6285 6285
       } elseif (($c1 & "\xc0") === "\x80") { // needs conversion
@@ -6290,7 +6290,7 @@  discard block
 block discarded – undo
6290 6290
         } else {
6291 6291
           $cc1 = (chr($ordC1 / 64) | "\xc0");
6292 6292
           $cc2 = (($c1 & "\x3f") | "\x80");
6293
-          $buf .= $cc1 . $cc2;
6293
+          $buf .= $cc1.$cc2;
6294 6294
         }
6295 6295
 
6296 6296
       } else { // it doesn't need conversion
@@ -6301,7 +6301,7 @@  discard block
 block discarded – undo
6301 6301
     // decode unicode escape sequences
6302 6302
     $buf = preg_replace_callback(
6303 6303
         '/\\\\u([0-9a-f]{4})/i',
6304
-        function ($match) {
6304
+        function($match) {
6305 6305
           return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');
6306 6306
         },
6307 6307
         $buf
@@ -6310,7 +6310,7 @@  discard block
 block discarded – undo
6310 6310
     // decode UTF-8 codepoints
6311 6311
     $buf = preg_replace_callback(
6312 6312
         '/&#\d{2,6};/',
6313
-        function ($match) {
6313
+        function($match) {
6314 6314
           return \mb_convert_encoding($match[0], 'UTF-8', 'HTML-ENTITIES');
6315 6315
         },
6316 6316
         $buf
@@ -6359,7 +6359,7 @@  discard block
 block discarded – undo
6359 6359
    */
6360 6360
   public static function ucfirst($str, $encoding = 'UTF-8', $cleanUtf8 = false)
6361 6361
   {
6362
-    return self::strtoupper(self::substr($str, 0, 1, $encoding, $cleanUtf8), $encoding, $cleanUtf8) . self::substr($str, 1, null, $encoding, $cleanUtf8);
6362
+    return self::strtoupper(self::substr($str, 0, 1, $encoding, $cleanUtf8), $encoding, $cleanUtf8).self::substr($str, 1, null, $encoding, $cleanUtf8);
6363 6363
   }
6364 6364
 
6365 6365
   /**
@@ -6837,7 +6837,7 @@  discard block
 block discarded – undo
6837 6837
       return '';
6838 6838
     }
6839 6839
 
6840
-    preg_match('/^\s*+(?:\S++\s*+){1,' . $words . '}/u', $str, $matches);
6840
+    preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $str, $matches);
6841 6841
 
6842 6842
     if (
6843 6843
         !isset($matches[0])
@@ -6847,7 +6847,7 @@  discard block
 block discarded – undo
6847 6847
       return $str;
6848 6848
     }
6849 6849
 
6850
-    return self::rtrim($matches[0]) . $strAddOn;
6850
+    return self::rtrim($matches[0]).$strAddOn;
6851 6851
   }
6852 6852
 
6853 6853
   /**
@@ -6915,7 +6915,7 @@  discard block
 block discarded – undo
6915 6915
       $strReturn .= $break;
6916 6916
     }
6917 6917
 
6918
-    return $strReturn . implode('', $chars);
6918
+    return $strReturn.implode('', $chars);
6919 6919
   }
6920 6920
 
6921 6921
   /**
Please login to merge, or discard this patch.