Completed
Push — master ( 55e593...d86413 )
by Lars
19:50 queued 05:23
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
@@ -932,20 +932,20 @@
 block discarded – undo
932 932
 
933 933
     if ($code_point <= 0x7ff) {
934 934
       return $cache[$code_point] = chr(0xc0 | ($code_point >> 6)) .
935
-                                   chr(0x80 | ($code_point & 0x3f));
935
+                                    chr(0x80 | ($code_point & 0x3f));
936 936
     }
937 937
 
938 938
     if ($code_point <= 0xffff) {
939 939
       return $cache[$code_point] = chr(0xe0 | ($code_point >> 12)) .
940
-                                   chr(0x80 | (($code_point >> 6) & 0x3f)) .
941
-                                   chr(0x80 | ($code_point & 0x3f));
940
+                                    chr(0x80 | (($code_point >> 6) & 0x3f)) .
941
+                                    chr(0x80 | ($code_point & 0x3f));
942 942
     }
943 943
 
944 944
     if ($code_point <= 0x10ffff) {
945 945
       return $cache[$code_point] = chr(0xf0 | ($code_point >> 18)) .
946
-                                   chr(0x80 | (($code_point >> 12) & 0x3f)) .
947
-                                   chr(0x80 | (($code_point >> 6) & 0x3f)) .
948
-                                   chr(0x80 | ($code_point & 0x3f));
946
+                                    chr(0x80 | (($code_point >> 12) & 0x3f)) .
947
+                                    chr(0x80 | (($code_point >> 6) & 0x3f)) .
948
+                                    chr(0x80 | ($code_point & 0x3f));
949 949
     }
950 950
 
951 951
     # U+FFFD REPLACEMENT CHARACTER
Please login to merge, or discard this patch.
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -834,7 +834,7 @@  discard block
 block discarded – undo
834 834
   public static function add_bom_to_string($str)
835 835
   {
836 836
     if (self::string_has_bom($str) === false) {
837
-      $str = self::bom() . $str;
837
+      $str = self::bom().$str;
838 838
     }
839 839
 
840 840
     return $str;
@@ -931,20 +931,20 @@  discard block
 block discarded – undo
931 931
     }
932 932
 
933 933
     if ($code_point <= 0x7ff) {
934
-      return $cache[$code_point] = chr(0xc0 | ($code_point >> 6)) .
934
+      return $cache[$code_point] = chr(0xc0 | ($code_point >> 6)).
935 935
                                    chr(0x80 | ($code_point & 0x3f));
936 936
     }
937 937
 
938 938
     if ($code_point <= 0xffff) {
939
-      return $cache[$code_point] = chr(0xe0 | ($code_point >> 12)) .
940
-                                   chr(0x80 | (($code_point >> 6) & 0x3f)) .
939
+      return $cache[$code_point] = chr(0xe0 | ($code_point >> 12)).
940
+                                   chr(0x80 | (($code_point >> 6) & 0x3f)).
941 941
                                    chr(0x80 | ($code_point & 0x3f));
942 942
     }
943 943
 
944 944
     if ($code_point <= 0x10ffff) {
945
-      return $cache[$code_point] = chr(0xf0 | ($code_point >> 18)) .
946
-                                   chr(0x80 | (($code_point >> 12) & 0x3f)) .
947
-                                   chr(0x80 | (($code_point >> 6) & 0x3f)) .
945
+      return $cache[$code_point] = chr(0xf0 | ($code_point >> 18)).
946
+                                   chr(0x80 | (($code_point >> 12) & 0x3f)).
947
+                                   chr(0x80 | (($code_point >> 6) & 0x3f)).
948 948
                                    chr(0x80 | ($code_point & 0x3f));
949 949
     }
950 950
 
@@ -1194,7 +1194,7 @@  discard block
 block discarded – undo
1194 1194
   public static function decimal_to_chr($code)
1195 1195
   {
1196 1196
     return \mb_convert_encoding(
1197
-        '&#x' . dechex($code) . ';',
1197
+        '&#x'.dechex($code).';',
1198 1198
         'UTF-8',
1199 1199
         'HTML-ENTITIES'
1200 1200
     );
@@ -1458,7 +1458,7 @@  discard block
 block discarded – undo
1458 1458
           ) {
1459 1459
             // Prevent leading combining chars
1460 1460
             // for NFC-safe concatenations.
1461
-            $var = $leading_combining . $var;
1461
+            $var = $leading_combining.$var;
1462 1462
           }
