Completed
Push — master ( 545094...56f604 )
by Lars
02:43
created
src/voku/helper/data/xfa.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/x07.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/x31.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/x02.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/xd7.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/x0e.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/UTF8.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -969,16 +969,16 @@
 block discarded – undo
969 969
       $str = self::chr_and_parse_int($code_point);
970 970
     } elseif (0x800 > $code_point) {
971 971
       $str = self::chr_and_parse_int(0xC0 | $code_point >> 6) .
972
-             self::chr_and_parse_int(0x80 | $code_point & 0x3F);
972
+              self::chr_and_parse_int(0x80 | $code_point & 0x3F);
973 973
     } elseif (0x10000 > $code_point) {
974 974
       $str = self::chr_and_parse_int(0xE0 | $code_point >> 12) .
975
-             self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F) .
976
-             self::chr_and_parse_int(0x80 | $code_point & 0x3F);
975
+              self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F) .
976
+              self::chr_and_parse_int(0x80 | $code_point & 0x3F);
977 977
     } else {
978 978
       $str = self::chr_and_parse_int(0xF0 | $code_point >> 18) .
979
-             self::chr_and_parse_int(0x80 | $code_point >> 12 & 0x3F) .
980
-             self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F) .
981
-             self::chr_and_parse_int(0x80 | $code_point & 0x3F);
979
+              self::chr_and_parse_int(0x80 | $code_point >> 12 & 0x3F) .
980
+              self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F) .
981
+              self::chr_and_parse_int(0x80 | $code_point & 0x3F);
982 982
     }
983 983
 
