Completed
Push — master ( 0b28e0...215087 )
by Lars
12:28 queued 09:32
created
src/voku/helper/data/win1252_to_utf8.php 1 patch
Spacing   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@  discard block
 block discarded – undo
3 3
 static $data = array(
4 4
     0x80 => "\xe2\x82\xac", # €
5 5
     0x82 => "\xe2\x80\x9a", # ‚
6
-    0x83 => "\xc6\x92",     # ƒ
6
+    0x83 => "\xc6\x92", # ƒ
7 7
     0x84 => "\xe2\x80\x9e", # „
8 8
     0x85 => "\xe2\x80\xa6", # …
9 9
     0x86 => "\xe2\x80\xa0", # †
10 10
     0x87 => "\xe2\x80\xa1", # ‡
11
-    0x88 => "\xcb\x86",     # ˆ
11
+    0x88 => "\xcb\x86", # ˆ
12 12
     0x89 => "\xe2\x80\xb0", # ‰
13
-    0x8a => "\xc5\xa0",     # Š
13
+    0x8a => "\xc5\xa0", # Š
14 14
     0x8b => "\xe2\x80\xb9", # ‹
15
-    0x8c => "\xc5\x92",     # Œ
16
-    0x8e => "\xc5\xbd",     # Ž
15
+    0x8c => "\xc5\x92", # Œ
16
+    0x8e => "\xc5\xbd", # Ž
17 17
     0x91 => "\xe2\x80\x98", # ‘
18 18
     0x92 => "\xe2\x80\x99", # ’
19 19
     0x93 => "\xe2\x80\x9c", # “
@@ -21,110 +21,110 @@  discard block
 block discarded – undo
21 21
     0x95 => "\xe2\x80\xa2", # •
22 22
     0x96 => "\xe2\x80\x93", # –
23 23
     0x97 => "\xe2\x80\x94", # —
24
-    0x98 => "\xcb\x9c",     # ˜
24
+    0x98 => "\xcb\x9c", # ˜
25 25
     0x99 => "\xe2\x84\xa2", # ™
26
-    0x9a => "\xc5\xa1",     # š
26
+    0x9a => "\xc5\xa1", # š
27 27
     0x9b => "\xe2\x80\xba", # ›
28
-    0x9c => "\xc5\x93",     # œ
29
-    0x9e => "\xc5\xbe",     # ž
30
-    0x9f => "\xc5\xb8",     # Ÿ
31
-    0xa0 => "\xc2\xa0",     #
32
-    0xa1 => "\xc2\xa1",     # ¡
33
-    0xa2 => "\xc2\xa2",     # ¢
34
-    0xa3 => "\xc2\xa3",     # £
35
-    0xa4 => "\xc2\xa4",     # ¤
36
-    0xa5 => "\xc2\xa5",     # ¥
37
-    0xa6 => "\xc2\xa6",     # ¦
38
-    0xa7 => "\xc2\xa7",     # §
39
-    0xa8 => "\xc2\xa8",     # ¨
40
-    0xa9 => "\xc2\xa9",     # ©
41
-    0xaa => "\xc2\xaa",     # ª
42
-    0xab => "\xc2\xab",     # «
43
-    0xac => "\xc2\xac",     # ¬
44
-    0xad => "\xc2\xad",     # ­
45
-    0xae => "\xc2\xae",     # ®
46
-    0xaf => "\xc2\xaf",     # ¯
47
-    0xb0 => "\xc2\xb0",     # °
48
-    0xb1 => "\xc2\xb1",     # ±
49
-    0xb2 => "\xc2\xb2",     # ²
50
-    0xb3 => "\xc2\xb3",     # ³
51
-    0xb4 => "\xc2\xb4",     # ´
52
-    0xb5 => "\xc2\xb5",     # µ
53
-    0xb6 => "\xc2\xb6",     # ¶
54
-    0xb7 => "\xc2\xb7",     # ·
55
-    0xb8 => "\xc2\xb8",     # ¸
56
-    0xb9 => "\xc2\xb9",     # ¹
57
-    0xba => "\xc2\xba",     # º
58
-    0xbb => "\xc2\xbb",     # »
59
-    0xbc => "\xc2\xbc",     # ¼
60
-    0xbd => "\xc2\xbd",     # ½
61
-    0xbe => "\xc2\xbe",     # ¾
62
-    0xbf => "\xc2\xbf",     # ¿
63
-    0xc0 => "\xc3\x80",     # À
64
-    0xc1 => "\xc3\x81",     # Á
65
-    0xc2 => "\xc3\x82",     # Â
66
-    0xc3 => "\xc3\x83",     # Ã
67
-    0xc4 => "\xc3\x84",     # Ä
68
-    0xc5 => "\xc3\x85",     # Å
69
-    0xc6 => "\xc3\x86",     # Æ
70
-    0xc7 => "\xc3\x87",     # Ç
71
-    0xc8 => "\xc3\x88",     # È
72
-    0xc9 => "\xc3\x89",     # É
73
-    0xca => "\xc3\x8a",     # Ê
74
-    0xcb => "\xc3\x8b",     # Ë
75
-    0xcc => "\xc3\x8c",     # Ì
76
-    0xcd => "\xc3\x8d",     # Í
77
-    0xce => "\xc3\x8e",     # Î
78
-    0xcf => "\xc3\x8f",     # Ï
79
-    0xd0 => "\xc3\x90",     # Ð
80
-    0xd1 => "\xc3\x91",     # Ñ
81
-    0xd2 => "\xc3\x92",     # Ò
82
-    0xd3 => "\xc3\x93",     # Ó
83
-    0xd4 => "\xc3\x94",     # Ô
84
-    0xd5 => "\xc3\x95",     # Õ
85
-    0xd6 => "\xc3\x96",     # Ö
86
-    0xd7 => "\xc3\x97",     # ×
87
-    0xd8 => "\xc3\x98",     # Ø
88
-    0xd9 => "\xc3\x99",     # Ù
89
-    0xda => "\xc3\x9a",     # Ú
90
-    0xdb => "\xc3\x9b",     # Û
91
-    0xdc => "\xc3\x9c",     # Ü
92
-    0xdd => "\xc3\x9d",     # Ý
93
-    0xde => "\xc3\x9e",     # Þ
94
-    0xdf => "\xc3\x9f",     # ß
95
-    0xe0 => "\xc3\xa0",     # à
96
-    0xe1 => "\xa1",         # á
97
-    0xe2 => "\xc3\xa2",     # â
98
-    0xe3 => "\xc3\xa3",     # ã
99
-    0xe4 => "\xc3\xa4",     # ä
100
-    0xe5 => "\xc3\xa5",     # å
101
-    0xe6 => "\xc3\xa6",     # æ
102
-    0xe7 => "\xc3\xa7",     # ç
103
-    0xe8 => "\xc3\xa8",     # è
104
-    0xe9 => "\xc3\xa9",     # é
105
-    0xea => "\xc3\xaa",     # ê
106
-    0xeb => "\xc3\xab",     # ë
107
-    0xec => "\xc3\xac",     # ì
108
-    0xed => "\xc3\xad",     # í
109
-    0xee => "\xc3\xae",     # î
110
-    0xef => "\xc3\xaf",     # ï
111
-    0xf0 => "\xc3\xb0",     # ð
112
-    0xf1 => "\xc3\xb1",     # ñ
113
-    0xf2 => "\xc3\xb2",     # ò
114
-    0xf3 => "\xc3\xb3",     # ó
115
-    0xf4 => "\xc3\xb4",     # ô
116
-    0xf5 => "\xc3\xb5",     # õ
117
-    0xf6 => "\xc3\xb6",     # ö
118
-    0xf7 => "\xc3\xb7",     # ÷
119
-    0xf8 => "\xc3\xb8",     # ø
120
-    0xf9 => "\xc3\xb9",     # ù
121
-    0xfa => "\xc3\xba",     # ú
122
-    0xfb => "\xc3\xbb",     # û
123
-    0xfc => "\xc3\xbc",     # ü
124
-    0xfd => "\xc3\xbd",     # ý
125
-    0xfe => "\xc3\xbe",     # þ
28
+    0x9c => "\xc5\x93", # œ
29
+    0x9e => "\xc5\xbe", # ž
30
+    0x9f => "\xc5\xb8", # Ÿ
31
+    0xa0 => "\xc2\xa0", #
32
+    0xa1 => "\xc2\xa1", # ¡
33
+    0xa2 => "\xc2\xa2", # ¢
34
+    0xa3 => "\xc2\xa3", # £
35
+    0xa4 => "\xc2\xa4", # ¤
36
+    0xa5 => "\xc2\xa5", # ¥
37
+    0xa6 => "\xc2\xa6", # ¦
38
+    0xa7 => "\xc2\xa7", # §
39
+    0xa8 => "\xc2\xa8", # ¨
40
+    0xa9 => "\xc2\xa9", # ©
41
+    0xaa => "\xc2\xaa", # ª
42
+    0xab => "\xc2\xab", # «
43
+    0xac => "\xc2\xac", # ¬
44
+    0xad => "\xc2\xad", # ­
45
+    0xae => "\xc2\xae", # ®
46
+    0xaf => "\xc2\xaf", # ¯
47
+    0xb0 => "\xc2\xb0", # °
48
+    0xb1 => "\xc2\xb1", # ±
49
+    0xb2 => "\xc2\xb2", # ²
50
+    0xb3 => "\xc2\xb3", # ³
51
+    0xb4 => "\xc2\xb4", # ´
52
+    0xb5 => "\xc2\xb5", # µ
53
+    0xb6 => "\xc2\xb6", # ¶
54
+    0xb7 => "\xc2\xb7", # ·
55
+    0xb8 => "\xc2\xb8", # ¸
56
+    0xb9 => "\xc2\xb9", # ¹
57
+    0xba => "\xc2\xba", # º
58
+    0xbb => "\xc2\xbb", # »
59
+    0xbc => "\xc2\xbc", # ¼
60
+    0xbd => "\xc2\xbd", # ½
61
+    0xbe => "\xc2\xbe", # ¾
62
+    0xbf => "\xc2\xbf", # ¿
63
+    0xc0 => "\xc3\x80", # À
64
+    0xc1 => "\xc3\x81", # Á
65
+    0xc2 => "\xc3\x82", # Â
66
+    0xc3 => "\xc3\x83", # Ã
67
+    0xc4 => "\xc3\x84", # Ä
68
+    0xc5 => "\xc3\x85", # Å
69
+    0xc6 => "\xc3\x86", # Æ
70
+    0xc7 => "\xc3\x87", # Ç
71
+    0xc8 => "\xc3\x88", # È
72
+    0xc9 => "\xc3\x89", # É
73
+    0xca => "\xc3\x8a", # Ê
74
+    0xcb => "\xc3\x8b", # Ë
75
+    0xcc => "\xc3\x8c", # Ì
76
+    0xcd => "\xc3\x8d", # Í
77
+    0xce => "\xc3\x8e", # Î
78
+    0xcf => "\xc3\x8f", # Ï
79
+    0xd0 => "\xc3\x90", # Ð
80
+    0xd1 => "\xc3\x91", # Ñ
81
+    0xd2 => "\xc3\x92", # Ò
82
+    0xd3 => "\xc3\x93", # Ó
83
+    0xd4 => "\xc3\x94", # Ô
84
+    0xd5 => "\xc3\x95", # Õ
85
+    0xd6 => "\xc3\x96", # Ö
86
+    0xd7 => "\xc3\x97", # ×
87
+    0xd8 => "\xc3\x98", # Ø
88
+    0xd9 => "\xc3\x99", # Ù
89
+    0xda => "\xc3\x9a", # Ú
90
+    0xdb => "\xc3\x9b", # Û
91
+    0xdc => "\xc3\x9c", # Ü
92
+    0xdd => "\xc3\x9d", # Ý
93
+    0xde => "\xc3\x9e", # Þ
94
+    0xdf => "\xc3\x9f", # ß
95
+    0xe0 => "\xc3\xa0", # à
96
+    0xe1 => "\xa1", # á
97
+    0xe2 => "\xc3\xa2", # â
98
+    0xe3 => "\xc3\xa3", # ã
99
+    0xe4 => "\xc3\xa4", # ä
100
+    0xe5 => "\xc3\xa5", # å
101
+    0xe6 => "\xc3\xa6", # æ
102
+    0xe7 => "\xc3\xa7", # ç
103
+    0xe8 => "\xc3\xa8", # è
104
+    0xe9 => "\xc3\xa9", # é
105
+    0xea => "\xc3\xaa", # ê
106
+    0xeb => "\xc3\xab", # ë
107
+    0xec => "\xc3\xac", # ì
108
+    0xed => "\xc3\xad", # í
109
+    0xee => "\xc3\xae", # î
110
+    0xef => "\xc3\xaf", # ï
111
+    0xf0 => "\xc3\xb0", # ð
112
+    0xf1 => "\xc3\xb1", # ñ
113
+    0xf2 => "\xc3\xb2", # ò
114
+    0xf3 => "\xc3\xb3", # ó
115
+    0xf4 => "\xc3\xb4", # ô
116
+    0xf5 => "\xc3\xb5", # õ
117
+    0xf6 => "\xc3\xb6", # ö
118
+    0xf7 => "\xc3\xb7", # ÷
119
+    0xf8 => "\xc3\xb8", # ø
120
+    0xf9 => "\xc3\xb9", # ù
121
+    0xfa => "\xc3\xba", # ú
122
+    0xfb => "\xc3\xbb", # û
123
+    0xfc => "\xc3\xbc", # ü
124
+    0xfd => "\xc3\xbd", # ý
125
+    0xfe => "\xc3\xbe", # þ
126 126
 );
