Completed
Push — master ( b6b34a...efa664 )
by Lars
02:59
created
src/voku/helper/data/x24.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,6 +73,6 @@
 block discarded – undo
73 73
 $data[232] = '(y)';
74 74
 $data[233] = '(z)';
75 75
 
76
-$result =& $data;
76
+$result = & $data;
77 77
 unset($data);
78 78
 return $result;
Please login to merge, or discard this patch.
src/voku/helper/UTF8.php 3 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2396,7 +2396,7 @@  discard block
 block discarded – undo
2396 2396
    *
2397 2397
    * @see    http://hsivonen.iki.fi/php-utf8/
2398 2398
    *
2399
-   * @param string|string[] $str    <p>The string to be checked.</p>
2399
+   * @param string $str    <p>The string to be checked.</p>
2400 2400
    * @param bool            $strict <p>Check also if the string is not UTF-16 or UTF-32.</p>
2401 2401
    *
2402 2402
    * @return bool
@@ -5116,7 +5116,7 @@  discard block
 block discarded – undo
5116 5116
    * @link http://php.net/manual/en/function.mb-strrpos.php
5117 5117
    *
5118 5118
    * @param string     $haystack  <p>The string being checked, for the last occurrence of needle</p>
5119
-   * @param string|int $needle    <p>The string to find in haystack.<br>Or a code point as int.</p>
5119
+   * @param string $needle    <p>The string to find in haystack.<br>Or a code point as int.</p>
5120 5120
    * @param int        $offset    [optional] <p>May be specified to begin searching an arbitrary number of characters
5121 5121
    *                              into the string. Negative values will stop searching at an arbitrary point prior to
5122 5122
    *                              the end of the string.
@@ -5915,8 +5915,8 @@  discard block
 block discarded – undo
5915 5915
    *
5916 5916
    * source: https://gist.github.com/stemar/8287074
5917 5917
    *
5918
-   * @param string|string[] $str              <p>The input string or an array of stings.</p>
5919
-   * @param string|string[] $replacement      <p>The replacement string or an array of stings.</p>
5918
+   * @param string $str              <p>The input string or an array of stings.</p>
5919
+   * @param string $replacement      <p>The replacement string or an array of stings.</p>
5920 5920
    * @param int|int[]       $offset           <p>
5921 5921
    *                                          If start is positive, the replacing will begin at the start'th offset
5922 5922
    *                                          into string.
@@ -5924,7 +5924,7 @@  discard block
 block discarded – undo
5924 5924
    *                                          If start is negative, the replacing will begin at the start'th character
5925 5925
    *                                          from the end of string.
5926 5926
    *                                          </p>
5927
-   * @param int|int[]|null  $length           [optional] <p>If given and is positive, it represents the length of the
5927
+   * @param integer  $length           [optional] <p>If given and is positive, it represents the length of the
5928 5928
    *                                          portion of string which is to be replaced. If it is negative, it
5929 5929
    *                                          represents the number of characters from the end of string at which to
5930 5930
    *                                          stop replacing. If it is not given, then it will default to strlen(
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -405,16 +405,16 @@  discard block
 block discarded – undo
405 405
       $chr = self::$CHR[$code_point];
406 406
     } elseif ($code_point <= 0x7FF) {
407 407
       $chr = self::$CHR[($code_point >> 6) + 0xC0] .
408
-             self::$CHR[($code_point & 0x3F) + 0x80];
408
+              self::$CHR[($code_point & 0x3F) + 0x80];
409 409
     } elseif ($code_point <= 0xFFFF) {
410 410
       $chr = self::$CHR[($code_point >> 12) + 0xE0] .
411
-             self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] .
412
-             self::$CHR[($code_point & 0x3F) + 0x80];
411
+              self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] .
412
+              self::$CHR[($code_point & 0x3F) + 0x80];
413 413
     } else {
414 414
       $chr = self::$CHR[($code_point >> 18) + 0xF0] .
415
-             self::$CHR[(($code_point >> 12) & 0x3F) + 0x80] .
416
-             self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] .
417
-             self::$CHR[($code_point & 0x3F) + 0x80];
415
+              self::$CHR[(($code_point >> 12) & 0x3F) + 0x80] .
416
+              self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] .
417
+              self::$CHR[($code_point & 0x3F) + 0x80];
418 418
     }
419 419
 
420 420
     if ($encoding !== 'UTF-8') {
@@ -2263,10 +2263,10 @@  discard block
 block discarded – undo
2263 2263
     $json = self::json_decode($str);
2264 2264
 
2265 2265
     return (
2266
-               \is_object($json) === true
2266
+                \is_object($json) === true
2267 2267
                ||
2268 2268
                \is_array($json) === true
2269
-           )
2269
+            )
2270 2270
            &&