1463 1463
         }
1464 1464
         break;
@@ -1751,7 +1751,7 @@  discard block
 block discarded – undo
1751 1751
    */
1752 1752
   private static function getData($file)
1753 1753
   {
1754
-    $file = __DIR__ . '/data/' . $file . '.php';
1754
+    $file = __DIR__.'/data/'.$file.'.php';
1755 1755
     if (file_exists($file)) {
1756 1756
       /** @noinspection PhpIncludeInspection */
1757 1757
       return require $file;
@@ -1828,7 +1828,7 @@  discard block
 block discarded – undo
1828 1828
 
1829 1829
     return implode(
1830 1830
         array_map(
1831
-            function ($data) use ($keepAsciiChars) {
1831
+            function($data) use ($keepAsciiChars) {
1832 1832
               return UTF8::single_chr_html_encode($data, $keepAsciiChars);
1833 1833
             },
1834 1834
             self::split($str)
@@ -1942,7 +1942,7 @@  discard block
 block discarded – undo
1942 1942
 
1943 1943
       $str = preg_replace_callback(
1944 1944
           "/&#\d{2,5};/",
1945
-          function ($matches) {
1945
+          function($matches) {
1946 1946
             $returnTmp = \mb_convert_encoding($matches[0], 'UTF-8', 'HTML-ENTITIES');
1947 1947
 
1948 1948
             if ($returnTmp !== '"' && $returnTmp !== "'") {
@@ -2241,9 +2241,9 @@  discard block
 block discarded – undo
2241 2241
     if (ctype_digit((string)$int)) {
2242 2242
       $hex = dechex((int)$int);
2243 2243
 
2244
-      $hex = (strlen($hex) < 4 ? substr('0000' . $hex, -4) : $hex);
2244
+      $hex = (strlen($hex) < 4 ? substr('0000'.$hex, -4) : $hex);
2245 2245
 
2246
-      return $pfix . $hex;
2246
+      return $pfix.$hex;
2247 2247
     }
2248 2248
 
2249 2249
     return '';
@@ -2923,7 +2923,7 @@  discard block
 block discarded – undo
2923 2923
    */
2924 2924
   public static function lcfirst($str)
2925 2925
   {
2926
-    return self::strtolower(self::substr($str, 0, 1)) . self::substr($str, 1);
2926
+    return self::strtolower(self::substr($str, 0, 1)).self::substr($str, 1);
2927 2927
   }
2928 2928
 
2929 2929
   /**
@@ -3373,7 +3373,7 @@  discard block
 block discarded – undo
3373 3373
 
3374 3374
     if (is_array($what)) {
3375 3375
       foreach ($what as $item) {
3376
-        $str = preg_replace('/(' . preg_quote($item, '/') . ')+/', $item, $str);
3376
+        $str = preg_replace('/('.preg_quote($item, '/').')+/', $item, $str);
3377 3377
       }
3378 3378
     }
3379 3379
 
@@ -3475,7 +3475,7 @@  discard block
 block discarded – undo
3475 3475
   {
3476 3476
     static $rxClassCache = array();
3477 3477
 
3478
-    $cacheKey = $s . $class;
3478
+    $cacheKey = $s.$class;
3479 3479
 
3480 3480
     if (isset($rxClassCache[$cacheKey])) {
3481 3481
       return $rxClassCache[$cacheKey];
@@ -3486,7 +3486,7 @@  discard block
 block discarded – undo
3486 3486
     /** @noinspection SuspiciousLoopInspection */
3487 3487
     foreach (self::str_split($s) as $s) {
3488 3488
       if ('-' === $s) {
3489
-        $class[0] = '-' . $class[0];
3489
+        $class[0] = '-'.$class[0];
3490 3490
       } elseif (!isset($s[2])) {
3491 3491
         $class[0] .= preg_quote($s, '/');
3492 3492
       } elseif (1 === self::strlen($s)) {
@@ -3497,13 +3497,13 @@  discard block
 block discarded – undo
3497 3497
     }
3498 3498
 
3499 3499
     if ($class[0]) {
3500
-      $class[0] = '[' . $class[0] . ']';
3500
+      $class[0] = '['.$class[0].']';
3501 3501
     }
3502 3502
 
3503 3503
     if (1 === count($class)) {
3504 3504
       $return = $class[0];
3505 3505
     } else {
3506
-      $return = '(?:' . implode('|', $class) . ')';
3506
+      $return = '(?:'.implode('|', $class).')';
3507 3507
     }
3508 3508
 
3509 3509
     $rxClassCache[$cacheKey] = $return;
@@ -3517,7 +3517,7 @@  discard block
 block discarded – undo
3517 3517
   public static function showSupport()
3518 3518
   {
3519 3519
     foreach (self::$support as $utf8Support) {
3520
-      echo $utf8Support . "\n<br>";
3520
+      echo $utf8Support."\n<br>";
3521 3521
     }
3522 3522
   }
3523 3523
 
@@ -3543,7 +3543,7 @@  discard block
 block discarded – undo
3543 3543
       return $char;
3544 3544
     }
3545 3545
 
3546
-    return '&#' . self::ord($char) . ';';
3546
+    return '&#'.self::ord($char).';';
3547 3547
   }
3548 3548
 
3549 3549
   /**
@@ -3595,19 +3595,19 @@  discard block
 block discarded – undo
3595 3595
           $ret[] = $str[$i];
3596 3596
         } elseif ((($str[$i] & "\xE0") === "\xC0") && isset($str[$i + 1])) {
3597 3597
           if (($str[$i + 1] & "\xC0") === "\x80") {
3598
-            $ret[] = $str[$i] . $str[$i + 1];
3598
+            $ret[] = $str[$i].$str[$i + 1];
3599 3599
 
3600 3600
             $i++;
3601 3601
           }
3602 3602
         } elseif ((($str[$i] & "\xF0") === "\xE0") && isset($str[$i + 2])) {
3603 3603
           if ((($str[$i + 1] & "\xC0") === "\x80") && (($str[$i + 2] & "\xC0") === "\x80")) {
3604
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2];
3604
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2];
3605 3605
 
3606 3606
             $i += 2;
3607 3607
           }
3608 3608
         } elseif ((($str[$i] & "\xF8") === "\xF0") && isset($str[$i + 3])) {
3609 3609
           if ((($str[$i + 1] & "\xC0") === "\x80") && (($str[$i + 2] & "\xC0") === "\x80") && (($str[$i + 3] & "\xC0") === "\x80")) {
3610
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3];
3610
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3];
3611 3611
 
3612 3612
             $i += 3;
3613 3613
           }
@@ -3756,7 +3756,7 @@  discard block
 block discarded – undo
3756 3756
       if ('' === $s .= '') {
3757 3757
         $s = '/^(?<=.)$/';
3758 3758
       } else {
3759
-        $s = '/' . preg_quote($s, '/') . '/ui';
3759
+        $s = '/'.preg_quote($s, '/').'/ui';
3760 3760
       }
3761 3761
     }
3762 3762
 
@@ -3790,7 +3790,7 @@  discard block
 block discarded – undo
3790 3790
     }
3791 3791
 
3792 3792
     if (self::substr($str, $length - 1, 1) === ' ') {
3793
-      return self::substr($str, 0, $length - 1) . $strAddOn;
3793
+      return self::substr($str, 0, $length - 1).$strAddOn;
3794 3794
     }
3795 3795
 
3796 3796
     $str = self::substr($str, 0, $length);
@@ -3799,9 +3799,9 @@  discard block
 block discarded – undo
3799 3799
     $new_str = implode(' ', $array);
3800 3800
 
3801 3801
     if ($new_str === '') {
3802
-      $str = self::substr($str, 0, $length - 1) . $strAddOn;
3802
+      $str = self::substr($str, 0, $length - 1).$strAddOn;
3803 3803
     } else {
3804
-      $str = $new_str . $strAddOn;
3804
+      $str = $new_str.$strAddOn;
3805 3805
     }
3806 3806
 
3807 3807
     return $str;
@@ -3856,7 +3856,7 @@  discard block
 block discarded – undo
3856 3856
           $pre = '';
3857 3857
       }
3858 3858
 
3859
-      return $pre . $str . $post;
3859
+      return $pre.$str.$post;
3860 3860
     }
3861 3861
 
3862 3862
     return $str;
@@ -3980,7 +3980,7 @@  discard block
 block discarded – undo
3980 3980
       return str_split($str, $len);
3981 3981
     }
3982 3982
 
3983
-    preg_match_all('/' . Grapheme::GRAPHEME_CLUSTER_RX . '/u', $str, $a);
3983
+    preg_match_all('/'.Grapheme::GRAPHEME_CLUSTER_RX.'/u', $str, $a);
3984 3984
     $a = $a[0];
3985 3985
 
3986 3986
     if ($len === 1) {
@@ -4113,7 +4113,7 @@  discard block
 block discarded – undo
4113 4113
    */
4114 4114
   public static function strcmp($str1, $str2)
4115 4115
   {
4116
-    return $str1 . '' === $str2 . '' ? 0 : strcmp(
4116
+    return $str1.'' === $str2.'' ? 0 : strcmp(
4117 4117
         \Normalizer::normalize($str1, \Normalizer::NFD),
4118 4118
         \Normalizer::normalize($str2, \Normalizer::NFD)
4119 4119
     );
@@ -4141,7 +4141,7 @@  discard block
 block discarded – undo
4141 4141
       $str = (string)$str;
4142 4142
     }
4143 4143
 
4144
-    if (preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) {
4144
+    if (preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) {
4145 4145
       /** @noinspection OffsetOperationsInspection */
4146 4146
       return self::strlen($length[1]);
4147 4147
     } else {
@@ -4383,7 +4383,7 @@  discard block
 block discarded – undo
4383 4383
    */
4384 4384
   public static function strnatcmp($str1, $str2)
4385 4385
   {
4386
-    return $str1 . '' === $str2 . '' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
4386
+    return $str1.'' === $str2.'' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
4387 4387
   }
4388 4388
 
4389 4389
   /**
@@ -4444,7 +4444,7 @@  discard block
 block discarded – undo
4444 4444
       return false;
4445 4445
     }
4446 4446
 
4447
-    if (preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) {
4447
+    if (preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) {
4448 4448
       return substr($haystack, strpos($haystack, $m[0]));
4449 4449
     } else {
4450 4450
       return false;
@@ -4749,7 +4749,7 @@  discard block
 block discarded – undo
4749 4749
       $str = self::substr($str, $offset, $length);
4750 4750
     }
4751 4751
 
4752
-    return preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0;
4752
+    return preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0;
4753 4753
   }
4754 4754
 
4755 4755
   /**
@@ -5186,7 +5186,7 @@  discard block
 block discarded – undo
5186 5186
 
5187 5187
     $strSwappedCase = preg_replace_callback(
5188 5188
         '/[\S]/u',
5189
-        function ($match) use ($encoding) {
5189
+        function($match) use ($encoding) {
5190 5190
           $marchToUpper = UTF8::strtoupper($match[0], $encoding);
5191 5191
 
5192 5192
           if ($match[0] === $marchToUpper) {
@@ -5354,7 +5354,7 @@  discard block
 block discarded – undo
5354 5354
 
5355 5355
       $bank = $ord >> 8;
5356 5356
       if (!array_key_exists($bank, (array)$UTF8_TO_ASCII)) {
5357
-        $bankfile = __DIR__ . '/data/' . sprintf('x%02x', $bank) . '.php';
5357
+        $bankfile = __DIR__.'/data/'.sprintf('x%02x', $bank).'.php';
5358 5358
         if (file_exists($bankfile)) {
5359 5359
           /** @noinspection PhpIncludeInspection */
5360 5360
           require $bankfile;
@@ -5458,40 +5458,40 @@  discard block
 block discarded – undo
5458 5458
         if ($c1 >= "\xc0" & $c1 <= "\xdf") { // looks like 2 bytes UTF8
5459 5459
 
5460 5460
           if ($c2 >= "\x80" && $c2 <= "\xbf") { // yeah, almost sure it's UTF8 already
5461
-            $buf .= $c1 . $c2;
5461
+            $buf .= $c1.$c2;
5462 5462
             $i++;
5463 5463
           } else { // not valid UTF8 - convert it
5464 5464
             $cc1 = (chr(ord($c1) / 64) | "\xc0");
5465 5465
             $cc2 = ($c1 & "\x3f") | "\x80";
5466
-            $buf .= $cc1 . $cc2;
5466
+            $buf .= $cc1.$cc2;
5467 5467
           }
5468 5468
 
5469 5469
         } elseif ($c1 >= "\xe0" & $c1 <= "\xef") { // looks like 3 bytes UTF8
5470 5470
 
5471 5471
           if ($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf") { // yeah, almost sure it's UTF8 already
5472
-            $buf .= $c1 . $c2 . $c3;
5472
+            $buf .= $c1.$c2.$c3;
5473 5473
             $i += 2;
5474 5474
           } else { // not valid UTF8 - convert it
5475 5475
             $cc1 = (chr(ord($c1) / 64) | "\xc0");
5476 5476
             $cc2 = ($c1 & "\x3f") | "\x80";
5477
-            $buf .= $cc1 . $cc2;
5477
+            $buf .= $cc1.$cc2;
5478 5478
           }
5479 5479
 
5480 5480
         } elseif ($c1 >= "\xf0" & $c1 <= "\xf7") { // looks like 4 bytes UTF8
5481 5481
 
5482 5482
           if ($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf" && $c4 >= "\x80" && $c4 <= "\xbf") { // yeah, almost sure it's UTF8 already
5483
-            $buf .= $c1 . $c2 . $c3 . $c4;
5483
+            $buf .= $c1.$c2.$c3.$c4;
5484 5484
             $i += 3;
5485 5485
           } else { // not valid UTF8 - convert it
5486 5486
             $cc1 = (chr(ord($c1) / 64) | "\xc0");
5487 5487
             $cc2 = ($c1 & "\x3f") | "\x80";
5488
-            $buf .= $cc1 . $cc2;
5488
+            $buf .= $cc1.$cc2;
5489 5489
           }
5490 5490
 
5491 5491
         } else { // doesn't look like UTF8, but should be converted
5492 5492
           $cc1 = (chr(ord($c1) / 64) | "\xc0");
5493 5493
           $cc2 = (($c1 & "\x3f") | "\x80");
5494
-          $buf .= $cc1 . $cc2;
5494
+          $buf .= $cc1.$cc2;
5495 5495
         }
5496 5496
 
5497 5497
       } elseif (($c1 & "\xc0") === "\x80") { // needs conversion
@@ -5502,7 +5502,7 @@  discard block
 block discarded – undo
5502 5502
         } else {
5503 5503
           $cc1 = (chr($ordC1 / 64) | "\xc0");
5504 5504
           $cc2 = (($c1 & "\x3f") | "\x80");
5505
-          $buf .= $cc1 . $cc2;
5505
+          $buf .= $cc1.$cc2;
5506 5506
         }
5507 5507
 
5508 5508
       } else { // it doesn't need conversion
@@ -5513,7 +5513,7 @@  discard block
 block discarded – undo
5513 5513
     // decode unicode escape sequences
5514 5514
     $buf = preg_replace_callback(
5515 5515
         '/\\\\u([0-9a-f]{4})/i',
5516
-        function ($match) {
5516
+        function($match) {
5517 5517
           return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');
5518 5518
         },
5519 5519
         $buf
@@ -5522,7 +5522,7 @@  discard block
 block discarded – undo
5522 5522
     // decode UTF-8 codepoints
5523 5523
     $buf = preg_replace_callback(
5524 5524
         '/&#\d{2,4};/',
5525
-        function ($match) {
5525
+        function($match) {
5526 5526
           return \mb_convert_encoding($match[0], 'UTF-8', 'HTML-ENTITIES');
5527 5527
         },
5528 5528
         $buf
@@ -5598,7 +5598,7 @@  discard block
 block discarded – undo
5598 5598
    */
5599 5599
   public static function ucfirst($str)
5600 5600
   {
5601
-    return self::strtoupper(self::substr($str, 0, 1)) . self::substr($str, 1);
5601
+    return self::strtoupper(self::substr($str, 0, 1)).self::substr($str, 1);
5602 5602
   }
5603 5603
 
5604 5604
   /**
@@ -6045,7 +6045,7 @@  discard block
 block discarded – undo
6045 6045
       return '';
6046 6046
     }
6047 6047
 
6048
-    preg_match('/^\s*+(?:\S++\s*+){1,' . $words . '}/u', $str, $matches);
6048
+    preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $str, $matches);
6049 6049
 
6050 6050
     if (
6051 6051
         !isset($matches[0])
@@ -6055,7 +6055,7 @@  discard block
 block discarded – undo
6055 6055
       return $str;
6056 6056
     }
6057 6057
 
6058
-    return self::rtrim($matches[0]) . $strAddOn;
6058
+    return self::rtrim($matches[0]).$strAddOn;
6059 6059
   }
6060 6060
 
6061 6061
   /**
@@ -6127,7 +6127,7 @@  discard block
 block discarded – undo
6127 6127
       $strReturn .= $break;
6128 6128
     }
6129 6129
 
6130
-    return $strReturn . implode('', $chars);
6130
+    return $strReturn.implode('', $chars);
6131 6131
   }
6132 6132
 
6133 6133
   /**
Please login to merge, or discard this patch.