127 127
 
128
-$result =& $data;
128
+$result = & $data;
129 129
 unset($data);
130 130
 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)
@@ -1602,7 +1602,7 @@  discard block
 block discarded – undo
1602 1602
         &&
1603 1603
         self::$SUPPORT['mbstring'] === false
1604 1604
     ) {
1605
-      trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
1605
+      trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
1606 1606
     }
1607 1607
 
1608 1608
     do {
@@ -1610,7 +1610,7 @@  discard block
 block discarded – undo
1610 1610
 
1611 1611
       $str = \preg_replace_callback(
1612 1612
           "/&#\d{2,6};/",
1613
-          function ($matches) use ($encoding) {
1613
+          function($matches) use ($encoding) {
1614 1614
             $returnTmp = \mb_convert_encoding($matches[0], $encoding, 'HTML-ENTITIES');
1615 1615
 
1616 1616
             if ($returnTmp !== '"' && $returnTmp !== "'") {
@@ -1932,9 +1932,9 @@  discard block
 block discarded – undo
1932 1932
   {
1933 1933
     $hex = \dechex($int);
1934 1934
 
1935
-    $hex = (\strlen($hex) < 4 ? \substr('0000' . $hex, -4) : $hex);
1935
+    $hex = (\strlen($hex) < 4 ? \substr('0000'.$hex, -4) : $hex);
1936 1936
 
1937
-    return $pfix . $hex;
1937
+    return $pfix.$hex;
1938 1938
   }
1939 1939
 
1940 1940
   /**
@@ -2641,7 +2641,7 @@  discard block
 block discarded – undo
2641 2641
         $cleanUtf8
2642 2642
     );
2643 2643
 
2644
-    return $strPartOne . $strPartTwo;
2644
+    return $strPartOne.$strPartTwo;
2645 2645
   }
2646 2646
 
2647 2647
   /**
@@ -2729,7 +2729,7 @@  discard block
 block discarded – undo
2729 2729
       return \preg_replace('/^[\pZ\pC]+/u', '', $str);
2730 2730
     }
2731 2731
 
2732
-    return \preg_replace('/^' . self::rxClass($chars) . '+/u', '', $str);
2732
+    return \preg_replace('/^'.self::rxClass($chars).'+/u', '', $str);
2733 2733
   }
2734 2734
 
2735 2735
   /**
@@ -3062,7 +3062,7 @@  discard block
 block discarded – undo
3062 3062
       }
3063 3063
     }
3064 3064
 
3065
-    $cacheKey = $chr_orig . $encoding;
3065
+    $cacheKey = $chr_orig.$encoding;
3066 3066
     if (isset($CHAR_CACHE[$cacheKey]) === true) {
3067 3067
       return $CHAR_CACHE[$cacheKey];
3068 3068
     }
@@ -3289,7 +3289,7 @@  discard block
 block discarded – undo
3289 3289
     if (\is_array($what) === true) {
3290 3290
       /** @noinspection ForeachSourceInspection */
3291 3291
       foreach ($what as $item) {
3292
-        $str = \preg_replace('/(' . \preg_quote($item, '/') . ')+/', $item, $str);
3292
+        $str = \preg_replace('/('.\preg_quote($item, '/').')+/', $item, $str);
3293 3293
       }
3294 3294
     }
3295 3295
 
@@ -3399,7 +3399,7 @@  discard block
 block discarded – undo
3399 3399
       return \preg_replace('/[\pZ\pC]+$/u', '', $str);
3400 3400
     }
3401 3401
 
3402
-    return \preg_replace('/' . self::rxClass($chars) . '+$/u', '', $str);
3402
+    return \preg_replace('/'.self::rxClass($chars).'+$/u', '', $str);
3403 3403
   }
3404 3404
 
3405 3405
   /**
@@ -3414,7 +3414,7 @@  discard block
 block discarded – undo
3414 3414
   {
3415 3415
     static $RX_CLASSS_CACHE = [];
3416 3416
 
3417
-    $cacheKey = $s . $class;
3417
+    $cacheKey = $s.$class;
3418 3418
 
3419 3419
     if (isset($RX_CLASSS_CACHE[$cacheKey])) {
3420 3420
       return $RX_CLASSS_CACHE[$cacheKey];
@@ -3426,7 +3426,7 @@  discard block
 block discarded – undo
3426 3426
     /** @noinspection SuspiciousLoopInspection */
3427 3427
     foreach (self::str_split($s) as $s) {
3428 3428
       if ('-' === $s) {
3429
-        $class[0] = '-' . $class[0];
3429
+        $class[0] = '-'.$class[0];
3430 3430
       } elseif (!isset($s[2])) {
3431 3431
         $class[0] .= \preg_quote($s, '/');
3432 3432
       } elseif (1 === self::strlen($s)) {
@@ -3437,13 +3437,13 @@  discard block
 block discarded – undo
3437 3437
     }
3438 3438
 
3439 3439
     if ($class[0]) {
3440
-      $class[0] = '[' . $class[0] . ']';
3440
+      $class[0] = '['.$class[0].']';
3441 3441
     }
3442 3442
 
3443 3443
     if (1 === \count($class)) {
3444 3444
       $return = $class[0];
3445 3445
     } else {
3446
-      $return = '(?:' . \implode('|', $class) . ')';
3446
+      $return = '(?:'.\implode('|', $class).')';
3447 3447
     }
3448 3448
 
3449 3449
     $RX_CLASSS_CACHE[$cacheKey] = $return;
@@ -3462,7 +3462,7 @@  discard block
 block discarded – undo
3462 3462
 
3463 3463
     echo '<pre>';
3464 3464
     foreach (self::$SUPPORT as $key => $value) {
3465
-      echo $key . ' - ' . \print_r($value, true) . "\n<br>";
3465
+      echo $key.' - '.\print_r($value, true)."\n<br>";
3466 3466
     }
3467 3467
     echo '</pre>';
3468 3468
   }
@@ -3494,7 +3494,7 @@  discard block
 block discarded – undo
3494 3494
       $encoding = self::normalize_encoding($encoding, 'UTF-8');
3495 3495
     }
3496 3496
 
3497
-    return '&#' . self::ord($char, $encoding) . ';';
3497
+    return '&#'.self::ord($char, $encoding).';';
3498 3498
   }
