Completed
Push — master ( f75e53...ad1b93 )
by Lars
03:58
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   +67 added lines, -67 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
     );
@@ -1287,7 +1287,7 @@  discard block
 block discarded – undo
1287 1287
           &&
1288 1288
           self::$support['mbstring'] === false
1289 1289
       ) {
1290
-        trigger_error('UTF8::encode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
1290
+        trigger_error('UTF8::encode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
1291 1291
       }
1292 1292
 
1293 1293
       $strEncoded = \mb_convert_encoding(
@@ -1487,7 +1487,7 @@  discard block
 block discarded – undo
1487 1487
           ) {
1488 1488
             // Prevent leading combining chars
1489 1489
             // for NFC-safe concatenations.
1490
-            $var = $leading_combining . $var;
1490
+            $var = $leading_combining.$var;
1491 1491
           }
1492 1492
         }
1493 1493
         break;
@@ -1905,7 +1905,7 @@  discard block
 block discarded – undo
1905 1905
    */
1906 1906
   private static function getData($file)
1907 1907
   {
1908
-    $file = __DIR__ . '/data/' . $file . '.php';
1908
+    $file = __DIR__.'/data/'.$file.'.php';
1909 1909
     if (file_exists($file)) {
1910 1910
       /** @noinspection PhpIncludeInspection */
1911 1911
       return require $file;
@@ -2008,7 +2008,7 @@  discard block
 block discarded – undo
2008 2008
     return implode(
2009 2009
         '',
2010 2010
         array_map(
2011
-            function ($data) use ($keepAsciiChars, $encoding) {
2011
+            function($data) use ($keepAsciiChars, $encoding) {
2012 2012
               return UTF8::single_chr_html_encode($data, $keepAsciiChars, $encoding);
2013 2013
             },
2014 2014
             self::split($str)
@@ -2127,7 +2127,7 @@  discard block
 block discarded – undo
2127 2127
 
2128 2128
       $str = preg_replace_callback(
2129 2129
           "/&#\d{2,6};/",
2130
-          function ($matches) use ($encoding) {
2130
+          function($matches) use ($encoding) {
2131 2131
             $returnTmp = \mb_convert_encoding($matches[0], $encoding, 'HTML-ENTITIES');
2132 2132
 
2133 2133
             if ($returnTmp !== '"' && $returnTmp !== "'") {
@@ -2436,9 +2436,9 @@  discard block
 block discarded – undo
2436 2436
     if (ctype_digit((string)$int)) {
2437 2437
       $hex = dechex((int)$int);
2438 2438
 
2439
-      $hex = (strlen($hex) < 4 ? substr('0000' . $hex, -4) : $hex);
2439
+      $hex = (strlen($hex) < 4 ? substr('0000'.$hex, -4) : $hex);
2440 2440
 
2441
-      return $pfix . $hex;
2441
+      return $pfix.$hex;
2442 2442
     }
2443 2443
 
2444 2444
     return '';
@@ -3124,7 +3124,7 @@  discard block
 block discarded – undo
3124 3124
    */
3125 3125
   public static function lcfirst($str)
3126 3126
   {
3127
-    return self::strtolower(self::substr($str, 0, 1)) . self::substr($str, 1);
3127
+    return self::strtolower(self::substr($str, 0, 1)).self::substr($str, 1);
3128 3128
   }
3129 3129
 
3130 3130
   /**
@@ -3148,7 +3148,7 @@  discard block
 block discarded – undo
3148 3148
       return preg_replace('/^[\pZ\pC]+/u', '', $str);
3149 3149
     }
3150 3150
 
3151
-    return preg_replace('/^' . self::rxClass($chars) . '+/u', '', $str);
3151
+    return preg_replace('/^'.self::rxClass($chars).'+/u', '', $str);
3152 3152
   }
3153 3153
 
3154 3154
   /**
@@ -3645,7 +3645,7 @@  discard block
 block discarded – undo
3645 3645
     if (is_array($what)) {
3646 3646
       /** @noinspection ForeachSourceInspection */
3647 3647
       foreach ($what as $item) {
3648
-        $str = preg_replace('/(' . preg_quote($item, '/') . ')+/', $item, $str);
3648
+        $str = preg_replace('/('.preg_quote($item, '/').')+/', $item, $str);
3649 3649
       }
3650 3650
     }
3651 3651
 
@@ -3730,7 +3730,7 @@  discard block
 block discarded – undo
3730 3730
       return preg_replace('/[\pZ\pC]+$/u', '', $str);
3731 3731
     }
3732 3732
 
3733
-    return preg_replace('/' . self::rxClass($chars) . '+$/u', '', $str);
3733
+    return preg_replace('/'.self::rxClass($chars).'+$/u', '', $str);
3734 3734
   }
3735 3735
 
3736 3736
   /**
@@ -3745,7 +3745,7 @@  discard block
 block discarded – undo
3745 3745
   {
3746 3746
     static $rxClassCache = array();
3747 3747
 
3748
-    $cacheKey = $s . $class;
3748
+    $cacheKey = $s.$class;
3749 3749
 
3750 3750
     if (isset($rxClassCache[$cacheKey])) {
3751 3751
       return $rxClassCache[$cacheKey];
@@ -3757,7 +3757,7 @@  discard block
 block discarded – undo
3757 3757
     /** @noinspection SuspiciousLoopInspection */
3758 3758
     foreach (self::str_split($s) as $s) {
3759 3759
       if ('-' === $s) {
3760
-        $class[0] = '-' . $class[0];
3760
+        $class[0] = '-'.$class[0];
3761 3761
       } elseif (!isset($s[2])) {
3762 3762
         $class[0] .= preg_quote($s, '/');
3763 3763
       } elseif (1 === self::strlen($s)) {
@@ -3768,13 +3768,13 @@  discard block
 block discarded – undo
3768 3768
     }
3769 3769
 
3770 3770
     if ($class[0]) {
3771
-      $class[0] = '[' . $class[0] . ']';
3771
+      $class[0] = '['.$class[0].']';
3772 3772
     }
3773 3773
 
3774 3774
     if (1 === count($class)) {
3775 3775
       $return = $class[0];
3776 3776
     } else {
3777
-      $return = '(?:' . implode('|', $class) . ')';
3777
+      $return = '(?:'.implode('|', $class).')';
3778 3778
     }
3779 3779
 
3780 3780
     $rxClassCache[$cacheKey] = $return;
@@ -3788,7 +3788,7 @@  discard block
 block discarded – undo
3788 3788
   public static function showSupport()
3789 3789
   {
3790 3790
     foreach (self::$support as $utf8Support) {
3791
-      echo $utf8Support . "\n<br>";
3791
+      echo $utf8Support."\n<br>";
3792 3792
     }
3793 3793
   }
3794 3794
 
@@ -3822,7 +3822,7 @@  discard block
 block discarded – undo
3822 3822
       $encoding = self::normalize_encoding($encoding);
3823 3823
     }
3824 3824
 
3825
-    return '&#' . self::ord($char, $encoding) . ';';
3825
+    return '&#'.self::ord($char, $encoding).';';
3826 3826
   }
3827 3827
 
3828 3828
   /**
@@ -3874,19 +3874,19 @@  discard block
 block discarded – undo
3874 3874
           $ret[] = $str[$i];
3875 3875
         } elseif ((($str[$i] & "\xE0") === "\xC0") && isset($str[$i + 1])) {
3876 3876
           if (($str[$i + 1] & "\xC0") === "\x80") {
3877
-            $ret[] = $str[$i] . $str[$i + 1];
3877
+            $ret[] = $str[$i].$str[$i + 1];
3878 3878
 
3879 3879
             $i++;
3880 3880
           }
3881 3881
         } elseif ((($str[$i] & "\xF0") === "\xE0") && isset($str[$i + 2])) {
3882 3882
           if ((($str[$i + 1] & "\xC0") === "\x80") && (($str[$i + 2] & "\xC0") === "\x80")) {
3883
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2];
3883
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2];
3884 3884
 
3885 3885
             $i += 2;
3886 3886
           }
3887 3887
         } elseif ((($str[$i] & "\xF8") === "\xF0") && isset($str[$i + 3])) {
3888 3888
           if ((($str[$i + 1] & "\xC0") === "\x80") && (($str[$i + 2] & "\xC0") === "\x80") && (($str[$i + 3] & "\xC0") === "\x80")) {
3889
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3];
3889
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3];
3890 3890
 
3891 3891
             $i += 3;
3892 3892
           }
@@ -3898,7 +3898,7 @@  discard block
 block discarded – undo
3898 3898
       $ret = array_chunk($ret, $length);
3899 3899
 
3900 3900
       return array_map(
3901
-          function ($item) {
3901
+          function($item) {
3902 3902
             return implode('', $item);
3903 3903
           }, $ret
3904 3904
       );
@@ -4087,7 +4087,7 @@  discard block
 block discarded – undo
4087 4087
       if ('' === $s .= '') {
4088 4088
         $s = '/^(?<=.)$/';
4089 4089
       } else {
4090
-        $s = '/' . preg_quote($s, '/') . '/ui';
4090
+        $s = '/'.preg_quote($s, '/').'/ui';
4091 4091
       }
4092 4092
     }
4093 4093
 
@@ -4145,7 +4145,7 @@  discard block
 block discarded – undo
4145 4145
     }
4146 4146
 
4147 4147
     if (self::substr($str, $length - 1, 1) === ' ') {
4148
-      return self::substr($str, 0, $length - 1) . $strAddOn;
4148
+      return self::substr($str, 0, $length - 1).$strAddOn;
4149 4149
     }
4150 4150
 
4151 4151
     $str = self::substr($str, 0, $length);
@@ -4154,9 +4154,9 @@  discard block
 block discarded – undo
4154 4154
     $new_str = implode(' ', $array);
4155 4155
 
4156 4156
     if ($new_str === '') {
4157
-      $str = self::substr($str, 0, $length - 1) . $strAddOn;
4157
+      $str = self::substr($str, 0, $length - 1).$strAddOn;
4158 4158
     } else {
4159
-      $str = $new_str . $strAddOn;
4159
+      $str = $new_str.$strAddOn;
4160 4160
     }
4161 4161
 
4162 4162
     return $str;
@@ -4211,7 +4211,7 @@  discard block
 block discarded – undo
4211 4211
           $pre = '';
4212 4212
       }
4213 4213
 
4214
-      return $pre . $str . $post;
4214
+      return $pre.$str.$post;
4215 4215
     }
4216 4216
 
4217 4217
     return $str;
@@ -4341,7 +4341,7 @@  discard block
 block discarded – undo
4341 4341
     }
4342 4342
 
4343 4343
     /** @noinspection PhpInternalEntityUsedInspection */
4344
-    preg_match_all('/' . Grapheme::GRAPHEME_CLUSTER_RX . '/u', $str, $a);
4344
+    preg_match_all('/'.Grapheme::GRAPHEME_CLUSTER_RX.'/u', $str, $a);
4345 4345
     $a = $a[0];
4346 4346
 
4347 4347
     if ($len === 1) {
@@ -4516,7 +4516,7 @@  discard block
 block discarded – undo
4516 4516
   public static function strcmp($str1, $str2)
4517 4517
   {
4518 4518
     /** @noinspection PhpUndefinedClassInspection */
4519
-    return $str1 . '' === $str2 . '' ? 0 : strcmp(
4519
+    return $str1.'' === $str2.'' ? 0 : strcmp(
4520 4520
         \Normalizer::normalize($str1, \Normalizer::NFD),
4521 4521
         \Normalizer::normalize($str2, \Normalizer::NFD)
4522 4522
     );
@@ -4547,7 +4547,7 @@  discard block
 block discarded – undo
4547 4547
       return null;
4548 4548
     }
4549 4549
 
4550
-    if (preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) {
4550
+    if (preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) {
4551 4551
       /** @noinspection OffsetOperationsInspection */
4552 4552
       return self::strlen($length[1]);
4553 4553
     }
@@ -4741,7 +4741,7 @@  discard block
 block discarded – undo
4741 4741
         &&
4742 4742
         self::$support['mbstring'] === false
4743 4743
     ) {
4744
-      trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
4744
+      trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
4745 4745
     }
4746 4746
 
4747 4747
     if (self::$support['mbstring'] === true) {
@@ -4752,7 +4752,7 @@  discard block
 block discarded – undo
4752 4752
       return \grapheme_stristr($haystack, $needle, $before_needle);
4753 4753
     }
4754 4754
 
4755
-    preg_match('/^(.*?)' . preg_quote($needle, '/') . '/usi', $haystack, $match);
4755
+    preg_match('/^(.*?)'.preg_quote($needle, '/').'/usi', $haystack, $match);
4756 4756
 
4757 4757
     if (!isset($match[1])) {
4758 4758
       return false;
@@ -4810,7 +4810,7 @@  discard block
 block discarded – undo
4810 4810
         &&
4811 4811
         self::$support['mbstring'] === false
4812 4812
     ) {
4813
-      trigger_error('UTF8::strlen() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
4813
+      trigger_error('UTF8::strlen() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
4814 4814
     }
4815 4815
 
4816 4816
     if (self::$support['mbstring'] === true) {
@@ -4875,7 +4875,7 @@  discard block
 block discarded – undo
4875 4875
    */
4876 4876
   public static function strnatcmp($str1, $str2)
4877 4877
   {
4878
-    return $str1 . '' === $str2 . '' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
4878
+    return $str1.'' === $str2.'' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
4879 4879
   }
4880 4880
 
4881 4881
   /**
@@ -4936,7 +4936,7 @@  discard block
 block discarded – undo
4936 4936
       return false;
4937 4937
     }
4938 4938
 
4939
-    if (preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) {
4939
+    if (preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) {
4940 4940
       return substr($haystack, strpos($haystack, $m[0]));
4941 4941
     } else {
4942 4942
       return false;
@@ -5003,7 +5003,7 @@  discard block
 block discarded – undo
5003 5003
         &&
5004 5004
         self::$support['mbstring'] === false
5005 5005
     ) {
5006
-      trigger_error('UTF8::strpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5006
+      trigger_error('UTF8::strpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5007 5007
     }
5008 5008
 
5009 5009
     if (self::$support['mbstring'] === true) {
@@ -5205,7 +5205,7 @@  discard block
 block discarded – undo
5205 5205
         &&
5206 5206
         self::$support['mbstring'] === false
5207 5207
     ) {
5208
-      trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5208
+      trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5209 5209
     }
5210 5210
 
5211 5211
     if (self::$support['mbstring'] === true) {
@@ -5286,7 +5286,7 @@  discard block
 block discarded – undo
5286 5286
         &&
5287 5287
         self::$support['mbstring'] === false
5288 5288
     ) {
5289
-      trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5289
+      trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5290 5290
     }
5291 5291
 
5292 5292
     if (self::$support['mbstring'] === true) {
@@ -5346,7 +5346,7 @@  discard block
 block discarded – undo
5346 5346
       return 0;
5347 5347
     }
5348 5348
 
5349
-    return preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0;
5349
+    return preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0;
5350 5350
   }
5351 5351
 
5352 5352
   /**
@@ -5392,7 +5392,7 @@  discard block
 block discarded – undo
5392 5392
         &&
5393 5393
         self::$support['mbstring'] === false
5394 5394
     ) {
5395
-      trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5395
+      trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5396 5396
     }
5397 5397
 
5398 5398
     if (self::$support['mbstring'] === true) {
@@ -5409,7 +5409,7 @@  discard block
 block discarded – undo
5409 5409
       }
5410 5410
     }
5411 5411
 
5412
-    preg_match('/^(.*?)' . preg_quote($needle, '/') . '/us', $haystack, $match);
5412
+    preg_match('/^(.*?)'.preg_quote($needle, '/').'/us', $haystack, $match);
5413 5413
 
5414 5414
     if (!isset($match[1])) {
5415 5415
       return false;
@@ -5675,7 +5675,7 @@  discard block
 block discarded – undo
5675 5675
         &&
5676 5676
         self::$support['mbstring'] === false
5677 5677
     ) {
5678
-      trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5678
+      trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5679 5679
     }
5680 5680
 
5681 5681
     if (self::$support['mbstring'] === true) {
@@ -5784,14 +5784,14 @@  discard block
 block discarded – undo
5784 5784
         &&
5785 5785
         self::$support['mbstring'] === false
5786 5786
     ) {
5787
-      trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5787
+      trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5788 5788
     }
5789 5789
 
5790 5790
     if (self::$support['mbstring'] === true) {
5791 5791
       return \mb_substr_count($haystack, $needle, $encoding);
5792 5792
     }
5793 5793
 
5794
-    preg_match_all('/' . preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER);
5794
+    preg_match_all('/'.preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER);
5795 5795
 
5796 5796
     return count($matches);
5797 5797
   }
@@ -6038,7 +6038,7 @@  discard block
 block discarded – undo
6038 6038
 
6039 6039
     $strSwappedCase = preg_replace_callback(
6040 6040
         '/[\S]/u',
6041
-        function ($match) use ($encoding) {
6041
+        function($match) use ($encoding) {
6042 6042
           $marchToUpper = UTF8::strtoupper($match[0], $encoding);
6043 6043
 
6044 6044
           if ($match[0] === $marchToUpper) {
@@ -6220,7 +6220,7 @@  discard block
 block discarded – undo
6220 6220
 
6221 6221
       $bank = $ord >> 8;
6222 6222
       if (!array_key_exists($bank, (array)$UTF8_TO_ASCII)) {
6223
-        $bankfile = __DIR__ . '/data/' . sprintf('x%02x', $bank) . '.php';
6223
+        $bankfile = __DIR__.'/data/'.sprintf('x%02x', $bank).'.php';
6224 6224
         if (file_exists($bankfile)) {
6225 6225
           /** @noinspection PhpIncludeInspection */
6226 6226
           require $bankfile;
@@ -6341,40 +6341,40 @@  discard block
 block discarded – undo
6341 6341
         if ($c1 >= "\xc0" & $c1 <= "\xdf") { // looks like 2 bytes UTF8
6342 6342
 
6343 6343
           if ($c2 >= "\x80" && $c2 <= "\xbf") { // yeah, almost sure it's UTF8 already
6344
-            $buf .= $c1 . $c2;
6344
+            $buf .= $c1.$c2;
6345 6345
             $i++;
6346 6346
           } else { // not valid UTF8 - convert it
6347 6347
             $cc1 = (chr(ord($c1) / 64) | "\xc0");
6348 6348
             $cc2 = ($c1 & "\x3f") | "\x80";
6349
-            $buf .= $cc1 . $cc2;
6349
+            $buf .= $cc1.$cc2;
6350 6350
           }
6351 6351
 
6352 6352
         } elseif ($c1 >= "\xe0" & $c1 <= "\xef") { // looks like 3 bytes UTF8
6353 6353
 
6354 6354
           if ($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf") { // yeah, almost sure it's UTF8 already
6355
-            $buf .= $c1 . $c2 . $c3;
6355
+            $buf .= $c1.$c2.$c3;
6356 6356
             $i += 2;
6357 6357
           } else { // not valid UTF8 - convert it
6358 6358
             $cc1 = (chr(ord($c1) / 64) | "\xc0");
6359 6359
             $cc2 = ($c1 & "\x3f") | "\x80";
6360
-            $buf .= $cc1 . $cc2;
6360
+            $buf .= $cc1.$cc2;
6361 6361
           }
6362 6362
 
6363 6363
         } elseif ($c1 >= "\xf0" & $c1 <= "\xf7") { // looks like 4 bytes UTF8
6364 6364
 
6365 6365
           if ($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf" && $c4 >= "\x80" && $c4 <= "\xbf") { // yeah, almost sure it's UTF8 already
6366
-            $buf .= $c1 . $c2 . $c3 . $c4;
6366
+            $buf .= $c1.$c2.$c3.$c4;
6367 6367
             $i += 3;
6368 6368
           } else { // not valid UTF8 - convert it
6369 6369
             $cc1 = (chr(ord($c1) / 64) | "\xc0");
6370 6370
             $cc2 = ($c1 & "\x3f") | "\x80";
6371
-            $buf .= $cc1 . $cc2;
6371
+            $buf .= $cc1.$cc2;
6372 6372
           }
6373 6373
 
6374 6374
         } else { // doesn't look like UTF8, but should be converted
6375 6375
           $cc1 = (chr(ord($c1) / 64) | "\xc0");
6376 6376
           $cc2 = (($c1 & "\x3f") | "\x80");
6377
-          $buf .= $cc1 . $cc2;
6377
+          $buf .= $cc1.$cc2;
6378 6378
         }
6379 6379
 
6380 6380
       } elseif (($c1 & "\xc0") === "\x80") { // needs conversion
@@ -6385,7 +6385,7 @@  discard block
 block discarded – undo
6385 6385
         } else {
6386 6386
           $cc1 = (chr($ordC1 / 64) | "\xc0");
6387 6387
           $cc2 = (($c1 & "\x3f") | "\x80");
6388
-          $buf .= $cc1 . $cc2;
6388
+          $buf .= $cc1.$cc2;
6389 6389
         }
6390 6390
 
6391 6391
       } else { // it doesn't need conversion
@@ -6396,7 +6396,7 @@  discard block
 block discarded – undo
6396 6396
     // decode unicode escape sequences
6397 6397
     $buf = preg_replace_callback(
6398 6398
         '/\\\\u([0-9a-f]{4})/i',
6399
-        function ($match) {
6399
+        function($match) {
6400 6400
           return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');
6401 6401
         },
6402 6402
         $buf
@@ -6448,7 +6448,7 @@  discard block
 block discarded – undo
6448 6448
    */
6449 6449
   public static function ucfirst($str, $encoding = 'UTF-8', $cleanUtf8 = false)
6450 6450
   {
6451
-    return self::strtoupper(self::substr($str, 0, 1, $encoding, $cleanUtf8), $encoding, $cleanUtf8) . self::substr($str, 1, null, $encoding, $cleanUtf8);
6451
+    return self::strtoupper(self::substr($str, 0, 1, $encoding, $cleanUtf8), $encoding, $cleanUtf8).self::substr($str, 1, null, $encoding, $cleanUtf8);
6452 6452
   }
6453 6453
 
6454 6454
   /**
@@ -6926,7 +6926,7 @@  discard block
 block discarded – undo
6926 6926
       return '';
6927 6927
     }
6928 6928
 
6929
-    preg_match('/^\s*+(?:\S++\s*+){1,' . $words . '}/u', $str, $matches);
6929
+    preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $str, $matches);
6930 6930
 
6931 6931
     if (
6932 6932
         !isset($matches[0])
@@ -6936,7 +6936,7 @@  discard block
 block discarded – undo
6936 6936
       return $str;
6937 6937
     }
6938 6938
 
6939
-    return self::rtrim($matches[0]) . $strAddOn;
6939
+    return self::rtrim($matches[0]).$strAddOn;
6940 6940
   }
6941 6941
 
6942 6942
   /**
@@ -7004,7 +7004,7 @@  discard block
 block discarded – undo
7004 7004
       $strReturn .= $break;
7005 7005
     }
7006 7006
 
7007
-    return $strReturn . implode('', $chars);
7007
+    return $strReturn.implode('', $chars);
7008 7008
   }
7009 7009
 
7010 7010
   /**
Please login to merge, or discard this patch.