@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -return array ( |
|
| 3 | +return array( |
|
| 4 | 4 | 'a' => 'A', |
| 5 | 5 | 'b' => 'B', |
| 6 | 6 | 'c' => 'C', |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | private const SIMPLE_CASE_FOLD = [ |
| 78 | 78 | ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], |
| 79 | - ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], |
|
| 79 | + ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], |
|
| 80 | 80 | ]; |
| 81 | 81 | |
| 82 | 82 | private static $encodingList = ['ASCII', 'UTF-8']; |
@@ -127,13 +127,13 @@ discard block |
||
| 127 | 127 | $fromEncoding = 'UTF-8'; |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | - return iconv($fromEncoding, $toEncoding.'//IGNORE', $s); |
|
| 130 | + return iconv($fromEncoding, $toEncoding . '//IGNORE', $s); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars) |
| 134 | 134 | { |
| 135 | 135 | $ok = true; |
| 136 | - array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { |
|
| 136 | + array_walk_recursive($vars, function(&$v) use (&$ok, $toEncoding, $fromEncoding) { |
|
| 137 | 137 | if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { |
| 138 | 138 | $ok = false; |
| 139 | 139 | } |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | public static function mb_decode_numericentity($s, $convmap, $encoding = null) |
| 156 | 156 | { |
| 157 | 157 | if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { |
| 158 | - trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); |
|
| 158 | + trigger_error('mb_decode_numericentity() expects parameter 1 to be string, ' . \gettype($s) . ' given', \E_USER_WARNING); |
|
| 159 | 159 | |
| 160 | 160 | return null; |
| 161 | 161 | } |
@@ -165,9 +165,9 @@ discard block |
||
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | if (null !== $encoding && !\is_scalar($encoding)) { |
| 168 | - trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); |
|
| 168 | + trigger_error('mb_decode_numericentity() expects parameter 3 to be string, ' . \gettype($s) . ' given', \E_USER_WARNING); |
|
| 169 | 169 | |
| 170 | - return ''; // Instead of null (cf. mb_encode_numericentity). |
|
| 170 | + return ''; // Instead of null (cf. mb_encode_numericentity). |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | $s = (string) $s; |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | $convmap[$i + 1] += $convmap[$i + 2]; |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | - $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { |
|
| 197 | + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function(array $m) use ($cnt, $convmap) { |
|
| 198 | 198 | $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; |
| 199 | 199 | for ($i = 0; $i < $cnt; $i += 4) { |
| 200 | 200 | if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { |
@@ -209,13 +209,13 @@ discard block |
||
| 209 | 209 | return $s; |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | - return iconv('UTF-8', $encoding.'//IGNORE', $s); |
|
| 212 | + return iconv('UTF-8', $encoding . '//IGNORE', $s); |
|
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) |
| 216 | 216 | { |
| 217 | 217 | if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { |
| 218 | - trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); |
|
| 218 | + trigger_error('mb_encode_numericentity() expects parameter 1 to be string, ' . \gettype($s) . ' given', \E_USER_WARNING); |
|
| 219 | 219 | |
| 220 | 220 | return null; |
| 221 | 221 | } |
@@ -225,13 +225,13 @@ discard block |
||
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | if (null !== $encoding && !\is_scalar($encoding)) { |
| 228 | - trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); |
|
| 228 | + trigger_error('mb_encode_numericentity() expects parameter 3 to be string, ' . \gettype($s) . ' given', \E_USER_WARNING); |
|
| 229 | 229 | |
| 230 | - return null; // Instead of '' (cf. mb_decode_numericentity). |
|
| 230 | + return null; // Instead of '' (cf. mb_decode_numericentity). |
|
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | if (null !== $is_hex && !\is_scalar($is_hex)) { |
| 234 | - trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING); |
|
| 234 | + trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, ' . \gettype($s) . ' given', \E_USER_WARNING); |
|
| 235 | 235 | |
| 236 | 236 | return null; |
| 237 | 237 | } |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | for ($j = 0; $j < $cnt; $j += 4) { |
| 269 | 269 | if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { |
| 270 | 270 | $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; |
| 271 | - $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; |
|
| 271 | + $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#' . $cOffset . ';'; |
|
| 272 | 272 | continue 2; |
| 273 | 273 | } |
| 274 | 274 | } |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | return $result; |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | - return iconv('UTF-8', $encoding.'//IGNORE', $result); |
|
| 282 | + return iconv('UTF-8', $encoding . '//IGNORE', $result); |
|
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | public static function mb_convert_case($s, $mode, $encoding = null) |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | return $s; |
| 362 | 362 | } |
| 363 | 363 | |
| 364 | - return iconv('UTF-8', $encoding.'//IGNORE', $s); |
|
| 364 | + return iconv('UTF-8', $encoding . '//IGNORE', $s); |
|
| 365 | 365 | } |
| 366 | 366 | |
| 367 | 367 | public static function mb_internal_encoding($encoding = null) |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | $needle = (string) $needle; |
| 533 | 533 | if ('' === $needle) { |
| 534 | 534 | if (80000 > \PHP_VERSION_ID) { |
| 535 | - trigger_error(__METHOD__.': Empty delimiter', \E_USER_WARNING); |
|
| 535 | + trigger_error(__METHOD__ . ': Empty delimiter', \E_USER_WARNING); |
|
| 536 | 536 | |
| 537 | 537 | return false; |
| 538 | 538 | } |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | public static function mb_str_split($string, $split_length = 1, $encoding = null) |
| 574 | 574 | { |
| 575 | 575 | if (null !== $string && !\is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) { |
| 576 | - trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING); |
|
| 576 | + trigger_error('mb_str_split() expects parameter 1 to be string, ' . \gettype($string) . ' given', \E_USER_WARNING); |
|
| 577 | 577 | |
| 578 | 578 | return null; |
| 579 | 579 | } |
@@ -598,7 +598,7 @@ discard block |
||
| 598 | 598 | $rx .= '.{65535}'; |
| 599 | 599 | $split_length -= 65535; |
| 600 | 600 | } |
| 601 | - $rx .= '.{'.$split_length.'})/us'; |
|
| 601 | + $rx .= '.{' . $split_length . '})/us'; |
|
| 602 | 602 | |
| 603 | 603 | return preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); |
| 604 | 604 | } |
@@ -796,11 +796,11 @@ discard block |
||
| 796 | 796 | if (0x80 > $code %= 0x200000) { |
| 797 | 797 | $s = \chr($code); |
| 798 | 798 | } elseif (0x800 > $code) { |
| 799 | - $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); |
|
| 799 | + $s = \chr(0xC0 | $code >> 6) . \chr(0x80 | $code & 0x3F); |
|
| 800 | 800 | } elseif (0x10000 > $code) { |
| 801 | - $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); |
|
| 801 | + $s = \chr(0xE0 | $code >> 12) . \chr(0x80 | $code >> 6 & 0x3F) . \chr(0x80 | $code & 0x3F); |
|
| 802 | 802 | } else { |
| 803 | - $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); |
|
| 803 | + $s = \chr(0xF0 | $code >> 18) . \chr(0x80 | $code >> 12 & 0x3F) . \chr(0x80 | $code >> 6 & 0x3F) . \chr(0x80 | $code & 0x3F); |
|
| 804 | 804 | } |
| 805 | 805 | |
| 806 | 806 | if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { |
@@ -858,14 +858,14 @@ discard block |
||
| 858 | 858 | |
| 859 | 859 | switch ($pad_type) { |
| 860 | 860 | case \STR_PAD_LEFT: |
| 861 | - return self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding).$string; |
|
| 861 | + return self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding) . $string; |
|
| 862 | 862 | case \STR_PAD_RIGHT: |
| 863 | - return $string.self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding); |
|
| 863 | + return $string . self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding); |
|
| 864 | 864 | default: |
| 865 | 865 | $leftPaddingLength = floor($paddingRequired / 2); |
| 866 | 866 | $rightPaddingLength = $paddingRequired - $leftPaddingLength; |
| 867 | 867 | |
| 868 | - return self::mb_substr(str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding).$string.self::mb_substr(str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding); |
|
| 868 | + return self::mb_substr(str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding) . $string . self::mb_substr(str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding); |
|
| 869 | 869 | } |
| 870 | 870 | } |
| 871 | 871 | |
@@ -880,7 +880,7 @@ discard block |
||
| 880 | 880 | $firstChar = mb_substr($string, 0, 1, $encoding); |
| 881 | 881 | $firstChar = mb_convert_case($firstChar, \MB_CASE_TITLE, $encoding); |
| 882 | 882 | |
| 883 | - return $firstChar.mb_substr($string, 1, null, $encoding); |
|
| 883 | + return $firstChar . mb_substr($string, 1, null, $encoding); |
|
| 884 | 884 | } |
| 885 | 885 | |
| 886 | 886 | public static function mb_lcfirst(string $string, ?string $encoding = null): string |
@@ -894,7 +894,7 @@ discard block |
||
| 894 | 894 | $firstChar = mb_substr($string, 0, 1, $encoding); |
| 895 | 895 | $firstChar = mb_convert_case($firstChar, \MB_CASE_LOWER, $encoding); |
| 896 | 896 | |
| 897 | - return $firstChar.mb_substr($string, 1, null, $encoding); |
|
| 897 | + return $firstChar . mb_substr($string, 1, null, $encoding); |
|
| 898 | 898 | } |
| 899 | 899 | |
| 900 | 900 | private static function getSubpart($pos, $part, $haystack, $encoding) |
@@ -928,7 +928,7 @@ discard block |
||
| 928 | 928 | $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; |
| 929 | 929 | } |
| 930 | 930 | |
| 931 | - $entities .= '&#'.$c.';'; |
|
| 931 | + $entities .= '&#' . $c . ';'; |
|
| 932 | 932 | } |
| 933 | 933 | |
| 934 | 934 | return $entities; |
@@ -936,12 +936,12 @@ discard block |
||
| 936 | 936 | |
| 937 | 937 | private static function title_case(array $s) |
| 938 | 938 | { |
| 939 | - return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8'); |
|
| 939 | + return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8') . self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8'); |
|
| 940 | 940 | } |
| 941 | 941 | |
| 942 | 942 | private static function getData($file) |
| 943 | 943 | { |
| 944 | - if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { |
|
| 944 | + if (file_exists($file = __DIR__ . '/Resources/unidata/' . $file . '.php')) { |
|
| 945 | 945 | return require $file; |
| 946 | 946 | } |
| 947 | 947 | |
@@ -991,7 +991,7 @@ discard block |
||
| 991 | 991 | if (null === $encoding) { |
| 992 | 992 | $encoding = self::mb_internal_encoding(); |
| 993 | 993 | } else { |
| 994 | - self::assertEncoding($encoding, $function.'(): Argument #3 ($encoding) must be a valid encoding, "%s" given'); |
|
| 994 | + self::assertEncoding($encoding, $function . '(): Argument #3 ($encoding) must be a valid encoding, "%s" given'); |
|
| 995 | 995 | } |
| 996 | 996 | |
| 997 | 997 | if ('' === $characters) { |
@@ -1026,7 +1026,7 @@ discard block |
||
| 1026 | 1026 | return $string; |
| 1027 | 1027 | } |
| 1028 | 1028 | |
| 1029 | - return iconv('UTF-8', $encoding.'//IGNORE', $string); |
|
| 1029 | + return iconv('UTF-8', $encoding . '//IGNORE', $string); |
|
| 1030 | 1030 | } |
| 1031 | 1031 | |
| 1032 | 1032 | private static function assertEncoding(string $encoding, string $errorFormat): void |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | use Symfony\Polyfill\Mbstring as p; |
| 13 | 13 | |
| 14 | 14 | if (!function_exists('mb_convert_encoding')) { |
| 15 | - function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); } |
|
| 15 | + function mb_convert_encoding(array | string | null $string, ?string $to_encoding, array | string | null $from_encoding = null): array | string | false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); } |
|
| 16 | 16 | } |
| 17 | 17 | if (!function_exists('mb_decode_mimeheader')) { |
| 18 | 18 | function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); } |
@@ -30,10 +30,10 @@ discard block |
||
| 30 | 30 | function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); } |
| 31 | 31 | } |
| 32 | 32 | if (!function_exists('mb_internal_encoding')) { |
| 33 | - function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); } |
|
| 33 | + function mb_internal_encoding(?string $encoding = null): string | bool { return p\Mbstring::mb_internal_encoding($encoding); } |
|
| 34 | 34 | } |
| 35 | 35 | if (!function_exists('mb_language')) { |
| 36 | - function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); } |
|
| 36 | + function mb_language(?string $language = null): string | bool { return p\Mbstring::mb_language($language); } |
|
| 37 | 37 | } |
| 38 | 38 | if (!function_exists('mb_list_encodings')) { |
| 39 | 39 | function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); } |
@@ -42,13 +42,13 @@ discard block |
||
| 42 | 42 | function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); } |
| 43 | 43 | } |
| 44 | 44 | if (!function_exists('mb_check_encoding')) { |
| 45 | - function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); } |
|
| 45 | + function mb_check_encoding(array | string | null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); } |
|
| 46 | 46 | } |
| 47 | 47 | if (!function_exists('mb_detect_encoding')) { |
| 48 | - function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); } |
|
| 48 | + function mb_detect_encoding(?string $string, array | string | null $encodings = null, ?bool $strict = false): string | false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); } |
|
| 49 | 49 | } |
| 50 | 50 | if (!function_exists('mb_detect_order')) { |
| 51 | - function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); } |
|
| 51 | + function mb_detect_order(array | string | null $encoding = null): array | bool { return p\Mbstring::mb_detect_order($encoding); } |
|
| 52 | 52 | } |
| 53 | 53 | if (!function_exists('mb_parse_str')) { |
| 54 | 54 | function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); } |
| 58 | 58 | } |
| 59 | 59 | if (!function_exists('mb_strpos')) { |
| 60 | - function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } |
|
| 60 | + function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int | false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } |
|
| 61 | 61 | } |
| 62 | 62 | if (!function_exists('mb_strtolower')) { |
| 63 | 63 | function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); } |
@@ -66,37 +66,37 @@ discard block |
||
| 66 | 66 | function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); } |
| 67 | 67 | } |
| 68 | 68 | if (!function_exists('mb_substitute_character')) { |
| 69 | - function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); } |
|
| 69 | + function mb_substitute_character(string | int | null $substitute_character = null): string | int | bool { return p\Mbstring::mb_substitute_character($substitute_character); } |
|
| 70 | 70 | } |
| 71 | 71 | if (!function_exists('mb_substr')) { |
| 72 | 72 | function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); } |
| 73 | 73 | } |
| 74 | 74 | if (!function_exists('mb_stripos')) { |
| 75 | - function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } |
|
| 75 | + function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int | false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } |
|
| 76 | 76 | } |
| 77 | 77 | if (!function_exists('mb_stristr')) { |
| 78 | - function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } |
|
| 78 | + function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string | false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } |
|
| 79 | 79 | } |
| 80 | 80 | if (!function_exists('mb_strrchr')) { |
| 81 | - function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } |
|
| 81 | + function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string | false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } |
|
| 82 | 82 | } |
| 83 | 83 | if (!function_exists('mb_strrichr')) { |
| 84 | - function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } |
|
| 84 | + function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string | false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } |
|
| 85 | 85 | } |
| 86 | 86 | if (!function_exists('mb_strripos')) { |
| 87 | - function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } |
|
| 87 | + function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int | false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } |
|
| 88 | 88 | } |
| 89 | 89 | if (!function_exists('mb_strrpos')) { |
| 90 | - function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } |
|
| 90 | + function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int | false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } |
|
| 91 | 91 | } |
| 92 | 92 | if (!function_exists('mb_strstr')) { |
| 93 | - function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } |
|
| 93 | + function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string | false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } |
|
| 94 | 94 | } |
| 95 | 95 | if (!function_exists('mb_get_info')) { |
| 96 | - function mb_get_info(?string $type = 'all'): array|string|int|false|null { return p\Mbstring::mb_get_info((string) $type); } |
|
| 96 | + function mb_get_info(?string $type = 'all'): array | string | int | false | null { return p\Mbstring::mb_get_info((string) $type); } |
|
| 97 | 97 | } |
| 98 | 98 | if (!function_exists('mb_http_output')) { |
| 99 | - function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); } |
|
| 99 | + function mb_http_output(?string $encoding = null): string | bool { return p\Mbstring::mb_http_output($encoding); } |
|
| 100 | 100 | } |
| 101 | 101 | if (!function_exists('mb_strwidth')) { |
| 102 | 102 | function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); } |
@@ -108,18 +108,18 @@ discard block |
||
| 108 | 108 | function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); } |
| 109 | 109 | } |
| 110 | 110 | if (!function_exists('mb_http_input')) { |
| 111 | - function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); } |
|
| 111 | + function mb_http_input(?string $type = null): array | string | false { return p\Mbstring::mb_http_input($type); } |
|
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | if (!function_exists('mb_convert_variables')) { |
| 115 | - function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); } |
|
| 115 | + function mb_convert_variables(?string $to_encoding, array | string | null $from_encoding, mixed &$var, mixed &...$vars): string | false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); } |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | if (!function_exists('mb_ord')) { |
| 119 | - function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); } |
|
| 119 | + function mb_ord(?string $string, ?string $encoding = null): int | false { return p\Mbstring::mb_ord((string) $string, $encoding); } |
|
| 120 | 120 | } |
| 121 | 121 | if (!function_exists('mb_chr')) { |
| 122 | - function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); } |
|
| 122 | + function mb_chr(?int $codepoint, ?string $encoding = null): string | false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); } |
|
| 123 | 123 | } |
| 124 | 124 | if (!function_exists('mb_scrub')) { |
| 125 | 125 | function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); } |
@@ -51,14 +51,14 @@ |
||
| 51 | 51 | |
| 52 | 52 | /* @var SubscribedService $attribute */ |
| 53 | 53 | $attribute = $attribute->newInstance(); |
| 54 | - $attribute->key ??= self::class.'::'.$method->name; |
|
| 54 | + $attribute->key ??= self::class . '::' . $method->name; |
|
| 55 | 55 | $attribute->type ??= $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType; |
| 56 | 56 | $attribute->nullable = $returnType->allowsNull(); |
| 57 | 57 | |
| 58 | 58 | if ($attribute->attributes) { |
| 59 | 59 | $services[] = $attribute; |
| 60 | 60 | } else { |
| 61 | - $services[$attribute->key] = ($attribute->nullable ? '?' : '').$attribute->type; |
|
| 61 | + $services[$attribute->key] = ($attribute->nullable ? '?' : '') . $attribute->type; |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInit7a5fc401803f479299a0ff9ac4ecb4f6 |
| 8 | 8 | { |
| 9 | - public static $files = array ( |
|
| 9 | + public static $files = array( |
|
| 10 | 10 | '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', |
| 11 | 11 | '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', |
| 12 | 12 | '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', |
@@ -15,9 +15,9 @@ discard block |
||
| 15 | 15 | 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php', |
| 16 | 16 | ); |
| 17 | 17 | |
| 18 | - public static $prefixLengthsPsr4 = array ( |
|
| 18 | + public static $prefixLengthsPsr4 = array( |
|
| 19 | 19 | 'S' => |
| 20 | - array ( |
|
| 20 | + array( |
|
| 21 | 21 | 'Symfony\\Polyfill\\Mbstring\\' => 26, |
| 22 | 22 | 'Symfony\\Polyfill\\Intl\\Normalizer\\' => 33, |
| 23 | 23 | 'Symfony\\Polyfill\\Intl\\Grapheme\\' => 31, |
@@ -29,62 +29,62 @@ discard block |
||
| 29 | 29 | 'Symfony\\Component\\Console\\' => 26, |
| 30 | 30 | ), |
| 31 | 31 | 'P' => |
| 32 | - array ( |
|
| 32 | + array( |
|
| 33 | 33 | 'Psr\\Container\\' => 14, |
| 34 | 34 | ), |
| 35 | 35 | ); |
| 36 | 36 | |
| 37 | - public static $prefixDirsPsr4 = array ( |
|
| 37 | + public static $prefixDirsPsr4 = array( |
|
| 38 | 38 | 'Symfony\\Polyfill\\Mbstring\\' => |
| 39 | - array ( |
|
| 39 | + array( |
|
| 40 | 40 | 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', |
| 41 | 41 | ), |
| 42 | 42 | 'Symfony\\Polyfill\\Intl\\Normalizer\\' => |
| 43 | - array ( |
|
| 43 | + array( |
|
| 44 | 44 | 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer', |
| 45 | 45 | ), |
| 46 | 46 | 'Symfony\\Polyfill\\Intl\\Grapheme\\' => |
| 47 | - array ( |
|
| 47 | + array( |
|
| 48 | 48 | 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme', |
| 49 | 49 | ), |
| 50 | 50 | 'Symfony\\Polyfill\\Ctype\\' => |
| 51 | - array ( |
|
| 51 | + array( |
|
| 52 | 52 | 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', |
| 53 | 53 | ), |
| 54 | 54 | 'Symfony\\Contracts\\Service\\' => |
| 55 | - array ( |
|
| 55 | + array( |
|
| 56 | 56 | 0 => __DIR__ . '/..' . '/symfony/service-contracts', |
| 57 | 57 | ), |
| 58 | 58 | 'Symfony\\Component\\Yaml\\' => |
| 59 | - array ( |
|
| 59 | + array( |
|
| 60 | 60 | 0 => __DIR__ . '/..' . '/symfony/yaml', |
| 61 | 61 | ), |
| 62 | 62 | 'Symfony\\Component\\String\\' => |
| 63 | - array ( |
|
| 63 | + array( |
|
| 64 | 64 | 0 => __DIR__ . '/..' . '/symfony/string', |
| 65 | 65 | ), |
| 66 | 66 | 'Symfony\\Component\\Process\\' => |
| 67 | - array ( |
|
| 67 | + array( |
|
| 68 | 68 | 0 => __DIR__ . '/..' . '/symfony/process', |
| 69 | 69 | ), |
| 70 | 70 | 'Symfony\\Component\\Console\\' => |
| 71 | - array ( |
|
| 71 | + array( |
|
| 72 | 72 | 0 => __DIR__ . '/..' . '/symfony/console', |
| 73 | 73 | ), |
| 74 | 74 | 'Psr\\Container\\' => |
| 75 | - array ( |
|
| 75 | + array( |
|
| 76 | 76 | 0 => __DIR__ . '/..' . '/psr/container/src', |
| 77 | 77 | ), |
| 78 | 78 | ); |
| 79 | 79 | |
| 80 | - public static $classMap = array ( |
|
| 80 | + public static $classMap = array( |
|
| 81 | 81 | 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
| 82 | 82 | 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', |
| 83 | 83 | ); |
| 84 | 84 | |
| 85 | 85 | public static function getInitializer(ClassLoader $loader) |
| 86 | 86 | { |
| 87 | - return \Closure::bind(function () use ($loader) { |
|
| 87 | + return \Closure::bind(function() use ($loader) { |
|
| 88 | 88 | $loader->prefixLengthsPsr4 = ComposerStaticInit7a5fc401803f479299a0ff9ac4ecb4f6::$prefixLengthsPsr4; |
| 89 | 89 | $loader->prefixDirsPsr4 = ComposerStaticInit7a5fc401803f479299a0ff9ac4ecb4f6::$prefixDirsPsr4; |
| 90 | 90 | $loader->classMap = ComposerStaticInit7a5fc401803f479299a0ff9ac4ecb4f6::$classMap; |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | $loader->register(true); |
| 35 | 35 | |
| 36 | 36 | $filesToLoad = \Composer\Autoload\ComposerStaticInit7a5fc401803f479299a0ff9ac4ecb4f6::$files; |
| 37 | - $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { |
|
| 37 | + $requireFile = \Closure::bind(static function($fileIdentifier, $file) { |
|
| 38 | 38 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { |
| 39 | 39 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; |
| 40 | 40 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | public function __construct( |
| 20 | 20 | public readonly array $command, |
| 21 | 21 | public readonly ?string $cwd = null, |
| 22 | - public readonly ?array $env = null, |
|
| 22 | + public readonly ? array $env = null, |
|
| 23 | 23 | public readonly mixed $input = null, |
| 24 | 24 | public readonly ?float $timeout = 60.0, |
| 25 | 25 | ) { |
@@ -103,14 +103,14 @@ discard block |
||
| 103 | 103 | foreach ($iniFiles as $file) { |
| 104 | 104 | // Check for inaccessible ini files |
| 105 | 105 | if (($data = @file_get_contents($file)) === false) { |
| 106 | - throw new RuntimeException('Unable to read ini: '.$file); |
|
| 106 | + throw new RuntimeException('Unable to read ini: ' . $file); |
|
| 107 | 107 | } |
| 108 | 108 | // Check and remove directives after HOST and PATH sections |
| 109 | 109 | if (preg_match('/^\s*\[(?:PATH|HOST)\s*=/mi', $data, $matches, \PREG_OFFSET_CAPTURE)) { |
| 110 | 110 | $data = substr($data, 0, $matches[0][1]); |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | - $content .= $data."\n"; |
|
| 113 | + $content .= $data . "\n"; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | // Merge loaded settings into our ini content, if it is valid |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | if (!isset($iniConfig[$name]) || $iniConfig[$name] !== $value) { |
| 146 | 146 | // Double-quote escape each value |
| 147 | - $content .= $name.'="'.addcslashes($value, '\\"')."\"\n"; |
|
| 147 | + $content .= $name . '="' . addcslashes($value, '\\"') . "\"\n"; |
|
| 148 | 148 | } |
| 149 | 149 | } |
| 150 | 150 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | throw new InvalidArgumentException('Expected a process that failed during startup, but the given process was started successfully.'); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - $error = sprintf('The command "%s" failed.'."\n\nWorking directory: %s\n\nError: %s", |
|
| 29 | + $error = sprintf('The command "%s" failed.' . "\n\nWorking directory: %s\n\nError: %s", |
|
| 30 | 30 | $process->getCommandLine(), |
| 31 | 31 | $process->getWorkingDirectory(), |
| 32 | 32 | $message ?? 'unknown' |