3499 3499
 
3500 3500
   /**
@@ -3555,7 +3555,7 @@  discard block
 block discarded – undo
3555 3555
         ) {
3556 3556
 
3557 3557
           if (($str[$i + 1] & "\xC0") === "\x80") {
3558
-            $ret[] = $str[$i] . $str[$i + 1];
3558
+            $ret[] = $str[$i].$str[$i + 1];
3559 3559
 
3560 3560
             $i++;
3561 3561
           }
@@ -3571,7 +3571,7 @@  discard block
 block discarded – undo
3571 3571
               &&
3572 3572
               ($str[$i + 2] & "\xC0") === "\x80"
3573 3573
           ) {
3574
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2];
3574
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2];
3575 3575
 
3576 3576
             $i += 2;
3577 3577
           }
@@ -3589,7 +3589,7 @@  discard block
 block discarded – undo
3589 3589
               &&
3590 3590
               ($str[$i + 3] & "\xC0") === "\x80"
3591 3591
           ) {
3592
-            $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3];
3592
+            $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3];
3593 3593
 
3594 3594
             $i += 3;
3595 3595
           }
@@ -3602,7 +3602,7 @@  discard block
 block discarded – undo
3602 3602
       $ret = \array_chunk($ret, $length);
3603 3603
 
3604 3604
       return \array_map(
3605
-          function ($item) {
3605
+          function($item) {
3606 3606
             return \implode('', $item);
3607 3607
           }, $ret
3608 3608
       );
@@ -3712,7 +3712,7 @@  discard block
 block discarded – undo
3712 3712
     foreach (self::$ENCODINGS as $encodingTmp) {
3713 3713
       # INFO: //IGNORE and //TRANSLIT still throw notice
3714 3714
       /** @noinspection PhpUsageOfSilenceOperatorInspection */