2271 2271
            \json_last_error() === JSON_ERROR_NONE;
2272 2272
   }
Please login to merge, or discard this patch.
Spacing   +78 added lines, -80 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace voku\helper;
6 6
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
   public static function add_bom_to_string(string $str): string
244 244
   {
245 245
     if (self::string_has_bom($str) === false) {
246
-      $str = self::bom() . $str;
246
+      $str = self::bom().$str;
247 247
     }
248 248
 
249 249
     return $str;
@@ -364,10 +364,10 @@  discard block
 block discarded – undo
364 364
         &&
365 365
         self::$SUPPORT['mbstring'] === false
366 366
     ) {
367
-      \trigger_error('UTF8::chr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
367
+      \trigger_error('UTF8::chr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
368 368
     }
369 369
 
370
-    $cacheKey = $code_point . $encoding;
370
+    $cacheKey = $code_point.$encoding;
371 371
     if (isset($CHAR_CACHE[$cacheKey]) === true) {
372 372
       return $CHAR_CACHE[$cacheKey];
373 373
     }
@@ -404,16 +404,16 @@  discard block
 block discarded – undo
404 404
     if ($code_point <= 0x7F) {
405 405
       $chr = self::$CHR[$code_point];
406 406
     } elseif ($code_point <= 0x7FF) {
407
-      $chr = self::$CHR[($code_point >> 6) + 0xC0] .
407
+      $chr = self::$CHR[($code_point >> 6) + 0xC0].
408 408
              self::$CHR[($code_point & 0x3F) + 0x80];
409 409
     } elseif ($code_point <= 0xFFFF) {
410
-      $chr = self::$CHR[($code_point >> 12) + 0xE0] .
411
-             self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] .
410
+      $chr = self::$CHR[($code_point >> 12) + 0xE0].
411
+             self::$CHR[(($code_point >> 6) & 0x3F) + 0x80].
412 412
              self::$CHR[($code_point & 0x3F) + 0x80];
413 413
     } else {
414
-      $chr = self::$CHR[($code_point >> 18) + 0xF0] .
415
-             self::$CHR[(($code_point >> 12) & 0x3F) + 0x80] .
416
-             self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] .
414
+      $chr = self::$CHR[($code_point >> 18) + 0xF0].
415
+             self::$CHR[(($code_point >> 12) & 0x3F) + 0x80].
416
+             self::$CHR[(($code_point >> 6) & 0x3F) + 0x80].
417 417
              self::$CHR[($code_point & 0x3F) + 0x80];
418 418
     }
419 419
 
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
     }
459 459
 