984 984
     if ($encoding !== 'UTF-8') {
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2807,7 +2807,7 @@  discard block
 block discarded – undo
2807 2807
   /**
2808 2808
    * Check if the input is binary... (is look like a hack).
2809 2809
    *
2810
-   * @param mixed $input
2810
+   * @param string|false $input
2811 2811
    *
2812 2812
    * @return bool
2813 2813
    */
@@ -5631,7 +5631,7 @@  discard block
 block discarded – undo
5631 5631
    * @link http://php.net/manual/en/function.mb-strrpos.php
5632 5632
    *
5633 5633
    * @param string     $haystack  <p>The string being checked, for the last occurrence of needle</p>
5634
-   * @param string|int $needle    <p>The string to find in haystack.<br />Or a code point as int.</p>
5634
+   * @param string $needle    <p>The string to find in haystack.<br />Or a code point as int.</p>
5635 5635
    * @param int        $offset    [optional] <p>May be specified to begin searching an arbitrary number of characters
5636 5636
    *                              into the string. Negative values will stop searching at an arbitrary point prior to
5637 5637
    *                              the end of the string.
@@ -6304,8 +6304,8 @@  discard block
 block discarded – undo
6304 6304
    *
6305 6305
    * source: https://gist.github.com/stemar/8287074
6306 6306
    *
6307
-   * @param string|string[] $str              <p>The input string or an array of stings.</p>
6308
-   * @param string|string[] $replacement      <p>The replacement string or an array of stings.</p>
6307
+   * @param string $str              <p>The input string or an array of stings.</p>
6308
+   * @param string $replacement      <p>The replacement string or an array of stings.</p>
6309 6309
    * @param int|int[]       $start            <p>
6310 6310
    *                                          If start is positive, the replacing will begin at the start'th offset
6311 6311
    *                                          into string.
@@ -6313,7 +6313,7 @@  discard block
 block discarded – undo
6313 6313
    *                                          If start is negative, the replacing will begin at the start'th character
6314 6314
    *                                          from the end of string.
6315 6315
    *                                          </p>
6316
-   * @param int|int[]|void  $length           [optional] <p>If given and is positive, it represents the length of the
6316
+   * @param integer|null  $length           [optional] <p>If given and is positive, it represents the length of the
6317 6317
    *                                          portion of string which is to be replaced. If it is negative, it
6318 6318
    *                                          represents the number of characters from the end of string at which to
6319 6319
    *                                          stop replacing. If it is not given, then it will default to strlen(
@@ -6745,7 +6745,7 @@  discard block
 block discarded – undo
6745 6745
    * case.</li>
6746 6746
    * </ul>
6747 6747
    *
6748
-   * @param string|string[] $str                    <p>Any string or array.</p>
6748
+   * @param string|false $str                    <p>Any string or array.</p>
6749 6749
    * @param bool            $decodeHtmlEntityToUtf8 <p>Set to true, if you need to decode html-entities.</p>
6750 6750
    *
6751 6751
    * @return string|string[] <p>The UTF-8 encoded string.</p>
Please login to merge, or discard this patch.
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
   public static function add_bom_to_string($str)
851 851
   {
852 852
     if (self::string_has_bom($str) === false) {
853
-      $str = self::bom() . $str;
853
+      $str = self::bom().$str;
854 854
     }
855 855
 
856 856
     return $str;
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
 
968 968
     // use static cache, only if there is no support for "\IntlChar"
969 969
     static $CHAR_CACHE = array();
970
-    $cacheKey = $code_point . $encoding;
970
+    $cacheKey = $code_point.$encoding;
971 971
     if (isset($CHAR_CACHE[$cacheKey]) === true) {
972 972
       return $CHAR_CACHE[$cacheKey];
973 973
     }
@@ -975,16 +975,16 @@  discard block
 block discarded – undo
975 975
     if (0x80 > $code_point %= 0x200000) {
976 976
       $str = self::chr_and_parse_int($code_point);
977 977
     } elseif (0x800 > $code_point) {
978
-      $str = self::chr_and_parse_int(0xC0 | $code_point >> 6) .
978
+      $str = self::chr_and_parse_int(0xC0 | $code_point >> 6).
979 979
              self::chr_and_parse_int(0x80 | $code_point & 0x3F);
980 980
     } elseif (0x10000 > $code_point) {
981
-      $str = self::chr_and_parse_int(0xE0 | $code_point >> 12) .
982
-             self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F) .
981
+      $str = self::chr_and_parse_int(0xE0 | $code_point >> 12).
982
+             self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F).
983 983
              self::chr_and_parse_int(0x80 | $code_point & 0x3F);
984 984
     } else {
985
-      $str = self::chr_and_parse_int(0xF0 | $code_point >> 18) .
986
-             self::chr_and_parse_int(0x80 | $code_point >> 12 & 0x3F) .
987
-             self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F) .
985
+      $str = self::chr_and_parse_int(0xF0 | $code_point >> 18).
986
+             self::chr_and_parse_int(0x80 | $code_point >> 12 & 0x3F).
987
+             self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F).
988 988
              self::chr_and_parse_int(0x80 | $code_point & 0x3F);
989 989
     }
990 990
 
@@ -1044,7 +1044,7 @@  discard block
 block discarded – undo
1044 1044
     }
1045 1045
 
1046 1046
     return array_map(
1047
-        function ($data) {
1047
+        function($data) {
1048 1048
           return UTF8::strlen($data, '8BIT');
1049 1049
         },
1050 1050
         self::split($str)
@@ -1286,7 +1286,7 @@  discard block
 block discarded – undo
1286 1286
       $flags = ENT_QUOTES;
1287 1287
     }
1288 1288
 
1289
-    return self::html_entity_decode('&#' . $int . ';', $flags);
1289
+    return self::html_entity_decode('&#'.$int.';', $flags);
1290 1290
   }
1291 1291
 