3715
-      if (\md5(@\iconv($encodingTmp, $encodingTmp . '//IGNORE', $str)) === $md5) {
3715
+      if (\md5(@\iconv($encodingTmp, $encodingTmp.'//IGNORE', $str)) === $md5) {
3716 3716
         return $encodingTmp;
3717 3717
       }
3718 3718
     }
@@ -3796,7 +3796,7 @@  discard block
 block discarded – undo
3796 3796
       if ('' === $s .= '') {
3797 3797
         $s = '/^(?<=.)$/';
3798 3798
       } else {
3799
-        $s = '/' . \preg_quote($s, '/') . '/ui';
3799
+        $s = '/'.\preg_quote($s, '/').'/ui';
3800 3800
       }
3801 3801
     }
3802 3802
 
@@ -3847,7 +3847,7 @@  discard block
 block discarded – undo
3847 3847
     }
3848 3848
 
3849 3849
     if (self::substr($str, $length - 1, 1) === ' ') {
3850
-      return (string)self::substr($str, 0, $length - 1) . $strAddOn;
3850
+      return (string)self::substr($str, 0, $length - 1).$strAddOn;
3851 3851
     }
3852 3852
 
3853 3853
     $str = (string)self::substr($str, 0, $length);
@@ -3856,9 +3856,9 @@  discard block
 block discarded – undo