460 460
     return \array_map(
461
-        function ($data) {
461
+        function($data) {
462 462
           return UTF8::strlen($data, '8BIT');
463 463
         },
464 464
         self::split($str)
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
    */
690 690
   public static function decimal_to_chr($int): string
691 691
   {
692
-    return self::html_entity_decode('&#' . $int . ';', ENT_QUOTES | ENT_HTML5);
692
+    return self::html_entity_decode('&#'.$int.';', ENT_QUOTES | ENT_HTML5);
693 693
   }
694 694
 
695 695
   /**
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
           &&
765 765
           self::$SUPPORT['mbstring'] === false
766 766
       ) {
767
-        \trigger_error('UTF8::encode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
767
+        \trigger_error('UTF8::encode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
768 768
       }
769 769
 
770 770
       $strEncoded = \mb_convert_encoding(
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
           ) {
923 923
             // Prevent leading combining chars
924 924
             // for NFC-safe concatenations.
925
-            $var = $leading_combining . $var;
925
+            $var = $leading_combining.$var;
926 926
           }
927 927
         }
928 928
 
@@ -1344,7 +1344,7 @@  discard block
 block discarded – undo
1344 1344
    */
1345 1345
   private static function getData(string $file)
1346 1346
   {
1347
-    $file = __DIR__ . '/data/' . $file . '.php';
1347
+    $file = __DIR__.'/data/'.$file.'.php';
1348 1348
     if (\file_exists($file)) {
1349 1349
       /** @noinspection PhpIncludeInspection */
1350 1350
       return require $file;
@@ -1484,7 +1484,7 @@  discard block
 block discarded – undo
1484 1484
     return \implode(
1485 1485
         '',
1486 1486
         \array_map(
1487
-            function ($data) use ($keepAsciiChars, $encoding) {
1487
+            function($data) use ($keepAsciiChars, $encoding) {
1488 1488
               return UTF8::single_chr_html_encode($data, $keepAsciiChars, $encoding);
1489 1489
             },
1490 1490
             self::split($str)
@@ -1598,7 +1598,7 @@  discard block
 block discarded – undo
1598 1598
         &&
1599 1599
         self::$SUPPORT['mbstring'] === false
1600 1600
     ) {
1601
-      \trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
1601
+      \trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
1602 1602
     }
1603 1603
 
1604 1604
     do {
@@ -1606,7 +1606,7 @@  discard block
 block discarded – undo
1606 1606
 
1607 1607
       $str = (string)\preg_replace_callback(
1608 1608
           "/&#\d{2,6};/",
1609
-          function ($matches) use ($encoding) {
1609
+          function($matches) use ($encoding) {
1610 1610
             $returnTmp = \mb_convert_encoding($matches[0], $encoding, 'HTML-ENTITIES');
1611 1611
 
1612 1612
             if ($returnTmp !== '"' && $returnTmp !== "'") {
@@ -1928,9 +1928,9 @@  discard block
 block discarded – undo
1928 1928
   {
1929 1929
     $hex = \dechex($int);
1930 1930
 
1931
-    $hex = (\strlen($hex) < 4 ? \substr('0000' . $hex, -4) : $hex);
1931
+    $hex = (\strlen($hex) < 4 ? \substr('0000'.$hex, -4) : $hex);
1932 1932
 
1933
-    return $pfix . $hex;
1933
+    return $pfix.$hex;
1934 1934
   }
1935 1935
 
1936 1936
   /**
@@ -2637,7 +2637,7 @@  discard block
 block discarded – undo
2637 2637
         $cleanUtf8
2638 2638
     );
2639 2639
 
2640
-    return $strPartOne . $strPartTwo;
2640
+    return $strPartOne.$strPartTwo;
2641 2641
   }
2642 2642
 
2643 2643
   /**
@@ -2725,7 +2725,7 @@  discard block
 block discarded – undo
2725 2725
       return \preg_replace('/^[\pZ\pC]+/u', '', $str);
2726 2726
     }
2727 2727
 
2728
-    return \preg_replace('/^' . self::rxClass($chars) . '+/u', '', $str);
2728
+    return \preg_replace('/^'.self::rxClass($chars).'+/u', '', $str);
2729 2729
   }
2730 2730
 
2731 2731
   /**
@@ -3058,7 +3058,7 @@  discard block
 block discarded – undo
3058 3058
       }
3059 3059
     }
3060 3060
 
3061
-    $cacheKey = $chr_orig . $encoding;
3061
+    $cacheKey = $chr_orig.$encoding;
3062 3062
     if (isset($CHAR_CACHE[$cacheKey]) === true) {
3063 3063
       return $CHAR_CACHE[$cacheKey];
3064 3064
     }
@@ -3285,7 +3285,7 @@  discard block
 block discarded – undo
3285 3285
     if (\is_array($what) === true) {
3286 3286
       /** @noinspection ForeachSourceInspection */
3287 3287
       foreach ($what as $item) {
3288
-        $str = (string)\preg_replace('/(' . \preg_quote($item, '/') . ')+/', $item, $str);
3288
+        $str = (string)\preg_replace('/('.\preg_quote($item, '/').')+/', $item, $str);
3289 3289
       }
3290 3290
     }
3291 3291
 
@@ -3395,7 +3395,7 @@  discard block
 block discarded – undo
3395 3395
       return \preg_replace('/[\pZ\pC]+$/u', '', $str);
3396 3396
     }
3397 3397
 
3398
-    return \preg_replace('/' . self::rxClass($chars) . '+$/u', '', $str);
3398
+    return \preg_replace('/'.self::rxClass($chars).'+$/u', '', $str);
3399 3399
   }
3400 3400
 
3401 3401
   /**
@@ -3410,7 +3410,7 @@  discard block
 block discarded – undo
3410 3410
   {
3411 3411
     static $RX_CLASSS_CACHE = [];
3412 3412
 
3413
-    $cacheKey = $s . $class;
3413
+    $cacheKey = $s.$class;
3414 3414
 
3415 3415
     if (isset($RX_CLASSS_CACHE[$cacheKey])) {
3416 3416
       return $RX_CLASSS_CACHE[$cacheKey];
@@ -3422,7 +3422,7 @@  discard block
 block discarded – undo
3422 3422
     /** @noinspection SuspiciousLoopInspection */
3423 3423
     foreach (self::str_split($s) as $s) {
3424 3424
       if ('-' === $s) {
3425
-        $class[0] = '-' . $class[0];
3425
+        $class[0] = '-'.$class[0];
3426 3426
       } elseif (!isset($s[2])) {
3427 3427
         $class[0] .= \preg_quote($s, '/');
3428 3428
       } elseif (1 === self::strlen($s)) {
@@ -3433,13 +3433,13 @@  discard block
 block discarded – undo
3433 3433
     }
3434 3434
 
3435 3435
     if ($class[0]) {
3436
-      $class[0] = '[' . $class[0] . ']';
3436
+      $class[0] = '['.$class[0].']';
3437 3437
     }
3438 3438
 
3439 3439
     if (1 === \count($class)) {
3440 3440
       $return = $class[0];
3441 3441
     } else {
3442
-      $return = '(?:' . \implode('|', $class) . ')';
3442
+      $return = '(?:'.\implode('|', $class).')';
3443 3443
     }
3444 3444
 
3445 3445
     $RX_CLASSS_CACHE[$cacheKey] = $return;
@@ -3458,7 +3458,7 @@  discard block
 block discarded – undo
3458 3458
 
3459 3459
     echo '<pre>';
3460 3460
     foreach (self::$SUPPORT as $key => $value) {
3461
-      echo $key . ' - ' . \print_r($value, true) . "\n<br>";
3461
+      echo $key.' - '.\print_r($value, true)."\n<br>";
3462 3462
     }
3463 3463
     echo '</pre>';
3464 3464
   }
@@ -3490,7 +3490,7 @@  discard block
 block discarded – undo
3490 3490
       $encoding = self::normalize_encoding($encoding, 'UTF-8');
3491 3491
     }
3492 3492
 
3493
-    return '&#' . self::ord($char, $encoding) . ';';
3493
+    return '&#'.self::ord($char, $encoding).';';
3494 3494
   }
3495 3495
 
3496 3496
   /**
@@ -3551,7 +3551,7 @@  discard block
 block discarded – undo
3551 3551
         ) {
3552 3552
 
3553 3553
           if (($str[$i + 1] & "\xC0") === "\x80") {
3554
-            $ret[] = $str[$i] . $str[$i + 1];
3554
+            $ret[] = $str[$i].$str[$i + 1];
3555 3555
 
3556 3556
             $i++;
3557 3557
           }
@@ -3567,7 +3567,7 @@  discard block
 block discarded – undo
3567 3567
               &&
3568 3568
               ($str[$i + 2] & "\xC0") === "\x80"
3569 3569
           ) {
3570
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2];
3570
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2];
3571 3571
 
3572 3572
             $i += 2;
3573 3573
           }
@@ -3585,7 +3585,7 @@  discard block
 block discarded – undo
3585 3585
               &&
3586 3586
               ($str[$i + 3] & "\xC0") === "\x80"
3587 3587
           ) {
3588
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3];
3588
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3];
3589 3589
 
3590 3590
             $i += 3;
3591 3591
           }
@@ -3598,7 +3598,7 @@  discard block
 block discarded – undo
3598 3598
       $ret = \array_chunk($ret, $length);
3599 3599
 
3600 3600
       return \array_map(
3601
-          function ($item) {
3601
+          function($item) {
3602 3602
             return \implode('', $item);
3603 3603
           }, $ret
3604 3604
       );
@@ -3708,7 +3708,7 @@  discard block
 block discarded – undo
3708 3708
     foreach (self::$ENCODINGS as $encodingTmp) {
3709 3709
       # INFO: //IGNORE and //TRANSLIT still throw notice
3710 3710
       /** @noinspection PhpUsageOfSilenceOperatorInspection */
3711
-      if (\md5(@\iconv($encodingTmp, $encodingTmp . '//IGNORE', $str)) === $md5) {
3711
+      if (\md5(@\iconv($encodingTmp, $encodingTmp.'//IGNORE', $str)) === $md5) {
3712 3712
         return $encodingTmp;
3713 3713
       }
3714 3714
     }
@@ -3792,7 +3792,7 @@  discard block
 block discarded – undo
3792 3792
       if ('' === $s .= '') {
3793 3793
         $s = '/^(?<=.)$/';
3794 3794
       } else {
3795
-        $s = '/' . \preg_quote($s, '/') . '/ui';
3795
+        $s = '/'.\preg_quote($s, '/').'/ui';
3796 3796
       }
3797 3797
     }
3798 3798
 
@@ -3843,7 +3843,7 @@  discard block
 block discarded – undo
3843 3843
     }
3844 3844
 
3845 3845
     if (self::substr($str, $length - 1, 1) === ' ') {
3846
-      return (string)self::substr($str, 0, $length - 1) . $strAddOn;
3846
+      return (string)self::substr($str, 0, $length - 1).$strAddOn;
3847 3847
     }
3848 3848
 
3849 3849
     $str = (string)self::substr($str, 0, $length);
@@ -3852,9 +3852,9 @@  discard block
 block discarded – undo
3852 3852
     $new_str = \implode(' ', $array);
3853 3853
 
3854 3854
     if ($new_str === '') {
3855
-      $str = (string)self::substr($str, 0, $length - 1) . $strAddOn;
3855
+      $str = (string)self::substr($str, 0, $length - 1).$strAddOn;
3856 3856
     } else {
3857
-      $str = $new_str . $strAddOn;
3857
+      $str = $new_str.$strAddOn;
3858 3858
     }
3859 3859
 
3860 3860
     return $str;
@@ -3909,7 +3909,7 @@  discard block
 block discarded – undo
3909 3909
           $pre = '';
3910 3910
       }
3911 3911
 
3912
-      return $pre . $str . $post;
3912
+      return $pre.$str.$post;
3913 3913
     }
3914 3914
 
3915 3915
     return $str;
@@ -3969,7 +3969,7 @@  discard block
 block discarded – undo
3969 3969
    *
3970 3970
    * @return mixed <p>This function returns a string or an array with the replaced values.</p>
3971 3971
    */
3972
-  public static function str_replace($search, $replace, $subject, int &$count = null)
3972
+  public static function str_replace($search, $replace, $subject, int & $count = null)
3973 3973
   {
3974 3974
     return \str_replace($search, $replace, $subject, $count);
3975 3975
   }
@@ -4063,7 +4063,7 @@  discard block
 block discarded – undo
4063 4063
     }
4064 4064
 
4065 4065
     /** @noinspection PhpInternalEntityUsedInspection */
4066
-    \preg_match_all('/' . self::GRAPHEME_CLUSTER_RX . '/u', $str, $a);
4066
+    \preg_match_all('/'.self::GRAPHEME_CLUSTER_RX.'/u', $str, $a);
4067 4067
     $a = $a[0];
4068 4068
 
4069 4069
     if ($len === 1) {
@@ -4288,7 +4288,7 @@  discard block
 block discarded – undo
4288 4288
   public static function strcmp(string $str1, string $str2): int
4289 4289
   {
4290 4290
     /** @noinspection PhpUndefinedClassInspection */
4291
-    return $str1 . '' === $str2 . '' ? 0 : \strcmp(
4291
+    return $str1.'' === $str2.'' ? 0 : \strcmp(
4292 4292
         \Normalizer::normalize($str1, \Normalizer::NFD),
4293 4293
         \Normalizer::normalize($str2, \Normalizer::NFD)
4294 4294
     );
@@ -4322,7 +4322,7 @@  discard block
 block discarded – undo
4322 4322
       return null;
4323 4323
     }
4324 4324
 
4325
-    if (\preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) {
4325
+    if (\preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) {
4326 4326
       return self::strlen($length[1]);
4327 4327
     }
4328 4328
 
@@ -4514,7 +4514,7 @@  discard block
 block discarded – undo
4514 4514
         &&
4515 4515
         self::$SUPPORT['mbstring'] === false
4516 4516
     ) {
4517
-      \trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
4517
+      \trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
4518 4518
     }
4519 4519
 
4520 4520
     if (self::$SUPPORT['mbstring'] === true) {
@@ -4533,7 +4533,7 @@  discard block
 block discarded – undo
4533 4533
       return \stristr($haystack, $needle, $before_needle);
4534 4534
     }
4535 4535
 
4536
-    \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/usi', $haystack, $match);
4536
+    \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/usi', $haystack, $match);
4537 4537
 
4538 4538
     if (!isset($match[1])) {
4539 4539
       return false;
@@ -4600,7 +4600,7 @@  discard block
 block discarded – undo
4600 4600
         &&
4601 4601
         self::$SUPPORT['iconv'] === false
4602 4602
     ) {
4603
-      \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
4603
+      \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
4604 4604
     }
4605 4605
 
4606 4606
     if (
@@ -4704,7 +4704,7 @@  discard block
 block discarded – undo
4704 4704
    */
4705 4705
   public static function strnatcmp(string $str1, string $str2): int
4706 4706
   {
4707
-    return $str1 . '' === $str2 . '' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
4707
+    return $str1.'' === $str2.'' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
4708 4708
   }
4709 4709
 
4710 4710
   /**
@@ -4762,7 +4762,7 @@  discard block
 block discarded – undo
4762 4762
       return false;
4763 4763
     }
4764 4764
 
4765
-    if (\preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) {
4765
+    if (\preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) {
4766 4766
       return \substr($haystack, \strpos($haystack, $m[0]));
4767 4767
     }
4768 4768
 
@@ -4826,7 +4826,7 @@  discard block
 block discarded – undo
4826 4826
         &&
4827 4827
         self::$SUPPORT['mbstring'] === false
4828 4828
     ) {
4829
-      \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
4829
+      \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
4830 4830
     }
4831 4831
 
4832 4832
     if (
@@ -5047,7 +5047,7 @@  discard block
 block discarded – undo
5047 5047
         &&
5048 5048
         self::$SUPPORT['mbstring'] === false
5049 5049
     ) {
5050
-      \trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5050
+      \trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5051 5051
     }
5052 5052
 
5053 5053
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5118,7 +5118,7 @@  discard block
 block discarded – undo
5118 5118
         &&
5119 5119
         self::$SUPPORT['mbstring'] === false
5120 5120
     ) {
5121
-      \trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5121
+      \trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5122 5122
     }
5123 5123
 
5124 5124
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5183,7 +5183,7 @@  discard block
 block discarded – undo
5183 5183
       return 0;
5184 5184
     }
5185 5185
 
5186
-    return \preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0;
5186
+    return \preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0;
5187 5187
   }
5188 5188
 
5189 5189
   /**
@@ -5226,7 +5226,7 @@  discard block
 block discarded – undo
5226 5226
         &&
5227 5227
         self::$SUPPORT['mbstring'] === false
5228 5228
     ) {
5229
-      \trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5229
+      \trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5230 5230
     }
5231 5231
 
5232 5232
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5241,7 +5241,7 @@  discard block
 block discarded – undo
5241 5241
       return \grapheme_strstr($haystack, $needle, $before_needle);
5242 5242
     }
5243 5243
 
5244
-    \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/us', $haystack, $match);
5244
+    \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/us', $haystack, $match);
5245 5245
 
5246 5246
     if (!isset($match[1])) {
5247 5247
       return false;
@@ -5338,9 +5338,9 @@  discard block
 block discarded – undo
5338 5338
 
5339 5339
       if (self::$SUPPORT['intl'] === true) {
5340 5340
 
5341
-        $langCode = $lang . '-Lower';
5341
+        $langCode = $lang.'-Lower';
5342 5342
         if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) {
5343
-          \trigger_error('UTF8::strtolower() without intl for special language: ' . $lang, E_USER_WARNING);
5343
+          \trigger_error('UTF8::strtolower() without intl for special language: '.$lang, E_USER_WARNING);
5344 5344
 
5345 5345
           $langCode = 'Any-Lower';
5346 5346
         }
@@ -5348,7 +5348,7 @@  discard block
 block discarded – undo
5348 5348
         return transliterator_transliterate($langCode, $str);
5349 5349
       }
5350 5350
 
5351
-      \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING);
5351
+      \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING);
5352 5352
     }
5353 5353
 
5354 5354
     return \mb_strtolower($str, $encoding);
@@ -5403,9 +5403,9 @@  discard block
 block discarded – undo
5403 5403
 
5404 5404
       if (self::$SUPPORT['intl'] === true) {
5405 5405
 
5406
-        $langCode = $lang . '-Upper';
5406
+        $langCode = $lang.'-Upper';
5407 5407
         if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) {
5408
-          \trigger_error('UTF8::strtoupper() without intl for special language: ' . $lang, E_USER_WARNING);
5408
+          \trigger_error('UTF8::strtoupper() without intl for special language: '.$lang, E_USER_WARNING);
5409 5409
 
5410 5410
           $langCode = 'Any-Upper';
5411 5411
         }
@@ -5413,7 +5413,7 @@  discard block
 block discarded – undo
5413 5413
         return transliterator_transliterate($langCode, $str);
5414 5414
       }
5415 5415
 
5416
-      \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING);
5416
+      \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING);
5417 5417
     }
5418 5418
 
5419 5419
     return \mb_strtoupper($str, $encoding);
@@ -5597,7 +5597,7 @@  discard block
 block discarded – undo
5597 5597
         &&
5598 5598
         self::$SUPPORT['mbstring'] === false
5599 5599
     ) {
5600
-      \trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5600
+      \trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5601 5601
     }
5602 5602
 
5603 5603
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5625,8 +5625,7 @@  discard block
 block discarded – undo
5625 5625
 
5626 5626
     if (self::is_ascii($str)) {
5627 5627
       return ($length === null) ?
5628
-          \substr($str, $offset) :
5629
-          \substr($str, $offset, $length);
5628
+          \substr($str, $offset) : \substr($str, $offset, $length);
5630 5629
     }
5631 5630
 
5632 5631
     // fallback via vanilla php
@@ -5754,14 +5753,14 @@  discard block
 block discarded – undo
5754 5753
         &&
5755 5754
         self::$SUPPORT['mbstring'] === false
5756 5755
     ) {
5757
-      \trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5756
+      \trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5758 5757
     }
5759 5758
 
5760 5759
     if (self::$SUPPORT['mbstring'] === true) {
5761 5760
       return \mb_substr_count($haystack, $needle, $encoding);
5762 5761
     }
5763 5762
 
5764
-    \preg_match_all('/' . \preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER);
5763
+    \preg_match_all('/'.\preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER);
5765 5764
 
5766 5765
     return \count($matches);
5767 5766
   }
@@ -5939,8 +5938,7 @@  discard block
 block discarded – undo
5939 5938
 
5940 5939
     if (self::is_ascii($str)) {
5941 5940
       return ($length === null) ?
5942
-          \substr_replace($str, $replacement, $offset) :
5943
-          \substr_replace($str, $replacement, $offset, $length);
5941
+          \substr_replace($str, $replacement, $offset) : \substr_replace($str, $replacement, $offset, $length);
5944 5942
     }
5945 5943
 
5946 5944
     \preg_match_all('/./us', $str, $smatches);
@@ -6011,7 +6009,7 @@  discard block
 block discarded – undo
6011 6009
 
6012 6010
     $strSwappedCase = \preg_replace_callback(
6013 6011
         '/[\S]/u',
6014
-        function ($match) use ($encoding) {
6012
+        function($match) use ($encoding) {
6015 6013
           $marchToUpper = UTF8::strtoupper($match[0], $encoding);
6016 6014
 
6017 6015
           if ($match[0] === $marchToUpper) {
@@ -6337,7 +6335,7 @@  discard block
 block discarded – undo
6337 6335
           $c2 = $i + 1 >= $max ? "\x00" : $str[$i + 1];
6338 6336
 
6339 6337
           if ($c2 >= "\x80" && $c2 <= "\xBF") { // yeah, almost sure it's UTF8 already
6340
-            $buf .= $c1 . $c2;
6338
+            $buf .= $c1.$c2;
6341 6339
             $i++;
6342 6340
           } else { // not valid UTF8 - convert it
6343 6341
             $buf .= self::to_utf8_convert($c1);
@@ -6349,7 +6347,7 @@  discard block
 block discarded – undo
6349 6347
           $c3 = $i + 2 >= $max ? "\x00" : $str[$i + 2];
6350 6348
 
6351 6349
           if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF") { // yeah, almost sure it's UTF8 already
6352
-            $buf .= $c1 . $c2 . $c3;
6350
+            $buf .= $c1.$c2.$c3;
6353 6351
             $i += 2;
6354 6352
           } else { // not valid UTF8 - convert it
6355 6353
             $buf .= self::to_utf8_convert($c1);
@@ -6362,7 +6360,7 @@  discard block
 block discarded – undo
6362 6360
           $c4 = $i + 3 >= $max ? "\x00" : $str[$i + 3];
6363 6361
 
6364 6362
           if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF" && $c4 >= "\x80" && $c4 <= "\xBF") { // yeah, almost sure it's UTF8 already
6365
-            $buf .= $c1 . $c2 . $c3 . $c4;
6363
+            $buf .= $c1.$c2.$c3.$c4;
6366 6364
             $i += 3;
6367 6365
           } else { // not valid UTF8 - convert it
6368 6366
             $buf .= self::to_utf8_convert($c1);
@@ -6384,7 +6382,7 @@  discard block
 block discarded – undo
6384 6382
     // decode unicode escape sequences
6385 6383
     $buf = \preg_replace_callback(
6386 6384
         '/\\\\u([0-9a-f]{4})/i',
6387
-        function ($match) {
6385
+        function($match) {
6388 6386
           return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');
6389 6387
         },
6390 6388
         $buf
@@ -6426,7 +6424,7 @@  discard block
 block discarded – undo
6426 6424
     } else {
6427 6425
       $cc1 = self::$CHR[$ordC1 / 64] | "\xC0";
6428 6426
       $cc2 = ($int & "\x3F") | "\x80";
6429
-      $buf .= $cc1 . $cc2;
6427
+      $buf .= $cc1.$cc2;
6430 6428
     }
6431 6429
 
6432 6430
     return $buf;
@@ -6487,7 +6485,7 @@  discard block
 block discarded – undo
6487 6485
         $cleanUtf8
6488 6486
     );
6489 6487
 
6490
-    return $strPartOne . $strPartTwo;
6488
+    return $strPartOne.$strPartTwo;
6491 6489
   }
6492 6490
 
6493 6491
   /**
@@ -6532,7 +6530,7 @@  discard block
 block discarded – undo
6532 6530
       $str = self::clean($str);
6533 6531
     }
6534 6532
 
6535
-    $usePhpDefaultFunctions = !(bool)($charlist . \implode('', $exceptions));
6533
+    $usePhpDefaultFunctions = !(bool)($charlist.\implode('', $exceptions));
6536 6534
 
6537 6535
     if (
6538 6536
         $usePhpDefaultFunctions === true
@@ -7034,7 +7032,7 @@  discard block
 block discarded – undo
7034 7032
       return '';
7035 7033
     }
7036 7034
 
7037
-    \preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $str, $matches);
7035
+    \preg_match('/^\s*+(?:\S++\s*+){1,'.$limit.'}/u', $str, $matches);
7038 7036
 
7039 7037
     if (
7040 7038
         !isset($matches[0])
@@ -7044,7 +7042,7 @@  discard block
 block discarded – undo
7044 7042
       return $str;
7045 7043
     }
7046 7044
 
7047
-    return self::rtrim($matches[0]) . $strAddOn;
7045
+    return self::rtrim($matches[0]).$strAddOn;
7048 7046
   }
7049 7047
 
7050 7048
   /**
@@ -7109,7 +7107,7 @@  discard block
 block discarded – undo
7109 7107
       $strReturn .= $break;
7110 7108
     }
7111 7109
 
7112
-    return $strReturn . \implode('', $chars);
7110
+    return $strReturn.\implode('', $chars);
7113 7111
   }
7114 7112
 
7115 7113
   /**
Please login to merge, or discard this patch.
src/voku/helper/data/x30.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
 'wi', 'we', 'wo', 'n', 'vu', 'ka', 'ke', 'va', 'vi', 've', 'vo', '', '', '"', '"', 'koto',
20 20
 ];
21 21
 
22
-$result =& $data;
22
+$result = & $data;
23 23
 unset($data);
24 24
 return $result;
Please login to merge, or discard this patch.
src/voku/helper/data/x8a.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
 'Xi ', 'Hui ', 'Yin ', 'An ', 'Xian ', 'Nan ', 'Chen ', 'Feng ', 'Zhu ', 'Yang ', 'Yan ', 'Heng ', 'Xuan ', 'Ge ', 'Nuo ', 'Qi ',
20 20
 ];
21 21
 
22
-$result =& $data;
22
+$result = & $data;
23 23
 unset($data);
24 24
 return $result;
Please login to merge, or discard this patch.
src/voku/helper/data/x80.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
 'Yi ', 'Guang ', 'Gai ', 'Ge ', 'Dong ', 'Zhi ', 'Xiao ', 'Xiong ', 'Xiong ', 'Er ', 'E ', 'Xing ', 'Pian ', 'Neng ', 'Zi ', 'Gui ',
20 20
 ];
21 21
 
22
-$result =& $data;
22
+$result = & $data;
23 23
 unset($data);
24 24
 return $result;
Please login to merge, or discard this patch.
src/voku/helper/data/xa4.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
 '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]',
20 20
 ];
21 21
 
22
-$result =& $data;
22
+$result = & $data;
23 23
 unset($data);
24 24
 return $result;
Please login to merge, or discard this patch.
src/voku/helper/data/x6b.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
 'Pei ', 'Ju ', 'Duo ', 'Cui ', 'Bi ', 'San ', '[?]', 'Mao ', 'Sui ', 'Yu ', 'Yu ', 'Tuo ', 'He ', 'Jian ', 'Ta ', 'San ',
20 20
 ];
21 21
 
22
-$result =& $data;
22
+$result = & $data;
23 23
 unset($data);
24 24
 return $result;
Please login to merge, or discard this patch.
src/voku/helper/data/x05.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
 'V', 'oy', 'i', '\'', '"', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]',
20 20
 ];
21 21
 
22
-$result =& $data;
22
+$result = & $data;
23 23
 unset($data);
24 24
 return $result;
Please login to merge, or discard this patch.
src/voku/helper/data/x52.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
 'Xie ', 'Mai ', 'Xun ', 'Xun ', 'Lu ', 'Li ', 'Che ', 'Rang ', 'Quan ', 'Bao ', 'Shao ', 'Yun ', 'Jiu ', 'Bao ', 'Gou ', 'Wu ',
20 20
 ];
21 21
 
22
-$result =& $data;
22
+$result = & $data;
23 23
 unset($data);
24 24
 return $result;
Please login to merge, or discard this patch.