1292 1292
   /**
@@ -1363,7 +1363,7 @@  discard block
 block discarded – undo
1363 1363
           &&
1364 1364
           self::$SUPPORT['mbstring'] === false
1365 1365
       ) {
1366
-        trigger_error('UTF8::encode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
1366
+        trigger_error('UTF8::encode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
1367 1367
       }
1368 1368
 
1369 1369
       $strEncoded = \mb_convert_encoding(
@@ -1572,7 +1572,7 @@  discard block
 block discarded – undo
1572 1572
           ) {
1573 1573
             // Prevent leading combining chars
1574 1574
             // for NFC-safe concatenations.
1575
-            $var = $leading_combining . $var;
1575
+            $var = $leading_combining.$var;
1576 1576
           }
1577 1577
         }
1578 1578
 
@@ -1995,7 +1995,7 @@  discard block
 block discarded – undo
1995 1995
    */
1996 1996
   private static function getData($file)
1997 1997
   {
1998
-    $file = __DIR__ . '/data/' . $file . '.php';
1998
+    $file = __DIR__.'/data/'.$file.'.php';
1999 1999
     if (file_exists($file)) {
2000 2000
       /** @noinspection PhpIncludeInspection */
2001 2001
       return require $file;
@@ -2140,7 +2140,7 @@  discard block
 block discarded – undo
2140 2140
     return implode(
2141 2141
         '',
2142 2142
         array_map(
2143
-            function ($data) use ($keepAsciiChars, $encoding) {
2143
+            function($data) use ($keepAsciiChars, $encoding) {
2144 2144
               return UTF8::single_chr_html_encode($data, $keepAsciiChars, $encoding);
2145 2145
             },
2146 2146
             self::split($str)
@@ -2259,7 +2259,7 @@  discard block
 block discarded – undo
2259 2259
 
2260 2260
       $str = preg_replace_callback(
2261 2261
           "/&#\d{2,6};/",
2262
-          function ($matches) use ($encoding) {
2262
+          function($matches) use ($encoding) {
2263 2263
             $returnTmp = \mb_convert_encoding($matches[0], $encoding, 'HTML-ENTITIES');
2264 2264
 
2265 2265
             if ($returnTmp !== '"' && $returnTmp !== "'") {
@@ -2583,9 +2583,9 @@  discard block
 block discarded – undo
2583 2583
     if ((int)$int === $int) {
2584 2584
       $hex = dechex($int);
2585 2585
 
2586
-      $hex = (strlen($hex) < 4 ? substr('0000' . $hex, -4) : $hex);
2586
+      $hex = (strlen($hex) < 4 ? substr('0000'.$hex, -4) : $hex);
2587 2587
 
2588
-      return $pfix . $hex;
2588
+      return $pfix.$hex;
2589 2589
     }
2590 2590
 
2591 2591
     return '';
@@ -3313,7 +3313,7 @@  discard block
 block discarded – undo
3313 3313
    */
3314 3314
   public static function lcfirst($str)
3315 3315
   {
3316
-    return self::strtolower(self::substr($str, 0, 1)) . self::substr($str, 1);
3316
+    return self::strtolower(self::substr($str, 0, 1)).self::substr($str, 1);
3317 3317
   }
3318 3318
 
3319 3319
   /**
@@ -3337,7 +3337,7 @@  discard block
 block discarded – undo
3337 3337
       return preg_replace('/^[\pZ\pC]+/u', '', $str);
3338 3338
     }
3339 3339
 
3340
-    return preg_replace('/^' . self::rxClass($chars) . '+/u', '', $str);
3340
+    return preg_replace('/^'.self::rxClass($chars).'+/u', '', $str);
3341 3341
   }
3342 3342
 
3343 3343
   /**
@@ -3873,7 +3873,7 @@  discard block
 block discarded – undo
3873 3873
     if (is_array($what) === true) {
3874 3874
       /** @noinspection ForeachSourceInspection */
3875 3875
       foreach ($what as $item) {
3876
-        $str = preg_replace('/(' . preg_quote($item, '/') . ')+/', $item, $str);
3876
+        $str = preg_replace('/('.preg_quote($item, '/').')+/', $item, $str);
3877 3877
       }
3878 3878
     }
3879 3879
 
@@ -3986,7 +3986,7 @@  discard block
 block discarded – undo
3986 3986
       return preg_replace('/[\pZ\pC]+$/u', '', $str);
3987 3987
     }
3988 3988
 
3989
-    return preg_replace('/' . self::rxClass($chars) . '+$/u', '', $str);
3989
+    return preg_replace('/'.self::rxClass($chars).'+$/u', '', $str);
3990 3990
   }
3991 3991
 
3992 3992
   /**
@@ -4001,7 +4001,7 @@  discard block
 block discarded – undo
4001 4001
   {
4002 4002
     static $RX_CLASSS_CACHE = array();
4003 4003
 
4004
-    $cacheKey = $s . $class;
4004
+    $cacheKey = $s.$class;
4005 4005
 
4006 4006
     if (isset($RX_CLASSS_CACHE[$cacheKey])) {
4007 4007
       return $RX_CLASSS_CACHE[$cacheKey];
@@ -4013,7 +4013,7 @@  discard block
 block discarded – undo
4013 4013
     /** @noinspection SuspiciousLoopInspection */
4014 4014
     foreach (self::str_split($s) as $s) {
4015 4015
       if ('-' === $s) {
4016
-        $class[0] = '-' . $class[0];
4016
+        $class[0] = '-'.$class[0];
4017 4017
       } elseif (!isset($s[2])) {
4018 4018
         $class[0] .= preg_quote($s, '/');
4019 4019
       } elseif (1 === self::strlen($s)) {
@@ -4024,13 +4024,13 @@  discard block
 block discarded – undo
4024 4024
     }
4025 4025
 
4026 4026
     if ($class[0]) {
4027
-      $class[0] = '[' . $class[0] . ']';
4027
+      $class[0] = '['.$class[0].']';
4028 4028
     }
4029 4029
 
4030 4030
     if (1 === count($class)) {
4031 4031
       $return = $class[0];
4032 4032
     } else {
4033
-      $return = '(?:' . implode('|', $class) . ')';
4033
+      $return = '(?:'.implode('|', $class).')';
4034 4034
     }
4035 4035
 
4036 4036
     $RX_CLASSS_CACHE[$cacheKey] = $return;
@@ -4048,7 +4048,7 @@  discard block
 block discarded – undo
4048 4048
     }
4049 4049
 
4050 4050
     foreach (self::$SUPPORT as $utf8Support) {
4051
-      echo $utf8Support . "\n<br>";
4051
+      echo $utf8Support."\n<br>";
4052 4052
     }
4053 4053
   }
4054 4054
 
@@ -4082,7 +4082,7 @@  discard block
 block discarded – undo
4082 4082
       $encoding = self::normalize_encoding($encoding, 'UTF-8');
4083 4083
     }
4084 4084
 
4085
-    return '&#' . self::ord($char, $encoding) . ';';
4085
+    return '&#'.self::ord($char, $encoding).';';
4086 4086
   }
4087 4087
 
4088 4088
   /**
@@ -4149,7 +4149,7 @@  discard block
 block discarded – undo
4149 4149
         ) {
4150 4150
 
4151 4151
           if (($str[$i + 1] & "\xC0") === "\x80") {
4152
-            $ret[] = $str[$i] . $str[$i + 1];
4152
+            $ret[] = $str[$i].$str[$i + 1];
4153 4153
 
4154 4154
             $i++;
4155 4155
           }
@@ -4165,7 +4165,7 @@  discard block
 block discarded – undo
4165 4165
               &&
4166 4166
               ($str[$i + 2] & "\xC0") === "\x80"
4167 4167
           ) {
4168
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2];
4168
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2];
4169 4169
 
4170 4170
             $i += 2;
4171 4171
           }
@@ -4183,7 +4183,7 @@  discard block
 block discarded – undo
4183 4183
               &&
4184 4184
               ($str[$i + 3] & "\xC0") === "\x80"
4185 4185
           ) {
4186
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3];
4186
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3];
4187 4187
 
4188 4188
             $i += 3;
4189 4189
           }
@@ -4196,7 +4196,7 @@  discard block
 block discarded – undo
4196 4196
       $ret = array_chunk($ret, $length);
4197 4197
 
4198 4198
       return array_map(
4199
-          function ($item) {
4199
+          function($item) {
4200 4200
             return implode('', $item);
4201 4201
           }, $ret
4202 4202
       );
@@ -4303,7 +4303,7 @@  discard block
 block discarded – undo
4303 4303
     foreach (self::$ICONV_ENCODING as $encodingTmp) {
4304 4304
       # INFO: //IGNORE and //TRANSLIT still throw notice
4305 4305
       /** @noinspection PhpUsageOfSilenceOperatorInspection */
4306
-      if (md5(@\iconv($encodingTmp, $encodingTmp . '//IGNORE', $str)) === $md5) {
4306
+      if (md5(@\iconv($encodingTmp, $encodingTmp.'//IGNORE', $str)) === $md5) {
4307 4307
         return $encodingTmp;
4308 4308
       }
4309 4309
     }
@@ -4393,7 +4393,7 @@  discard block
 block discarded – undo
4393 4393
       if ('' === $s .= '') {
4394 4394
         $s = '/^(?<=.)$/';
4395 4395
       } else {
4396
-        $s = '/' . preg_quote($s, '/') . '/ui';
4396
+        $s = '/'.preg_quote($s, '/').'/ui';
4397 4397
       }
4398 4398
     }
4399 4399
 
@@ -4451,7 +4451,7 @@  discard block
 block discarded – undo
4451 4451
     }
4452 4452
 
4453 4453
     if (self::substr($str, $length - 1, 1) === ' ') {
4454
-      return self::substr($str, 0, $length - 1) . $strAddOn;
4454
+      return self::substr($str, 0, $length - 1).$strAddOn;
4455 4455
     }
4456 4456
 
4457 4457
     $str = self::substr($str, 0, $length);
@@ -4460,9 +4460,9 @@  discard block
 block discarded – undo
4460 4460
     $new_str = implode(' ', $array);
4461 4461
 
4462 4462
     if ($new_str === '') {
4463
-      $str = self::substr($str, 0, $length - 1) . $strAddOn;
4463
+      $str = self::substr($str, 0, $length - 1).$strAddOn;
4464 4464
     } else {
4465
-      $str = $new_str . $strAddOn;
4465
+      $str = $new_str.$strAddOn;
4466 4466
     }
4467 4467
 
4468 4468
     return $str;
@@ -4517,7 +4517,7 @@  discard block
 block discarded – undo
4517 4517
           $pre = '';
4518 4518
       }