3856 3856
     $new_str = \implode(' ', $array);
3857 3857
 
3858 3858
     if ($new_str === '') {
3859
-      $str = (string)self::substr($str, 0, $length - 1) . $strAddOn;
3859
+      $str = (string)self::substr($str, 0, $length - 1).$strAddOn;
3860 3860
     } else {
3861
-      $str = $new_str . $strAddOn;
3861
+      $str = $new_str.$strAddOn;
3862 3862
     }
3863 3863
 
3864 3864
     return $str;
@@ -3913,7 +3913,7 @@  discard block
 block discarded – undo
3913 3913
           $pre = '';
3914 3914
       }
3915 3915
 
3916
-      return $pre . $str . $post;
3916
+      return $pre.$str.$post;
3917 3917
     }
3918 3918
 
3919 3919
     return $str;
@@ -3973,7 +3973,7 @@  discard block
 block discarded – undo
3973 3973
    *
3974 3974
    * @return mixed <p>This function returns a string or an array with the replaced values.</p>
3975 3975
    */
3976
-  public static function str_replace($search, $replace, $subject, int &$count = null)
3976
+  public static function str_replace($search, $replace, $subject, int & $count = null)
3977 3977
   {
3978 3978
     return \str_replace($search, $replace, $subject, $count);
3979 3979
   }
@@ -4067,7 +4067,7 @@  discard block
 block discarded – undo
4067 4067
     }
4068 4068
 
4069 4069
     /** @noinspection PhpInternalEntityUsedInspection */
