@@ -50,17 +50,17 @@ discard block |
||
50 | 50 | ]; |
51 | 51 | $tmpDir = sys_get_temp_dir(); |
52 | 52 | $lastError = 'unknown reason'; |
53 | - set_error_handler(function ($type, $msg) use (&$lastError) { $lastError = $msg; }); |
|
54 | - for ($i = 0;; ++$i) { |
|
53 | + set_error_handler(function($type, $msg) use (&$lastError) { $lastError = $msg; }); |
|
54 | + for ($i = 0; ; ++$i) { |
|
55 | 55 | foreach ($pipes as $pipe => $name) { |
56 | 56 | $file = sprintf('%s\\sf_proc_%02X.%s', $tmpDir, $i, $name); |
57 | 57 | |
58 | - if (!$h = fopen($file.'.lock', 'w')) { |
|
59 | - if (file_exists($file.'.lock')) { |
|
58 | + if (!$h = fopen($file . '.lock', 'w')) { |
|
59 | + if (file_exists($file . '.lock')) { |
|
60 | 60 | continue 2; |
61 | 61 | } |
62 | 62 | restore_error_handler(); |
63 | - throw new RuntimeException('A temporary file could not be opened to write the process output: '.$lastError); |
|
63 | + throw new RuntimeException('A temporary file could not be opened to write the process output: ' . $lastError); |
|
64 | 64 | } |
65 | 65 | if (!flock($h, \LOCK_EX | \LOCK_NB)) { |
66 | 66 | continue 2; |
@@ -90,12 +90,12 @@ discard block |
||
90 | 90 | |
91 | 91 | public function __sleep(): array |
92 | 92 | { |
93 | - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); |
|
93 | + throw new \BadMethodCallException('Cannot serialize ' . __CLASS__); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | public function __wakeup() |
97 | 97 | { |
98 | - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); |
|
98 | + throw new \BadMethodCallException('Cannot unserialize ' . __CLASS__); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | public function __destruct() |
@@ -76,7 +76,7 @@ |
||
76 | 76 | } else { |
77 | 77 | $type = (new \ReflectionFunction($factory))->getReturnType(); |
78 | 78 | |
79 | - $this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '').($type instanceof \ReflectionNamedType ? $type->getName() : $type) : '?'; |
|
79 | + $this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '') . ($type instanceof \ReflectionNamedType ? $type->getName() : $type) : '?'; |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | use Symfony\Polyfill\Intl\Normalizer as p; |
13 | 13 | |
14 | 14 | if (\PHP_VERSION_ID >= 80000) { |
15 | - return require __DIR__.'/bootstrap80.php'; |
|
15 | + return require __DIR__ . '/bootstrap80.php'; |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | if (!function_exists('normalizer_is_normalized')) { |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return array ( |
|
3 | +return array( |
|
4 | 4 | 'À' => 'À', |
5 | 5 | 'Á' => 'Á', |
6 | 6 | 'Â' => 'Â', |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return array ( |
|
3 | +return array( |
|
4 | 4 | ' ' => ' ', |
5 | 5 | '¨' => ' ̈', |
6 | 6 | 'ª' => 'a', |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return array ( |
|
3 | +return array( |
|
4 | 4 | 'À' => 'À', |
5 | 5 | 'Á' => 'Á', |
6 | 6 | 'Â' => 'Â', |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return array ( |
|
3 | +return array( |
|
4 | 4 | '̀' => 230, |
5 | 5 | '́' => 230, |
6 | 6 | '̂' => 230, |
@@ -15,5 +15,5 @@ |
||
15 | 15 | function normalizer_is_normalized(?string $string, ?int $form = p\Normalizer::FORM_C): bool { return p\Normalizer::isNormalized((string) $string, (int) $form); } |
16 | 16 | } |
17 | 17 | if (!function_exists('normalizer_normalize')) { |
18 | - function normalizer_normalize(?string $string, ?int $form = p\Normalizer::FORM_C): string|false { return p\Normalizer::normalize((string) $string, (int) $form); } |
|
18 | + function normalizer_normalize(?string $string, ?int $form = p\Normalizer::FORM_C): string | false { return p\Normalizer::normalize((string) $string, (int) $form); } |
|
19 | 19 | } |
@@ -156,8 +156,8 @@ discard block |
||
156 | 156 | |
157 | 157 | $ucls = $combClass[$uchr] ?? 0; |
158 | 158 | |
159 | - if (isset($compMap[$lastUchr.$uchr]) && (!$lastUcls || $lastUcls < $ucls)) { |
|
160 | - $lastUchr = $compMap[$lastUchr.$uchr]; |
|
159 | + if (isset($compMap[$lastUchr . $uchr]) && (!$lastUcls || $lastUcls < $ucls)) { |
|
160 | + $lastUchr = $compMap[$lastUchr . $uchr]; |
|
161 | 161 | } elseif ($lastUcls = $ucls) { |
162 | 162 | $tail .= $uchr; |
163 | 163 | } else { |
@@ -185,13 +185,13 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | $L = 0xAC00 + ($L * 21 + $V) * 28 + $T; |
188 | - $lastUchr = \chr(0xE0 | $L >> 12).\chr(0x80 | $L >> 6 & 0x3F).\chr(0x80 | $L & 0x3F); |
|
188 | + $lastUchr = \chr(0xE0 | $L >> 12) . \chr(0x80 | $L >> 6 & 0x3F) . \chr(0x80 | $L & 0x3F); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | $i += $ulen; |
192 | 192 | } |
193 | 193 | |
194 | - return $result.$lastUchr.$tail; |
|
194 | + return $result . $lastUchr . $tail; |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | private static function decompose($s, $c) |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | $i -= $j; |
247 | 247 | |
248 | 248 | if (0 > $i) { |
249 | - $s = str_repeat(' ', -$i).$s; |
|
249 | + $s = str_repeat(' ', -$i) . $s; |
|
250 | 250 | $len -= $i; |
251 | 251 | $i = 0; |
252 | 252 | } |
@@ -273,13 +273,13 @@ discard block |
||
273 | 273 | $uchr = unpack('C*', $uchr); |
274 | 274 | $j = (($uchr[1] - 224) << 12) + (($uchr[2] - 128) << 6) + $uchr[3] - 0xAC80; |
275 | 275 | |
276 | - $uchr = "\xE1\x84".\chr(0x80 + (int) ($j / 588)) |
|
277 | - ."\xE1\x85".\chr(0xA1 + (int) (($j % 588) / 28)); |
|
276 | + $uchr = "\xE1\x84" . \chr(0x80 + (int) ($j / 588)) |
|
277 | + ."\xE1\x85" . \chr(0xA1 + (int) (($j % 588) / 28)); |
|
278 | 278 | |
279 | 279 | if ($j %= 28) { |
280 | 280 | $uchr .= $j < 25 |
281 | - ? ("\xE1\x86".\chr(0xA7 + $j)) |
|
282 | - : ("\xE1\x87".\chr(0x67 + $j)); |
|
281 | + ? ("\xE1\x86" . \chr(0xA7 + $j)) |
|
282 | + : ("\xE1\x87" . \chr(0x67 + $j)); |
|
283 | 283 | } |
284 | 284 | } |
285 | 285 | if ($c) { |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | |
302 | 302 | private static function getData($file) |
303 | 303 | { |
304 | - if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { |
|
304 | + if (file_exists($file = __DIR__ . '/Resources/unidata/' . $file . '.php')) { |
|
305 | 305 | return require $file; |
306 | 306 | } |
307 | 307 |