4519 4519
 
4520
-      return $pre . $str . $post;
4520
+      return $pre.$str.$post;
4521 4521
     }
4522 4522
 
4523 4523
     return $str;
@@ -4667,7 +4667,7 @@  discard block
 block discarded – undo
4667 4667
     }
4668 4668
 
4669 4669
     /** @noinspection PhpInternalEntityUsedInspection */
4670
-    preg_match_all('/' . Grapheme::GRAPHEME_CLUSTER_RX . '/u', $str, $a);
4670
+    preg_match_all('/'.Grapheme::GRAPHEME_CLUSTER_RX.'/u', $str, $a);
4671 4671
     $a = $a[0];
4672 4672
 
4673 4673
     if ($len === 1) {
@@ -4862,7 +4862,7 @@  discard block
 block discarded – undo
4862 4862
   public static function strcmp($str1, $str2)
4863 4863
   {
4864 4864
     /** @noinspection PhpUndefinedClassInspection */
4865
-    return $str1 . '' === $str2 . '' ? 0 : strcmp(
4865
+    return $str1.'' === $str2.'' ? 0 : strcmp(
4866 4866
         \Normalizer::normalize($str1, \Normalizer::NFD),
4867 4867
         \Normalizer::normalize($str2, \Normalizer::NFD)
4868 4868
     );
@@ -4893,7 +4893,7 @@  discard block
 block discarded – undo
4893 4893
       return null;
4894 4894
     }
4895 4895
 
4896
-    if (preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) {
4896
+    if (preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) {
4897 4897
       /** @noinspection OffsetOperationsInspection */
4898 4898
       return self::strlen($length[1]);
4899 4899
     }
@@ -5108,7 +5108,7 @@  discard block
 block discarded – undo
5108 5108
         &&
5109 5109
         self::$SUPPORT['mbstring'] === false
5110 5110
     ) {
5111
-      trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5111
+      trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5112 5112
     }
5113 5113
 
5114 5114
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5125,7 +5125,7 @@  discard block
 block discarded – undo
5125 5125
       return \grapheme_stristr($haystack, $needle, $before_needle);
5126 5126
     }
5127 5127
 
5128
-    preg_match('/^(.*?)' . preg_quote($needle, '/') . '/usi', $haystack, $match);
5128
+    preg_match('/^(.*?)'.preg_quote($needle, '/').'/usi', $haystack, $match);
5129 5129
 
5130 5130
     if (!isset($match[1])) {
5131 5131
       return false;
@@ -5199,7 +5199,7 @@  discard block
 block discarded – undo
5199 5199
         &&
5200 5200
         self::$SUPPORT['iconv'] === false
5201 5201
     ) {
5202
-      trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5202
+      trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5203 5203
     }
5204 5204
 
5205 5205
     if (
@@ -5274,7 +5274,7 @@  discard block
 block discarded – undo
5274 5274
    */
5275 5275
   public static function strnatcmp($str1, $str2)
5276 5276
   {
5277
-    return $str1 . '' === $str2 . '' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
5277
+    return $str1.'' === $str2.'' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
5278 5278
   }
5279 5279
 
5280 5280
   /**
@@ -5335,7 +5335,7 @@  discard block
 block discarded – undo
5335 5335
       return false;
5336 5336
     }
5337 5337
 
5338
-    if (preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) {
5338
+    if (preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) {
5339 5339
       return substr($haystack, strpos($haystack, $m[0]));
5340 5340
     }
5341 5341
 
@@ -5412,7 +5412,7 @@  discard block
 block discarded – undo
5412 5412
         &&
5413 5413
         self::$SUPPORT['mbstring'] === false
5414 5414
     ) {
5415
-      trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5415
+      trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5416 5416
     }
5417 5417
 
5418 5418
     if (
@@ -5631,7 +5631,7 @@  discard block
 block discarded – undo
5631 5631
         &&
5632 5632
         self::$SUPPORT['mbstring'] === false
5633 5633
     ) {
5634
-      trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5634
+      trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5635 5635
     }
5636 5636
 
5637 5637
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5714,7 +5714,7 @@  discard block
 block discarded – undo
5714 5714
         &&
5715 5715
         self::$SUPPORT['mbstring'] === false
5716 5716
     ) {
5717
-      trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5717
+      trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5718 5718
     }
5719 5719
 
5720 5720
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5774,7 +5774,7 @@  discard block
 block discarded – undo
5774 5774
       return 0;
5775 5775
     }
5776 5776
 
5777
-    return preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0;
5777
+    return preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0;
5778 5778
   }
5779 5779
 
5780 5780
   /**
@@ -5820,7 +5820,7 @@  discard block
 block discarded – undo
5820 5820
         &&
5821 5821
         self::$SUPPORT['mbstring'] === false
5822 5822
     ) {
5823
-      trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5823
+      trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5824 5824
     }
5825 5825
 
5826 5826
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5837,7 +5837,7 @@  discard block
 block discarded – undo
5837 5837
       return \grapheme_strstr($haystack, $needle, $before_needle);
5838 5838
     }
5839 5839
 
5840
-    preg_match('/^(.*?)' . preg_quote($needle, '/') . '/us', $haystack, $match);
5840
+    preg_match('/^(.*?)'.preg_quote($needle, '/').'/us', $haystack, $match);
5841 5841
 
5842 5842
     if (!isset($match[1])) {
5843 5843
       return false;
@@ -6109,7 +6109,7 @@  discard block
 block discarded – undo
6109 6109
         &&
6110 6110
         self::$SUPPORT['mbstring'] === false
6111 6111
     ) {
6112
-      trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
6112
+      trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
6113 6113
     }
6114 6114
 
6115 6115
     if (self::$SUPPORT['mbstring'] === true) {
@@ -6228,14 +6228,14 @@  discard block
 block discarded – undo
6228 6228
         &&
6229 6229
         self::$SUPPORT['mbstring'] === false
6230 6230
     ) {
6231
-      trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
6231
+      trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
6232 6232
     }
6233 6233
 
6234 6234
     if (self::$SUPPORT['mbstring'] === true) {
6235 6235
       return \mb_substr_count($haystack, $needle, $encoding);
6236 6236
     }
6237 6237
 
6238
-    preg_match_all('/' . preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER);
6238
+    preg_match_all('/'.preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER);
6239 6239
 
6240 6240
     return count($matches);
6241 6241
   }
@@ -6481,7 +6481,7 @@  discard block
 block discarded – undo
6481 6481
 
6482 6482
     $strSwappedCase = preg_replace_callback(
6483 6483
         '/[\S]/u',
6484
-        function ($match) use ($encoding) {
6484
+        function($match) use ($encoding) {
6485 6485
           $marchToUpper = UTF8::strtoupper($match[0], $encoding);
6486 6486
 
6487 6487
           if ($match[0] === $marchToUpper) {
@@ -6820,13 +6820,13 @@  discard block
 block discarded – undo
6820 6820
           $c2 = $i + 1 >= $max ? "\x00" : $str[$i + 1];
6821 6821
 
6822 6822
           if ($c2 >= "\x80" && $c2 <= "\xBF") { // yeah, almost sure it's UTF8 already
6823
-            $buf .= $c1 . $c2;
6823
+            $buf .= $c1.$c2;
6824 6824
             $i++;
6825 6825
           } else { // not valid UTF8 - convert it
6826 6826
             $cc1tmp = ord($c1) / 64;
6827 6827
             $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0";
6828 6828
             $cc2 = ($c1 & "\x3F") | "\x80";
6829
-            $buf .= $cc1 . $cc2;
6829
+            $buf .= $cc1.$cc2;
6830 6830
           }
6831 6831
 
6832 6832
         } elseif ($c1 >= "\xE0" && $c1 <= "\xEF") { // looks like 3 bytes UTF8
@@ -6835,13 +6835,13 @@  discard block
 block discarded – undo
6835 6835
           $c3 = $i + 2 >= $max ? "\x00" : $str[$i + 2];
6836 6836
 
6837 6837
           if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF") { // yeah, almost sure it's UTF8 already
6838
-            $buf .= $c1 . $c2 . $c3;
6838
+            $buf .= $c1.$c2.$c3;
6839 6839
             $i += 2;
6840 6840
           } else { // not valid UTF8 - convert it
6841 6841
             $cc1tmp = ord($c1) / 64;
6842 6842
             $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0";
6843 6843
             $cc2 = ($c1 & "\x3F") | "\x80";
6844
-            $buf .= $cc1 . $cc2;
6844
+            $buf .= $cc1.$cc2;
6845 6845
           }
6846 6846
 
6847 6847
         } elseif ($c1 >= "\xF0" && $c1 <= "\xF7") { // looks like 4 bytes UTF8
@@ -6851,20 +6851,20 @@  discard block
 block discarded – undo
6851 6851
           $c4 = $i + 3 >= $max ? "\x00" : $str[$i + 3];
6852 6852
 
6853 6853
           if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF" && $c4 >= "\x80" && $c4 <= "\xBF") { // yeah, almost sure it's UTF8 already
6854
-            $buf .= $c1 . $c2 . $c3 . $c4;
6854
+            $buf .= $c1.$c2.$c3.$c4;
6855 6855
             $i += 3;
6856 6856
           } else { // not valid UTF8 - convert it
6857 6857
             $cc1tmp = ord($c1) / 64;
6858 6858
             $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0";
6859 6859
             $cc2 = ($c1 & "\x3F") | "\x80";
6860
-            $buf .= $cc1 . $cc2;
6860
+            $buf .= $cc1.$cc2;
6861 6861
           }
6862 6862
 
6863 6863
         } else { // doesn't look like UTF8, but should be converted
6864 6864
           $cc1tmp = ord($c1) / 64;
6865 6865
           $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0";
6866 6866
           $cc2 = ($c1 & "\x3F") | "\x80";
6867
-          $buf .= $cc1 . $cc2;
6867
+          $buf .= $cc1.$cc2;
6868 6868
         }
6869 6869
 
6870 6870
       } elseif (($c1 & "\xC0") === "\x80") { // needs conversion
@@ -6875,7 +6875,7 @@  discard block
 block discarded – undo
6875 6875
         } else {
6876 6876
           $cc1 = self::chr_and_parse_int($ordC1 / 64) | "\xC0";
6877 6877
           $cc2 = ($c1 & "\x3F") | "\x80";
6878
-          $buf .= $cc1 . $cc2;
6878
+          $buf .= $cc1.$cc2;
6879 6879
         }
6880 6880
 
6881 6881
       } else { // it doesn't need conversion
@@ -6886,7 +6886,7 @@  discard block
 block discarded – undo
6886 6886
     // decode unicode escape sequences
6887 6887
     $buf = preg_replace_callback(
6888 6888
         '/\\\\u([0-9a-f]{4})/i',
6889
-        function ($match) {
6889
+        function($match) {
6890 6890
           return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');
6891 6891
         },
6892 6892
         $buf
@@ -6940,7 +6940,7 @@  discard block
 block discarded – undo
6940 6940
    */
6941 6941
   public static function ucfirst($str, $encoding = 'UTF-8', $cleanUtf8 = false)
6942 6942
   {
6943
-    return self::strtoupper(self::substr($str, 0, 1, $encoding, $cleanUtf8), $encoding, $cleanUtf8) . self::substr($str, 1, null, $encoding, $cleanUtf8);
6943
+    return self::strtoupper(self::substr($str, 0, 1, $encoding, $cleanUtf8), $encoding, $cleanUtf8).self::substr($str, 1, null, $encoding, $cleanUtf8);
6944 6944
   }
6945 6945
 
6946 6946
   /**
@@ -7447,7 +7447,7 @@  discard block
 block discarded – undo
7447 7447
       return '';
7448 7448
     }
7449 7449
 
7450
-    preg_match('/^\s*+(?:\S++\s*+){1,' . $words . '}/u', $str, $matches);
7450
+    preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $str, $matches);
7451 7451
 
7452 7452
     if (
7453 7453
         !isset($matches[0])
@@ -7457,7 +7457,7 @@  discard block
 block discarded – undo
7457 7457
       return $str;
7458 7458
     }
7459 7459
 
7460
-    return self::rtrim($matches[0]) . $strAddOn;
7460
+    return self::rtrim($matches[0]).$strAddOn;
7461 7461
   }
7462 7462
 
7463 7463
   /**
@@ -7525,7 +7525,7 @@  discard block
 block discarded – undo
7525 7525
       $strReturn .= $break;
7526 7526
     }
7527 7527
 
7528
-    return $strReturn . implode('', $chars);
7528
+    return $strReturn.implode('', $chars);
7529 7529
   }
7530 7530
 
7531 7531
   /**
Please login to merge, or discard this patch.