4070
-    \preg_match_all('/' . self::GRAPHEME_CLUSTER_RX . '/u', $str, $a);
4070
+    \preg_match_all('/'.self::GRAPHEME_CLUSTER_RX.'/u', $str, $a);
4071 4071
     $a = $a[0];
4072 4072
 
4073 4073
     if ($len === 1) {
@@ -4292,7 +4292,7 @@  discard block
 block discarded – undo
4292 4292
   public static function strcmp(string $str1, string $str2): int
4293 4293
   {
4294 4294
     /** @noinspection PhpUndefinedClassInspection */
4295
-    return $str1 . '' === $str2 . '' ? 0 : \strcmp(
4295
+    return $str1.'' === $str2.'' ? 0 : \strcmp(
4296 4296
         \Normalizer::normalize($str1, \Normalizer::NFD),
4297 4297
         \Normalizer::normalize($str2, \Normalizer::NFD)
4298 4298
     );
@@ -4326,7 +4326,7 @@  discard block
 block discarded – undo
4326 4326
       return null;
4327 4327
     }
4328 4328
 
4329
-    if (\preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) {
4329
+    if (\preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) {
4330 4330
       return self::strlen($length[1]);
4331 4331
     }
4332 4332
 
@@ -4518,7 +4518,7 @@  discard block
 block discarded – undo
4518 4518
         &&
4519 4519
         self::$SUPPORT['mbstring'] === false
4520 4520
     ) {
4521
-      trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
4521
+      trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
4522 4522
     }
4523 4523
 
4524 4524
     if (self::$SUPPORT['mbstring'] === true) {
@@ -4537,7 +4537,7 @@  discard block
 block discarded – undo
4537 4537
       return \stristr($haystack, $needle, $before_needle);
4538 4538
     }
4539 4539
 
4540
-    \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/usi', $haystack, $match);
4540
+    \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/usi', $haystack, $match);
4541 4541
 
4542 4542
     if (!isset($match[1])) {
4543 4543
       return false;
@@ -4604,7 +4604,7 @@  discard block
 block discarded – undo
4604 4604
         &&
4605 4605
         self::$SUPPORT['iconv'] === false
4606 4606
     ) {
4607
-      trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
4607
+      trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
4608 4608
     }
4609 4609
 
4610 4610
     if (
@@ -4708,7 +4708,7 @@  discard block
 block discarded – undo
4708 4708
    */
4709 4709
   public static function strnatcmp(string $str1, string $str2): int
4710 4710
   {
4711
-    return $str1 . '' === $str2 . '' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
4711
+    return $str1.'' === $str2.'' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2));
4712 4712
   }
4713 4713
 
4714 4714
   /**
@@ -4766,7 +4766,7 @@  discard block
 block discarded – undo
4766 4766
       return false;
4767 4767
     }
4768 4768
 
4769
-    if (\preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) {
4769
+    if (\preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) {
4770 4770
       return \substr($haystack, \strpos($haystack, $m[0]));
4771 4771
     }
4772 4772
 
@@ -4830,7 +4830,7 @@  discard block
 block discarded – undo
4830 4830
         &&
4831 4831
         self::$SUPPORT['mbstring'] === false
4832 4832
     ) {
4833
-      trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
4833
+      trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
4834 4834
     }
4835 4835
 
4836 4836
     if (
@@ -5051,7 +5051,7 @@  discard block
 block discarded – undo
5051 5051
         &&
5052 5052
         self::$SUPPORT['mbstring'] === false
5053 5053
     ) {
5054
-      trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5054
+      trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5055 5055
     }
5056 5056
 
5057 5057
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5122,7 +5122,7 @@  discard block
 block discarded – undo
5122 5122
         &&
5123 5123
         self::$SUPPORT['mbstring'] === false
5124 5124
     ) {
5125
-      trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5125
+      trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5126 5126
     }
5127 5127
 
5128 5128
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5187,7 +5187,7 @@  discard block
 block discarded – undo
5187 5187
       return 0;
5188 5188
     }
5189 5189
 
5190
-    return \preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0;
5190
+    return \preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0;
5191 5191
   }
5192 5192
 
5193 5193
   /**
@@ -5230,7 +5230,7 @@  discard block
 block discarded – undo
5230 5230
         &&
5231 5231
         self::$SUPPORT['mbstring'] === false
5232 5232
     ) {
5233
-      trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5233
+      trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5234 5234
     }
5235 5235
 
5236 5236
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5245,7 +5245,7 @@  discard block
 block discarded – undo
5245 5245
       return \grapheme_strstr($haystack, $needle, $before_needle);
5246 5246
     }
5247 5247
 
5248
-    \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/us', $haystack, $match);
5248
+    \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/us', $haystack, $match);
5249 5249
 
5250 5250
     if (!isset($match[1])) {
5251 5251
       return false;
@@ -5342,9 +5342,9 @@  discard block
 block discarded – undo
5342 5342
 
5343 5343
       if (self::$SUPPORT['intl'] === true) {
5344 5344
 
5345
-        $langCode = $lang . '-Lower';
5345
+        $langCode = $lang.'-Lower';
5346 5346
         if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) {
5347
-          trigger_error('UTF8::strtolower() without intl for special language: ' . $lang, E_USER_WARNING);
5347
+          trigger_error('UTF8::strtolower() without intl for special language: '.$lang, E_USER_WARNING);
5348 5348
 
5349 5349
           $langCode = 'Any-Lower';
5350 5350
         }
@@ -5352,7 +5352,7 @@  discard block
 block discarded – undo
5352 5352
         return transliterator_transliterate($langCode, $str);
5353 5353
       }
5354 5354
 
5355
-      trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING);
5355
+      trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING);
5356 5356
     }
5357 5357
 
5358 5358
     return \mb_strtolower($str, $encoding);
@@ -5407,9 +5407,9 @@  discard block
 block discarded – undo
5407 5407
 
5408 5408
       if (self::$SUPPORT['intl'] === true) {
5409 5409
 
5410
-        $langCode = $lang . '-Upper';
5410
+        $langCode = $lang.'-Upper';
5411 5411
         if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) {
5412
-          trigger_error('UTF8::strtoupper() without intl for special language: ' . $lang, E_USER_WARNING);
5412
+          trigger_error('UTF8::strtoupper() without intl for special language: '.$lang, E_USER_WARNING);
5413 5413
 
5414 5414
           $langCode = 'Any-Upper';
5415 5415
         }
@@ -5417,7 +5417,7 @@  discard block
 block discarded – undo
5417 5417
         return transliterator_transliterate($langCode, $str);
5418 5418
       }
5419 5419
 
5420
-      trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING);
5420
+      trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING);
5421 5421
     }
5422 5422
 
5423 5423
     return \mb_strtoupper($str, $encoding);
@@ -5601,7 +5601,7 @@  discard block
 block discarded – undo
5601 5601
         &&
5602 5602
         self::$SUPPORT['mbstring'] === false
5603 5603
     ) {
5604
-      trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5604
+      trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5605 5605
     }
5606 5606
 
5607 5607
     if (self::$SUPPORT['mbstring'] === true) {
@@ -5629,8 +5629,7 @@  discard block
 block discarded – undo
5629 5629
 
5630 5630
     if (self::is_ascii($str)) {
5631 5631
       return ($length === null) ?
5632
-          \substr($str, $offset) :
5633
-          \substr($str, $offset, $length);
5632
+          \substr($str, $offset) : \substr($str, $offset, $length);
5634 5633
     }
5635 5634
 
5636 5635
     // fallback via vanilla php
@@ -5758,14 +5757,14 @@  discard block
 block discarded – undo
5758 5757
         &&
5759 5758
         self::$SUPPORT['mbstring'] === false
5760 5759
     ) {
5761
-      trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING);
5760
+      trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING);
5762 5761
     }
5763 5762
 
5764 5763
     if (self::$SUPPORT['mbstring'] === true) {
5765 5764
       return \mb_substr_count($haystack, $needle, $encoding);
5766 5765
     }
5767 5766
 
5768
-    \preg_match_all('/' . \preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER);
5767
+    \preg_match_all('/'.\preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER);
5769 5768
 
5770 5769
     return \count($matches);
5771 5770
   }
@@ -5943,8 +5942,7 @@  discard block
 block discarded – undo
5943 5942
 
5944 5943
     if (self::is_ascii($str)) {
5945 5944
       return ($length === null) ?
5946
-          \substr_replace($str, $replacement, $offset) :
5947
-          \substr_replace($str, $replacement, $offset, $length);
5945
+          \substr_replace($str, $replacement, $offset) : \substr_replace($str, $replacement, $offset, $length);
5948 5946
     }
5949 5947
 
5950 5948
     \preg_match_all('/./us', $str, $smatches);
@@ -6015,7 +6013,7 @@  discard block
 block discarded – undo
6015 6013
 
6016 6014
     $strSwappedCase = \preg_replace_callback(
6017 6015
         '/[\S]/u',
6018
-        function ($match) use ($encoding) {
6016
+        function($match) use ($encoding) {
6019 6017
           $marchToUpper = UTF8::strtoupper($match[0], $encoding);
6020 6018
 
6021 6019
           if ($match[0] === $marchToUpper) {
@@ -6341,7 +6339,7 @@  discard block
 block discarded – undo
6341 6339
           $c2 = $i + 1 >= $max ? "\x00" : $str[$i + 1];
6342 6340
 
6343 6341
           if ($c2 >= "\x80" && $c2 <= "\xBF") { // yeah, almost sure it's UTF8 already
6344
-            $buf .= $c1 . $c2;
6342
+            $buf .= $c1.$c2;
6345 6343
             $i++;
6346 6344
           } else { // not valid UTF8 - convert it
6347 6345
             $buf .= self::to_utf8_convert($c1);
@@ -6353,7 +6351,7 @@  discard block
 block discarded – undo
6353 6351
           $c3 = $i + 2 >= $max ? "\x00" : $str[$i + 2];
6354 6352
 
6355 6353
           if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF") { // yeah, almost sure it's UTF8 already
6356
-            $buf .= $c1 . $c2 . $c3;
6354
+            $buf .= $c1.$c2.$c3;
6357 6355
             $i += 2;
6358 6356
           } else { // not valid UTF8 - convert it
6359 6357
             $buf .= self::to_utf8_convert($c1);
@@ -6366,7 +6364,7 @@  discard block
 block discarded – undo
6366 6364
           $c4 = $i + 3 >= $max ? "\x00" : $str[$i + 3];
6367 6365
 
6368 6366
           if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF" && $c4 >= "\x80" && $c4 <= "\xBF") { // yeah, almost sure it's UTF8 already
6369
-            $buf .= $c1 . $c2 . $c3 . $c4;
6367
+            $buf .= $c1.$c2.$c3.$c4;
6370 6368
             $i += 3;
6371 6369
           } else { // not valid UTF8 - convert it
6372 6370
             $buf .= self::to_utf8_convert($c1);
@@ -6388,7 +6386,7 @@  discard block
 block discarded – undo
6388 6386
     // decode unicode escape sequences
6389 6387
     $buf = \preg_replace_callback(
6390 6388
         '/\\\\u([0-9a-f]{4})/i',
6391
-        function ($match) {
6389
+        function($match) {
6392 6390
           return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');
6393 6391
         },
6394 6392
         $buf
@@ -6430,7 +6428,7 @@  discard block
 block discarded – undo
6430 6428
     } else {
6431 6429
       $cc1 = self::$CHR[$ordC1 / 64] | "\xC0";
6432 6430
       $cc2 = ($int & "\x3F") | "\x80";
6433
-      $buf .= $cc1 . $cc2;
6431
+      $buf .= $cc1.$cc2;
6434 6432
     }
6435 6433
 
6436 6434
     return $buf;
@@ -6491,7 +6489,7 @@  discard block
 block discarded – undo
6491 6489
         $cleanUtf8
6492 6490
     );
6493 6491
 
6494
-    return $strPartOne . $strPartTwo;
6492
+    return $strPartOne.$strPartTwo;
6495 6493
   }
6496 6494
 
6497 6495
   /**
@@ -6536,7 +6534,7 @@  discard block
 block discarded – undo
6536 6534
       $str = self::clean($str);
6537 6535
     }
6538 6536
 
6539
-    $usePhpDefaultFunctions = !(bool)($charlist . \implode('', $exceptions));
6537
+    $usePhpDefaultFunctions = !(bool)($charlist.\implode('', $exceptions));
6540 6538
 
6541 6539
     if (
6542 6540
         $usePhpDefaultFunctions === true
@@ -7038,7 +7036,7 @@  discard block
 block discarded – undo
7038 7036
       return '';
7039 7037
     }
7040 7038
 
7041
-    \preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $str, $matches);
7039
+    \preg_match('/^\s*+(?:\S++\s*+){1,'.$limit.'}/u', $str, $matches);
7042 7040
 
7043 7041
     if (
7044 7042
         !isset($matches[0])
@@ -7048,7 +7046,7 @@  discard block
 block discarded – undo
7048 7046
       return $str;
7049 7047
     }
7050 7048
 
7051
-    return self::rtrim($matches[0]) . $strAddOn;
7049
+    return self::rtrim($matches[0]).$strAddOn;
7052 7050
   }
7053 7051
 
7054 7052
   /**
@@ -7113,7 +7111,7 @@  discard block
 block discarded – undo
7113 7111
       $strReturn .= $break;
7114 7112
     }
7115 7113
 
7116
-    return $strReturn . \implode('', $chars);
7114
+    return $strReturn.\implode('', $chars);
7117 7115
   }
7118 7116
 
7119 7117
   /**
Please login to merge, or discard this patch.
src/voku/helper/Bootup.php 1 patch
Spacing   +5 added lines, -5 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
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
     $uri = preg_replace_callback(
99 99
         '/[\x80-\xFF]+/',
100
-        function ($m) {
100
+        function($m) {
101 101
           return rawurlencode($m[0]);
102 102
         },
103 103
         $uri
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
     $uri = preg_replace_callback(
107 107
         '/(?:%[89A-F][0-9A-F])+/i',
108
-        function ($m) {
108
+        function($m) {
109 109
           return rawurlencode(UTF8::rawurldecode($m[0]));
110 110
         },
111 111
         $uri
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
     ) {
121 121
       // Use ob_start() to buffer content and avoid problem of headers already sent...
122 122
       $severProtocol = ($_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.1');
123
-      header($severProtocol . ' 301 Moved Permanently');
124
-      header('Location: ' . $uri);
123
+      header($severProtocol.' 301 Moved Permanently');
124
+      header('Location: '.$uri);
125 125
       exit();
126 126
     }
127 127
 
Please login to merge, or discard this patch.