@@ -6,25 +6,25 @@ |
||
6 | 6 | $baseDir = dirname($vendorDir); |
7 | 7 | |
8 | 8 | return array( |
9 | - 'voku\\' => array($vendorDir . '/voku/portable-ascii/src/voku'), |
|
10 | - 'phpDocumentor\\Reflection\\' => array($vendorDir . '/phpdocumentor/reflection-common/src', $vendorDir . '/phpdocumentor/type-resolver/src', $vendorDir . '/phpdocumentor/reflection-docblock/src'), |
|
11 | - 'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'), |
|
12 | - 'Webklex\\PHPIMAP\\' => array($baseDir . '/src'), |
|
13 | - 'Tests\\' => array($baseDir . '/tests'), |
|
14 | - 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'), |
|
15 | - 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), |
|
16 | - 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), |
|
17 | - 'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'), |
|
18 | - 'Symfony\\Component\\Yaml\\' => array($vendorDir . '/symfony/yaml'), |
|
19 | - 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), |
|
20 | - 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), |
|
21 | - 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), |
|
22 | - 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), |
|
23 | - 'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src/Prophecy'), |
|
24 | - 'Illuminate\\Support\\' => array($vendorDir . '/illuminate/macroable', $vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/support'), |
|
25 | - 'Illuminate\\Pagination\\' => array($vendorDir . '/illuminate/pagination'), |
|
26 | - 'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'), |
|
27 | - 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'), |
|
28 | - 'Doctrine\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Inflector'), |
|
29 | - 'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'), |
|
9 | + 'voku\\' => array($vendorDir.'/voku/portable-ascii/src/voku'), |
|
10 | + 'phpDocumentor\\Reflection\\' => array($vendorDir.'/phpdocumentor/reflection-common/src', $vendorDir.'/phpdocumentor/type-resolver/src', $vendorDir.'/phpdocumentor/reflection-docblock/src'), |
|
11 | + 'Webmozart\\Assert\\' => array($vendorDir.'/webmozart/assert/src'), |
|
12 | + 'Webklex\\PHPIMAP\\' => array($baseDir.'/src'), |
|
13 | + 'Tests\\' => array($baseDir.'/tests'), |
|
14 | + 'Symfony\\Polyfill\\Php80\\' => array($vendorDir.'/symfony/polyfill-php80'), |
|
15 | + 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir.'/symfony/polyfill-mbstring'), |
|
16 | + 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir.'/symfony/polyfill-ctype'), |
|
17 | + 'Symfony\\Contracts\\Translation\\' => array($vendorDir.'/symfony/translation-contracts'), |
|
18 | + 'Symfony\\Component\\Yaml\\' => array($vendorDir.'/symfony/yaml'), |
|
19 | + 'Symfony\\Component\\Translation\\' => array($vendorDir.'/symfony/translation'), |
|
20 | + 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir.'/symfony/http-foundation'), |
|
21 | + 'Psr\\SimpleCache\\' => array($vendorDir.'/psr/simple-cache/src'), |
|
22 | + 'Psr\\Container\\' => array($vendorDir.'/psr/container/src'), |
|
23 | + 'Prophecy\\' => array($vendorDir.'/phpspec/prophecy/src/Prophecy'), |
|
24 | + 'Illuminate\\Support\\' => array($vendorDir.'/illuminate/macroable', $vendorDir.'/illuminate/collections', $vendorDir.'/illuminate/support'), |
|
25 | + 'Illuminate\\Pagination\\' => array($vendorDir.'/illuminate/pagination'), |
|
26 | + 'Illuminate\\Contracts\\' => array($vendorDir.'/illuminate/contracts'), |
|
27 | + 'Doctrine\\Instantiator\\' => array($vendorDir.'/doctrine/instantiator/src/Doctrine/Instantiator'), |
|
28 | + 'Doctrine\\Inflector\\' => array($vendorDir.'/doctrine/inflector/lib/Doctrine/Inflector'), |
|
29 | + 'Carbon\\' => array($vendorDir.'/nesbot/carbon/src/Carbon'), |
|
30 | 30 | ); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | require_once(__DIR__.'/illuminate/collections/helpers.php'); |
26 | 26 | |
27 | 27 | |
28 | -spl_autoload_register(function ($class_name) { |
|
28 | +spl_autoload_register(function($class_name) { |
|
29 | 29 | // Enable this to detect what we need for require_once |
30 | 30 | //var_dump($class_name); |
31 | 31 | |
@@ -34,28 +34,28 @@ discard block |
||
34 | 34 | if (1 === $preg_match) { |
35 | 35 | $class_name = preg_replace('/\\\/', '/', $class_name); |
36 | 36 | $class_name = preg_replace('/^Symfony\\/Polyfill\\/Php80\\//', '', $class_name); |
37 | - require_once __DIR__ . '/symfony/polyfill-php80/' . $class_name . '.php'; |
|
37 | + require_once __DIR__.'/symfony/polyfill-php80/'.$class_name.'.php'; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | $preg_match = preg_match('/^Webklex\\\PHPIMAP\\\/', $class_name); |
41 | 41 | if (1 === $preg_match) { |
42 | 42 | $class_name = preg_replace('/\\\/', '/', $class_name); |
43 | 43 | $class_name = preg_replace('/^Webklex\\/PHPIMAP\\//', '', $class_name); |
44 | - require_once __DIR__ . '/../src/' . $class_name . '.php'; |
|
44 | + require_once __DIR__.'/../src/'.$class_name.'.php'; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | $preg_match = preg_match('/^Illuminate\\\Support\\\/', $class_name); |
48 | 48 | if (1 === $preg_match) { |
49 | 49 | $class_name = preg_replace('/\\\/', '/', $class_name); |
50 | 50 | $class_name = preg_replace('/^Illuminate\\/Support\\//', '', $class_name); |
51 | - $listofdir = array(0 => __DIR__ . '/illuminate/macroable', |
|
52 | - 1 => __DIR__ . '/illuminate/collections', |
|
53 | - 2 => __DIR__ . '/illuminate/support', |
|
54 | - 3 => __DIR__ . '/illuminate/contracts' |
|
51 | + $listofdir = array(0 => __DIR__.'/illuminate/macroable', |
|
52 | + 1 => __DIR__.'/illuminate/collections', |
|
53 | + 2 => __DIR__.'/illuminate/support', |
|
54 | + 3 => __DIR__.'/illuminate/contracts' |
|
55 | 55 | ); |
56 | - foreach($listofdir as $dir) { |
|
57 | - if (file_exists($dir . '/' . $class_name . '.php')) { |
|
58 | - require_once $dir . '/' . $class_name . '.php'; |
|
56 | + foreach ($listofdir as $dir) { |
|
57 | + if (file_exists($dir.'/'.$class_name.'.php')) { |
|
58 | + require_once $dir.'/'.$class_name.'.php'; |
|
59 | 59 | break; |
60 | 60 | } |
61 | 61 | } |
@@ -66,11 +66,11 @@ discard block |
||
66 | 66 | $class_name = preg_replace('/\\\/', '/', $class_name); |
67 | 67 | $class_name = preg_replace('/^Illuminate\\/Contracts\\//', '', $class_name); |
68 | 68 | $listofdir = array( |
69 | - 0 => __DIR__ . '/illuminate/contracts' |
|
69 | + 0 => __DIR__.'/illuminate/contracts' |
|
70 | 70 | ); |
71 | - foreach($listofdir as $dir) { |
|
72 | - if (file_exists($dir . '/' . $class_name . '.php')) { |
|
73 | - require_once $dir . '/' . $class_name . '.php'; |
|
71 | + foreach ($listofdir as $dir) { |
|
72 | + if (file_exists($dir.'/'.$class_name.'.php')) { |
|
73 | + require_once $dir.'/'.$class_name.'.php'; |
|
74 | 74 | break; |
75 | 75 | } |
76 | 76 | } |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | $class_name = preg_replace('/\\\/', '/', $class_name); |
82 | 82 | $class_name = preg_replace('/^Carbon\\//', '', $class_name); |
83 | 83 | $listofdir = array( |
84 | - 0 => __DIR__ . '/nesbot/carbon/src/Carbon' |
|
84 | + 0 => __DIR__.'/nesbot/carbon/src/Carbon' |
|
85 | 85 | ); |
86 | - foreach($listofdir as $dir) { |
|
87 | - if (file_exists($dir . '/' . $class_name . '.php')) { |
|
88 | - require_once $dir . '/' . $class_name . '.php'; |
|
86 | + foreach ($listofdir as $dir) { |
|
87 | + if (file_exists($dir.'/'.$class_name.'.php')) { |
|
88 | + require_once $dir.'/'.$class_name.'.php'; |
|
89 | 89 | break; |
90 | 90 | } |
91 | 91 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | private const CASE_FOLD = [ |
73 | 73 | ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], |
74 | - ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], |
|
74 | + ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], |
|
75 | 75 | ]; |
76 | 76 | |
77 | 77 | private static $encodingList = ['ASCII', 'UTF-8']; |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars) |
120 | 120 | { |
121 | 121 | $ok = true; |
122 | - array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { |
|
122 | + array_walk_recursive($vars, function(&$v) use (&$ok, $toEncoding, $fromEncoding) { |
|
123 | 123 | if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { |
124 | 124 | $ok = false; |
125 | 125 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | if (null !== $encoding && !is_scalar($encoding)) { |
154 | 154 | trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); |
155 | 155 | |
156 | - return ''; // Instead of null (cf. mb_encode_numericentity). |
|
156 | + return ''; // Instead of null (cf. mb_encode_numericentity). |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | $s = (string) $s; |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $convmap[$i + 1] += $convmap[$i + 2]; |
181 | 181 | } |
182 | 182 | |
183 | - $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { |
|
183 | + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function(array $m) use ($cnt, $convmap) { |
|
184 | 184 | $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; |
185 | 185 | for ($i = 0; $i < $cnt; $i += 4) { |
186 | 186 | if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | if (null !== $encoding && !is_scalar($encoding)) { |
214 | 214 | trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); |
215 | 215 | |
216 | - return null; // Instead of '' (cf. mb_decode_numericentity). |
|
216 | + return null; // Instead of '' (cf. mb_decode_numericentity). |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | if (null !== $is_hex && !is_scalar($is_hex)) { |
@@ -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', |
@@ -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', |
@@ -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 { return p\Mbstring::mb_get_info((string) $type); } |
|
96 | + function mb_get_info(?string $type = 'all'): array | string | int | false { 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); } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | ); |
45 | 45 | |
46 | 46 | foreach ($methods as $method) { |
47 | - if ($replace || ! static::hasMacro($method->name)) { |
|
47 | + if ($replace || !static::hasMacro($method->name)) { |
|
48 | 48 | $method->setAccessible(true); |
49 | 49 | static::macro($method->name, $method->invoke($mixin)); |
50 | 50 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public static function __callStatic($method, $parameters) |
85 | 85 | { |
86 | - if (! static::hasMacro($method)) { |
|
86 | + if (!static::hasMacro($method)) { |
|
87 | 87 | throw new BadMethodCallException(sprintf( |
88 | 88 | 'Method %s::%s does not exist.', static::class, $method |
89 | 89 | )); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | public function __call($method, $parameters) |
111 | 111 | { |
112 | - if (! static::hasMacro($method)) { |
|
112 | + if (!static::hasMacro($method)) { |
|
113 | 113 | throw new BadMethodCallException(sprintf( |
114 | 114 | 'Method %s::%s does not exist.', static::class, $method |
115 | 115 | )); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | public function previousCursor() |
152 | 152 | { |
153 | 153 | if (is_null($this->cursor) || |
154 | - ($this->cursor->pointsToPreviousItems() && ! $this->hasMore)) { |
|
154 | + ($this->cursor->pointsToPreviousItems() && !$this->hasMore)) { |
|
155 | 155 | return null; |
156 | 156 | } |
157 | 157 | |
@@ -169,8 +169,8 @@ discard block |
||
169 | 169 | */ |
170 | 170 | public function nextCursor() |
171 | 171 | { |
172 | - if ((is_null($this->cursor) && ! $this->hasMore) || |
|
173 | - (! is_null($this->cursor) && $this->cursor->pointsToNextItems() && ! $this->hasMore)) { |
|
172 | + if ((is_null($this->cursor) && !$this->hasMore) || |
|
173 | + (!is_null($this->cursor) && $this->cursor->pointsToNextItems() && !$this->hasMore)) { |
|
174 | 174 | return null; |
175 | 175 | } |
176 | 176 | |
@@ -205,13 +205,13 @@ discard block |
||
205 | 205 | { |
206 | 206 | return collect($this->parameters) |
207 | 207 | ->flip() |
208 | - ->map(function ($_, $parameterName) use ($item) { |
|
208 | + ->map(function($_, $parameterName) use ($item) { |
|
209 | 209 | if ($item instanceof JsonResource) { |
210 | 210 | $item = $item->resource; |
211 | 211 | } |
212 | 212 | |
213 | 213 | if ($item instanceof Model && |
214 | - ! is_null($parameter = $this->getPivotParameterForItem($item, $parameterName))) { |
|
214 | + !is_null($parameter = $this->getPivotParameterForItem($item, $parameterName))) { |
|
215 | 215 | return $parameter; |
216 | 216 | } elseif ($item instanceof ArrayAccess || is_array($item)) { |
217 | 217 | return $this->ensureParameterIsPrimitive( |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | */ |
322 | 322 | public function withQueryString() |
323 | 323 | { |
324 | - if (! is_null($query = Paginator::resolveQueryString())) { |
|
324 | + if (!is_null($query = Paginator::resolveQueryString())) { |
|
325 | 325 | return $this->appends($query); |
326 | 326 | } |
327 | 327 |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function parameter(string $parameterName) |
45 | 45 | { |
46 | - if (! array_key_exists($parameterName, $this->parameters)) { |
|
46 | + if (!array_key_exists($parameterName, $this->parameters)) { |
|
47 | 47 | throw new UnexpectedValueException("Unable to find parameter [{$parameterName}] in pagination item."); |
48 | 48 | } |
49 | 49 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function parameters(array $parameterNames) |
60 | 60 | { |
61 | - return collect($parameterNames)->map(function ($parameterName) { |
|
61 | + return collect($parameterNames)->map(function($parameterName) { |
|
62 | 62 | return $this->parameter($parameterName); |
63 | 63 | })->toArray(); |
64 | 64 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function pointsToPreviousItems() |
82 | 82 | { |
83 | - return ! $this->pointsToNextItems; |
|
83 | + return !$this->pointsToNextItems; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public static function fromEncoded($encodedString) |
115 | 115 | { |
116 | - if (is_null($encodedString) || ! is_string($encodedString)) { |
|
116 | + if (is_null($encodedString) || !is_string($encodedString)) { |
|
117 | 117 | return null; |
118 | 118 | } |
119 | 119 |