@@ -14,11 +14,11 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | function pspell_add_to_personal(int $dictionary_link, string $word): void |
| 16 | 16 | { |
| 17 | - error_clear_last(); |
|
| 18 | - $result = \pspell_add_to_personal($dictionary_link, $word); |
|
| 19 | - if ($result === false) { |
|
| 20 | - throw PspellException::createFromPhpError(); |
|
| 21 | - } |
|
| 17 | + error_clear_last(); |
|
| 18 | + $result = \pspell_add_to_personal($dictionary_link, $word); |
|
| 19 | + if ($result === false) { |
|
| 20 | + throw PspellException::createFromPhpError(); |
|
| 21 | + } |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | |
@@ -32,11 +32,11 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | function pspell_add_to_session(int $dictionary_link, string $word): void |
| 34 | 34 | { |
| 35 | - error_clear_last(); |
|
| 36 | - $result = \pspell_add_to_session($dictionary_link, $word); |
|
| 37 | - if ($result === false) { |
|
| 38 | - throw PspellException::createFromPhpError(); |
|
| 39 | - } |
|
| 35 | + error_clear_last(); |
|
| 36 | + $result = \pspell_add_to_session($dictionary_link, $word); |
|
| 37 | + if ($result === false) { |
|
| 38 | + throw PspellException::createFromPhpError(); |
|
| 39 | + } |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | |
@@ -49,11 +49,11 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | function pspell_clear_session(int $dictionary_link): void |
| 51 | 51 | { |
| 52 | - error_clear_last(); |
|
| 53 | - $result = \pspell_clear_session($dictionary_link); |
|
| 54 | - if ($result === false) { |
|
| 55 | - throw PspellException::createFromPhpError(); |
|
| 56 | - } |
|
| 52 | + error_clear_last(); |
|
| 53 | + $result = \pspell_clear_session($dictionary_link); |
|
| 54 | + if ($result === false) { |
|
| 55 | + throw PspellException::createFromPhpError(); |
|
| 56 | + } |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | |
@@ -92,20 +92,20 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | function pspell_config_create(string $language, string $spelling = null, string $jargon = null, string $encoding = null): int |
| 94 | 94 | { |
| 95 | - error_clear_last(); |
|
| 96 | - if ($encoding !== null) { |
|
| 97 | - $result = \pspell_config_create($language, $spelling, $jargon, $encoding); |
|
| 98 | - } elseif ($jargon !== null) { |
|
| 99 | - $result = \pspell_config_create($language, $spelling, $jargon); |
|
| 100 | - } elseif ($spelling !== null) { |
|
| 101 | - $result = \pspell_config_create($language, $spelling); |
|
| 102 | - } else { |
|
| 103 | - $result = \pspell_config_create($language); |
|
| 104 | - } |
|
| 105 | - if ($result === false) { |
|
| 106 | - throw PspellException::createFromPhpError(); |
|
| 107 | - } |
|
| 108 | - return $result; |
|
| 95 | + error_clear_last(); |
|
| 96 | + if ($encoding !== null) { |
|
| 97 | + $result = \pspell_config_create($language, $spelling, $jargon, $encoding); |
|
| 98 | + } elseif ($jargon !== null) { |
|
| 99 | + $result = \pspell_config_create($language, $spelling, $jargon); |
|
| 100 | + } elseif ($spelling !== null) { |
|
| 101 | + $result = \pspell_config_create($language, $spelling); |
|
| 102 | + } else { |
|
| 103 | + $result = \pspell_config_create($language); |
|
| 104 | + } |
|
| 105 | + if ($result === false) { |
|
| 106 | + throw PspellException::createFromPhpError(); |
|
| 107 | + } |
|
| 108 | + return $result; |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | |
@@ -121,11 +121,11 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | function pspell_config_data_dir(int $conf, string $directory): void |
| 123 | 123 | { |
| 124 | - error_clear_last(); |
|
| 125 | - $result = \pspell_config_data_dir($conf, $directory); |
|
| 126 | - if ($result === false) { |
|
| 127 | - throw PspellException::createFromPhpError(); |
|
| 128 | - } |
|
| 124 | + error_clear_last(); |
|
| 125 | + $result = \pspell_config_data_dir($conf, $directory); |
|
| 126 | + if ($result === false) { |
|
| 127 | + throw PspellException::createFromPhpError(); |
|
| 128 | + } |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | |
@@ -141,11 +141,11 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | function pspell_config_dict_dir(int $conf, string $directory): void |
| 143 | 143 | { |
| 144 | - error_clear_last(); |
|
| 145 | - $result = \pspell_config_dict_dir($conf, $directory); |
|
| 146 | - if ($result === false) { |
|
| 147 | - throw PspellException::createFromPhpError(); |
|
| 148 | - } |
|
| 144 | + error_clear_last(); |
|
| 145 | + $result = \pspell_config_dict_dir($conf, $directory); |
|
| 146 | + if ($result === false) { |
|
| 147 | + throw PspellException::createFromPhpError(); |
|
| 148 | + } |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | |
@@ -159,11 +159,11 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | function pspell_config_ignore(int $dictionary_link, int $n): void |
| 161 | 161 | { |
| 162 | - error_clear_last(); |
|
| 163 | - $result = \pspell_config_ignore($dictionary_link, $n); |
|
| 164 | - if ($result === false) { |
|
| 165 | - throw PspellException::createFromPhpError(); |
|
| 166 | - } |
|
| 162 | + error_clear_last(); |
|
| 163 | + $result = \pspell_config_ignore($dictionary_link, $n); |
|
| 164 | + if ($result === false) { |
|
| 165 | + throw PspellException::createFromPhpError(); |
|
| 166 | + } |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | |
@@ -197,11 +197,11 @@ discard block |
||
| 197 | 197 | */ |
| 198 | 198 | function pspell_config_mode(int $dictionary_link, int $mode): void |
| 199 | 199 | { |
| 200 | - error_clear_last(); |
|
| 201 | - $result = \pspell_config_mode($dictionary_link, $mode); |
|
| 202 | - if ($result === false) { |
|
| 203 | - throw PspellException::createFromPhpError(); |
|
| 204 | - } |
|
| 200 | + error_clear_last(); |
|
| 201 | + $result = \pspell_config_mode($dictionary_link, $mode); |
|
| 202 | + if ($result === false) { |
|
| 203 | + throw PspellException::createFromPhpError(); |
|
| 204 | + } |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | |
@@ -222,11 +222,11 @@ discard block |
||
| 222 | 222 | */ |
| 223 | 223 | function pspell_config_personal(int $dictionary_link, string $file): void |
| 224 | 224 | { |
| 225 | - error_clear_last(); |
|
| 226 | - $result = \pspell_config_personal($dictionary_link, $file); |
|
| 227 | - if ($result === false) { |
|
| 228 | - throw PspellException::createFromPhpError(); |
|
| 229 | - } |
|
| 225 | + error_clear_last(); |
|
| 226 | + $result = \pspell_config_personal($dictionary_link, $file); |
|
| 227 | + if ($result === false) { |
|
| 228 | + throw PspellException::createFromPhpError(); |
|
| 229 | + } |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | |
@@ -249,11 +249,11 @@ discard block |
||
| 249 | 249 | */ |
| 250 | 250 | function pspell_config_repl(int $dictionary_link, string $file): void |
| 251 | 251 | { |
| 252 | - error_clear_last(); |
|
| 253 | - $result = \pspell_config_repl($dictionary_link, $file); |
|
| 254 | - if ($result === false) { |
|
| 255 | - throw PspellException::createFromPhpError(); |
|
| 256 | - } |
|
| 252 | + error_clear_last(); |
|
| 253 | + $result = \pspell_config_repl($dictionary_link, $file); |
|
| 254 | + if ($result === false) { |
|
| 255 | + throw PspellException::createFromPhpError(); |
|
| 256 | + } |
|
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | |
@@ -275,11 +275,11 @@ discard block |
||
| 275 | 275 | */ |
| 276 | 276 | function pspell_config_runtogether(int $dictionary_link, bool $flag): void |
| 277 | 277 | { |
| 278 | - error_clear_last(); |
|
| 279 | - $result = \pspell_config_runtogether($dictionary_link, $flag); |
|
| 280 | - if ($result === false) { |
|
| 281 | - throw PspellException::createFromPhpError(); |
|
| 282 | - } |
|
| 278 | + error_clear_last(); |
|
| 279 | + $result = \pspell_config_runtogether($dictionary_link, $flag); |
|
| 280 | + if ($result === false) { |
|
| 281 | + throw PspellException::createFromPhpError(); |
|
| 282 | + } |
|
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | |
@@ -302,11 +302,11 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | function pspell_config_save_repl(int $dictionary_link, bool $flag): void |
| 304 | 304 | { |
| 305 | - error_clear_last(); |
|
| 306 | - $result = \pspell_config_save_repl($dictionary_link, $flag); |
|
| 307 | - if ($result === false) { |
|
| 308 | - throw PspellException::createFromPhpError(); |
|
| 309 | - } |
|
| 305 | + error_clear_last(); |
|
| 306 | + $result = \pspell_config_save_repl($dictionary_link, $flag); |
|
| 307 | + if ($result === false) { |
|
| 308 | + throw PspellException::createFromPhpError(); |
|
| 309 | + } |
|
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | |
@@ -321,12 +321,12 @@ discard block |
||
| 321 | 321 | */ |
| 322 | 322 | function pspell_new_config(int $config): int |
| 323 | 323 | { |
| 324 | - error_clear_last(); |
|
| 325 | - $result = \pspell_new_config($config); |
|
| 326 | - if ($result === false) { |
|
| 327 | - throw PspellException::createFromPhpError(); |
|
| 328 | - } |
|
| 329 | - return $result; |
|
| 324 | + error_clear_last(); |
|
| 325 | + $result = \pspell_new_config($config); |
|
| 326 | + if ($result === false) { |
|
| 327 | + throw PspellException::createFromPhpError(); |
|
| 328 | + } |
|
| 329 | + return $result; |
|
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | |
@@ -394,22 +394,22 @@ discard block |
||
| 394 | 394 | */ |
| 395 | 395 | function pspell_new(string $language, string $spelling = null, string $jargon = null, string $encoding = null, int $mode = 0): int |
| 396 | 396 | { |
| 397 | - error_clear_last(); |
|
| 398 | - if ($mode !== 0) { |
|
| 399 | - $result = \pspell_new($language, $spelling, $jargon, $encoding, $mode); |
|
| 400 | - } elseif ($encoding !== null) { |
|
| 401 | - $result = \pspell_new($language, $spelling, $jargon, $encoding); |
|
| 402 | - } elseif ($jargon !== null) { |
|
| 403 | - $result = \pspell_new($language, $spelling, $jargon); |
|
| 404 | - } elseif ($spelling !== null) { |
|
| 405 | - $result = \pspell_new($language, $spelling); |
|
| 406 | - } else { |
|
| 407 | - $result = \pspell_new($language); |
|
| 408 | - } |
|
| 409 | - if ($result === false) { |
|
| 410 | - throw PspellException::createFromPhpError(); |
|
| 411 | - } |
|
| 412 | - return $result; |
|
| 397 | + error_clear_last(); |
|
| 398 | + if ($mode !== 0) { |
|
| 399 | + $result = \pspell_new($language, $spelling, $jargon, $encoding, $mode); |
|
| 400 | + } elseif ($encoding !== null) { |
|
| 401 | + $result = \pspell_new($language, $spelling, $jargon, $encoding); |
|
| 402 | + } elseif ($jargon !== null) { |
|
| 403 | + $result = \pspell_new($language, $spelling, $jargon); |
|
| 404 | + } elseif ($spelling !== null) { |
|
| 405 | + $result = \pspell_new($language, $spelling); |
|
| 406 | + } else { |
|
| 407 | + $result = \pspell_new($language); |
|
| 408 | + } |
|
| 409 | + if ($result === false) { |
|
| 410 | + throw PspellException::createFromPhpError(); |
|
| 411 | + } |
|
| 412 | + return $result; |
|
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | |
@@ -423,11 +423,11 @@ discard block |
||
| 423 | 423 | */ |
| 424 | 424 | function pspell_save_wordlist(int $dictionary_link): void |
| 425 | 425 | { |
| 426 | - error_clear_last(); |
|
| 427 | - $result = \pspell_save_wordlist($dictionary_link); |
|
| 428 | - if ($result === false) { |
|
| 429 | - throw PspellException::createFromPhpError(); |
|
| 430 | - } |
|
| 426 | + error_clear_last(); |
|
| 427 | + $result = \pspell_save_wordlist($dictionary_link); |
|
| 428 | + if ($result === false) { |
|
| 429 | + throw PspellException::createFromPhpError(); |
|
| 430 | + } |
|
| 431 | 431 | } |
| 432 | 432 | |
| 433 | 433 | |
@@ -443,9 +443,9 @@ discard block |
||
| 443 | 443 | */ |
| 444 | 444 | function pspell_store_replacement(int $dictionary_link, string $misspelled, string $correct): void |
| 445 | 445 | { |
| 446 | - error_clear_last(); |
|
| 447 | - $result = \pspell_store_replacement($dictionary_link, $misspelled, $correct); |
|
| 448 | - if ($result === false) { |
|
| 449 | - throw PspellException::createFromPhpError(); |
|
| 450 | - } |
|
| 446 | + error_clear_last(); |
|
| 447 | + $result = \pspell_store_replacement($dictionary_link, $misspelled, $correct); |
|
| 448 | + if ($result === false) { |
|
| 449 | + throw PspellException::createFromPhpError(); |
|
| 450 | + } |
|
| 451 | 451 | } |
@@ -13,12 +13,12 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | function apache_get_version(): string |
| 15 | 15 | { |
| 16 | - error_clear_last(); |
|
| 17 | - $result = \apache_get_version(); |
|
| 18 | - if ($result === false) { |
|
| 19 | - throw ApacheException::createFromPhpError(); |
|
| 20 | - } |
|
| 21 | - return $result; |
|
| 16 | + error_clear_last(); |
|
| 17 | + $result = \apache_get_version(); |
|
| 18 | + if ($result === false) { |
|
| 19 | + throw ApacheException::createFromPhpError(); |
|
| 20 | + } |
|
| 21 | + return $result; |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | |
@@ -36,12 +36,12 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | function apache_getenv(string $variable, bool $walk_to_top = false): string |
| 38 | 38 | { |
| 39 | - error_clear_last(); |
|
| 40 | - $result = \apache_getenv($variable, $walk_to_top); |
|
| 41 | - if ($result === false) { |
|
| 42 | - throw ApacheException::createFromPhpError(); |
|
| 43 | - } |
|
| 44 | - return $result; |
|
| 39 | + error_clear_last(); |
|
| 40 | + $result = \apache_getenv($variable, $walk_to_top); |
|
| 41 | + if ($result === false) { |
|
| 42 | + throw ApacheException::createFromPhpError(); |
|
| 43 | + } |
|
| 44 | + return $result; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | |
@@ -56,12 +56,12 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | function apache_request_headers(): array |
| 58 | 58 | { |
| 59 | - error_clear_last(); |
|
| 60 | - $result = \apache_request_headers(); |
|
| 61 | - if ($result === false) { |
|
| 62 | - throw ApacheException::createFromPhpError(); |
|
| 63 | - } |
|
| 64 | - return $result; |
|
| 59 | + error_clear_last(); |
|
| 60 | + $result = \apache_request_headers(); |
|
| 61 | + if ($result === false) { |
|
| 62 | + throw ApacheException::createFromPhpError(); |
|
| 63 | + } |
|
| 64 | + return $result; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | |
@@ -79,11 +79,11 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | function apache_reset_timeout(): void |
| 81 | 81 | { |
| 82 | - error_clear_last(); |
|
| 83 | - $result = \apache_reset_timeout(); |
|
| 84 | - if ($result === false) { |
|
| 85 | - throw ApacheException::createFromPhpError(); |
|
| 86 | - } |
|
| 82 | + error_clear_last(); |
|
| 83 | + $result = \apache_reset_timeout(); |
|
| 84 | + if ($result === false) { |
|
| 85 | + throw ApacheException::createFromPhpError(); |
|
| 86 | + } |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | |
@@ -98,12 +98,12 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | function apache_response_headers(): array |
| 100 | 100 | { |
| 101 | - error_clear_last(); |
|
| 102 | - $result = \apache_response_headers(); |
|
| 103 | - if ($result === false) { |
|
| 104 | - throw ApacheException::createFromPhpError(); |
|
| 105 | - } |
|
| 106 | - return $result; |
|
| 101 | + error_clear_last(); |
|
| 102 | + $result = \apache_response_headers(); |
|
| 103 | + if ($result === false) { |
|
| 104 | + throw ApacheException::createFromPhpError(); |
|
| 105 | + } |
|
| 106 | + return $result; |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | |
@@ -120,11 +120,11 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | function apache_setenv(string $variable, string $value, bool $walk_to_top = false): void |
| 122 | 122 | { |
| 123 | - error_clear_last(); |
|
| 124 | - $result = \apache_setenv($variable, $value, $walk_to_top); |
|
| 125 | - if ($result === false) { |
|
| 126 | - throw ApacheException::createFromPhpError(); |
|
| 127 | - } |
|
| 123 | + error_clear_last(); |
|
| 124 | + $result = \apache_setenv($variable, $value, $walk_to_top); |
|
| 125 | + if ($result === false) { |
|
| 126 | + throw ApacheException::createFromPhpError(); |
|
| 127 | + } |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | |
@@ -141,12 +141,12 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | function getallheaders(): array |
| 143 | 143 | { |
| 144 | - error_clear_last(); |
|
| 145 | - $result = \getallheaders(); |
|
| 146 | - if ($result === false) { |
|
| 147 | - throw ApacheException::createFromPhpError(); |
|
| 148 | - } |
|
| 149 | - return $result; |
|
| 144 | + error_clear_last(); |
|
| 145 | + $result = \getallheaders(); |
|
| 146 | + if ($result === false) { |
|
| 147 | + throw ApacheException::createFromPhpError(); |
|
| 148 | + } |
|
| 149 | + return $result; |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | |
@@ -169,9 +169,9 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | function virtual(string $filename): void |
| 171 | 171 | { |
| 172 | - error_clear_last(); |
|
| 173 | - $result = \virtual($filename); |
|
| 174 | - if ($result === false) { |
|
| 175 | - throw ApacheException::createFromPhpError(); |
|
| 176 | - } |
|
| 172 | + error_clear_last(); |
|
| 173 | + $result = \virtual($filename); |
|
| 174 | + if ($result === false) { |
|
| 175 | + throw ApacheException::createFromPhpError(); |
|
| 176 | + } |
|
| 177 | 177 | } |
@@ -16,12 +16,12 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | function curl_escape($ch, string $str): string |
| 18 | 18 | { |
| 19 | - error_clear_last(); |
|
| 20 | - $result = \curl_escape($ch, $str); |
|
| 21 | - if ($result === false) { |
|
| 22 | - throw CurlException::createFromCurlResource($ch); |
|
| 23 | - } |
|
| 24 | - return $result; |
|
| 19 | + error_clear_last(); |
|
| 20 | + $result = \curl_escape($ch, $str); |
|
| 21 | + if ($result === false) { |
|
| 22 | + throw CurlException::createFromCurlResource($ch); |
|
| 23 | + } |
|
| 24 | + return $result; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | |
@@ -41,12 +41,12 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | function curl_exec($ch) |
| 43 | 43 | { |
| 44 | - error_clear_last(); |
|
| 45 | - $result = \curl_exec($ch); |
|
| 46 | - if ($result === false) { |
|
| 47 | - throw CurlException::createFromCurlResource($ch); |
|
| 48 | - } |
|
| 49 | - return $result; |
|
| 44 | + error_clear_last(); |
|
| 45 | + $result = \curl_exec($ch); |
|
| 46 | + if ($result === false) { |
|
| 47 | + throw CurlException::createFromCurlResource($ch); |
|
| 48 | + } |
|
| 49 | + return $result; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | |
@@ -514,16 +514,16 @@ discard block |
||
| 514 | 514 | */ |
| 515 | 515 | function curl_getinfo($ch, int $opt = null) |
| 516 | 516 | { |
| 517 | - error_clear_last(); |
|
| 518 | - if ($opt !== null) { |
|
| 519 | - $result = \curl_getinfo($ch, $opt); |
|
| 520 | - } else { |
|
| 521 | - $result = \curl_getinfo($ch); |
|
| 522 | - } |
|
| 523 | - if ($result === false) { |
|
| 524 | - throw CurlException::createFromCurlResource($ch); |
|
| 525 | - } |
|
| 526 | - return $result; |
|
| 517 | + error_clear_last(); |
|
| 518 | + if ($opt !== null) { |
|
| 519 | + $result = \curl_getinfo($ch, $opt); |
|
| 520 | + } else { |
|
| 521 | + $result = \curl_getinfo($ch); |
|
| 522 | + } |
|
| 523 | + if ($result === false) { |
|
| 524 | + throw CurlException::createFromCurlResource($ch); |
|
| 525 | + } |
|
| 526 | + return $result; |
|
| 527 | 527 | } |
| 528 | 528 | |
| 529 | 529 | |
@@ -544,12 +544,12 @@ discard block |
||
| 544 | 544 | */ |
| 545 | 545 | function curl_init(string $url = null) |
| 546 | 546 | { |
| 547 | - error_clear_last(); |
|
| 548 | - $result = \curl_init($url); |
|
| 549 | - if ($result === false) { |
|
| 550 | - throw CurlException::createFromPhpError(); |
|
| 551 | - } |
|
| 552 | - return $result; |
|
| 547 | + error_clear_last(); |
|
| 548 | + $result = \curl_init($url); |
|
| 549 | + if ($result === false) { |
|
| 550 | + throw CurlException::createFromPhpError(); |
|
| 551 | + } |
|
| 552 | + return $result; |
|
| 553 | 553 | } |
| 554 | 554 | |
| 555 | 555 | |
@@ -564,12 +564,12 @@ discard block |
||
| 564 | 564 | */ |
| 565 | 565 | function curl_multi_errno($mh): int |
| 566 | 566 | { |
| 567 | - error_clear_last(); |
|
| 568 | - $result = \curl_multi_errno($mh); |
|
| 569 | - if ($result === false) { |
|
| 570 | - throw CurlException::createFromPhpError(); |
|
| 571 | - } |
|
| 572 | - return $result; |
|
| 567 | + error_clear_last(); |
|
| 568 | + $result = \curl_multi_errno($mh); |
|
| 569 | + if ($result === false) { |
|
| 570 | + throw CurlException::createFromPhpError(); |
|
| 571 | + } |
|
| 572 | + return $result; |
|
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | |
@@ -620,12 +620,12 @@ discard block |
||
| 620 | 620 | */ |
| 621 | 621 | function curl_multi_info_read($mh, ?int &$msgs_in_queue = null): array |
| 622 | 622 | { |
| 623 | - error_clear_last(); |
|
| 624 | - $result = \curl_multi_info_read($mh, $msgs_in_queue); |
|
| 625 | - if ($result === false) { |
|
| 626 | - throw CurlException::createFromPhpError(); |
|
| 627 | - } |
|
| 628 | - return $result; |
|
| 623 | + error_clear_last(); |
|
| 624 | + $result = \curl_multi_info_read($mh, $msgs_in_queue); |
|
| 625 | + if ($result === false) { |
|
| 626 | + throw CurlException::createFromPhpError(); |
|
| 627 | + } |
|
| 628 | + return $result; |
|
| 629 | 629 | } |
| 630 | 630 | |
| 631 | 631 | |
@@ -638,12 +638,12 @@ discard block |
||
| 638 | 638 | */ |
| 639 | 639 | function curl_multi_init() |
| 640 | 640 | { |
| 641 | - error_clear_last(); |
|
| 642 | - $result = \curl_multi_init(); |
|
| 643 | - if ($result === false) { |
|
| 644 | - throw CurlException::createFromPhpError(); |
|
| 645 | - } |
|
| 646 | - return $result; |
|
| 641 | + error_clear_last(); |
|
| 642 | + $result = \curl_multi_init(); |
|
| 643 | + if ($result === false) { |
|
| 644 | + throw CurlException::createFromPhpError(); |
|
| 645 | + } |
|
| 646 | + return $result; |
|
| 647 | 647 | } |
| 648 | 648 | |
| 649 | 649 | |
@@ -3033,11 +3033,11 @@ discard block |
||
| 3033 | 3033 | */ |
| 3034 | 3034 | function curl_setopt($ch, int $option, $value): void |
| 3035 | 3035 | { |
| 3036 | - error_clear_last(); |
|
| 3037 | - $result = \curl_setopt($ch, $option, $value); |
|
| 3038 | - if ($result === false) { |
|
| 3039 | - throw CurlException::createFromCurlResource($ch); |
|
| 3040 | - } |
|
| 3036 | + error_clear_last(); |
|
| 3037 | + $result = \curl_setopt($ch, $option, $value); |
|
| 3038 | + if ($result === false) { |
|
| 3039 | + throw CurlException::createFromCurlResource($ch); |
|
| 3040 | + } |
|
| 3041 | 3041 | } |
| 3042 | 3042 | |
| 3043 | 3043 | |
@@ -3051,12 +3051,12 @@ discard block |
||
| 3051 | 3051 | */ |
| 3052 | 3052 | function curl_share_errno($sh): int |
| 3053 | 3053 | { |
| 3054 | - error_clear_last(); |
|
| 3055 | - $result = \curl_share_errno($sh); |
|
| 3056 | - if ($result === false) { |
|
| 3057 | - throw CurlException::createFromPhpError(); |
|
| 3058 | - } |
|
| 3059 | - return $result; |
|
| 3054 | + error_clear_last(); |
|
| 3055 | + $result = \curl_share_errno($sh); |
|
| 3056 | + if ($result === false) { |
|
| 3057 | + throw CurlException::createFromPhpError(); |
|
| 3058 | + } |
|
| 3059 | + return $result; |
|
| 3060 | 3060 | } |
| 3061 | 3061 | |
| 3062 | 3062 | |
@@ -3127,11 +3127,11 @@ discard block |
||
| 3127 | 3127 | */ |
| 3128 | 3128 | function curl_share_setopt($sh, int $option, string $value): void |
| 3129 | 3129 | { |
| 3130 | - error_clear_last(); |
|
| 3131 | - $result = \curl_share_setopt($sh, $option, $value); |
|
| 3132 | - if ($result === false) { |
|
| 3133 | - throw CurlException::createFromPhpError(); |
|
| 3134 | - } |
|
| 3130 | + error_clear_last(); |
|
| 3131 | + $result = \curl_share_setopt($sh, $option, $value); |
|
| 3132 | + if ($result === false) { |
|
| 3133 | + throw CurlException::createFromPhpError(); |
|
| 3134 | + } |
|
| 3135 | 3135 | } |
| 3136 | 3136 | |
| 3137 | 3137 | |
@@ -3147,10 +3147,10 @@ discard block |
||
| 3147 | 3147 | */ |
| 3148 | 3148 | function curl_unescape($ch, string $str): string |
| 3149 | 3149 | { |
| 3150 | - error_clear_last(); |
|
| 3151 | - $result = \curl_unescape($ch, $str); |
|
| 3152 | - if ($result === false) { |
|
| 3153 | - throw CurlException::createFromCurlResource($ch); |
|
| 3154 | - } |
|
| 3155 | - return $result; |
|
| 3150 | + error_clear_last(); |
|
| 3151 | + $result = \curl_unescape($ch, $str); |
|
| 3152 | + if ($result === false) { |
|
| 3153 | + throw CurlException::createFromCurlResource($ch); |
|
| 3154 | + } |
|
| 3155 | + return $result; |
|
| 3156 | 3156 | } |
@@ -22,17 +22,17 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | function pcntl_exec(string $path, array $args = null, array $envs = null): void |
| 24 | 24 | { |
| 25 | - error_clear_last(); |
|
| 26 | - if ($envs !== null) { |
|
| 27 | - $result = \pcntl_exec($path, $args, $envs); |
|
| 28 | - } elseif ($args !== null) { |
|
| 29 | - $result = \pcntl_exec($path, $args); |
|
| 30 | - } else { |
|
| 31 | - $result = \pcntl_exec($path); |
|
| 32 | - } |
|
| 33 | - if ($result === false) { |
|
| 34 | - throw PcntlException::createFromPhpError(); |
|
| 35 | - } |
|
| 25 | + error_clear_last(); |
|
| 26 | + if ($envs !== null) { |
|
| 27 | + $result = \pcntl_exec($path, $args, $envs); |
|
| 28 | + } elseif ($args !== null) { |
|
| 29 | + $result = \pcntl_exec($path, $args); |
|
| 30 | + } else { |
|
| 31 | + $result = \pcntl_exec($path); |
|
| 32 | + } |
|
| 33 | + if ($result === false) { |
|
| 34 | + throw PcntlException::createFromPhpError(); |
|
| 35 | + } |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | |
@@ -52,18 +52,18 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | function pcntl_getpriority(int $pid = null, int $process_identifier = PRIO_PROCESS): int |
| 54 | 54 | { |
| 55 | - error_clear_last(); |
|
| 56 | - if ($process_identifier !== PRIO_PROCESS) { |
|
| 57 | - $result = \pcntl_getpriority($pid, $process_identifier); |
|
| 58 | - } elseif ($pid !== null) { |
|
| 59 | - $result = \pcntl_getpriority($pid); |
|
| 60 | - } else { |
|
| 61 | - $result = \pcntl_getpriority(); |
|
| 62 | - } |
|
| 63 | - if ($result === false) { |
|
| 64 | - throw PcntlException::createFromPhpError(); |
|
| 65 | - } |
|
| 66 | - return $result; |
|
| 55 | + error_clear_last(); |
|
| 56 | + if ($process_identifier !== PRIO_PROCESS) { |
|
| 57 | + $result = \pcntl_getpriority($pid, $process_identifier); |
|
| 58 | + } elseif ($pid !== null) { |
|
| 59 | + $result = \pcntl_getpriority($pid); |
|
| 60 | + } else { |
|
| 61 | + $result = \pcntl_getpriority(); |
|
| 62 | + } |
|
| 63 | + if ($result === false) { |
|
| 64 | + throw PcntlException::createFromPhpError(); |
|
| 65 | + } |
|
| 66 | + return $result; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | |
@@ -85,17 +85,17 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | function pcntl_setpriority(int $priority, int $pid = null, int $process_identifier = PRIO_PROCESS): void |
| 87 | 87 | { |
| 88 | - error_clear_last(); |
|
| 89 | - if ($process_identifier !== PRIO_PROCESS) { |
|
| 90 | - $result = \pcntl_setpriority($priority, $pid, $process_identifier); |
|
| 91 | - } elseif ($pid !== null) { |
|
| 92 | - $result = \pcntl_setpriority($priority, $pid); |
|
| 93 | - } else { |
|
| 94 | - $result = \pcntl_setpriority($priority); |
|
| 95 | - } |
|
| 96 | - if ($result === false) { |
|
| 97 | - throw PcntlException::createFromPhpError(); |
|
| 98 | - } |
|
| 88 | + error_clear_last(); |
|
| 89 | + if ($process_identifier !== PRIO_PROCESS) { |
|
| 90 | + $result = \pcntl_setpriority($priority, $pid, $process_identifier); |
|
| 91 | + } elseif ($pid !== null) { |
|
| 92 | + $result = \pcntl_setpriority($priority, $pid); |
|
| 93 | + } else { |
|
| 94 | + $result = \pcntl_setpriority($priority); |
|
| 95 | + } |
|
| 96 | + if ($result === false) { |
|
| 97 | + throw PcntlException::createFromPhpError(); |
|
| 98 | + } |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | function pcntl_signal_dispatch(): void |
| 111 | 111 | { |
| 112 | - error_clear_last(); |
|
| 113 | - $result = \pcntl_signal_dispatch(); |
|
| 114 | - if ($result === false) { |
|
| 115 | - throw PcntlException::createFromPhpError(); |
|
| 116 | - } |
|
| 112 | + error_clear_last(); |
|
| 113 | + $result = \pcntl_signal_dispatch(); |
|
| 114 | + if ($result === false) { |
|
| 115 | + throw PcntlException::createFromPhpError(); |
|
| 116 | + } |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | |
@@ -139,11 +139,11 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | function pcntl_sigprocmask(int $how, array $set, ?array &$oldset = null): void |
| 141 | 141 | { |
| 142 | - error_clear_last(); |
|
| 143 | - $result = \pcntl_sigprocmask($how, $set, $oldset); |
|
| 144 | - if ($result === false) { |
|
| 145 | - throw PcntlException::createFromPhpError(); |
|
| 146 | - } |
|
| 142 | + error_clear_last(); |
|
| 143 | + $result = \pcntl_sigprocmask($how, $set, $oldset); |
|
| 144 | + if ($result === false) { |
|
| 145 | + throw PcntlException::createFromPhpError(); |
|
| 146 | + } |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | |
@@ -157,10 +157,10 @@ discard block |
||
| 157 | 157 | */ |
| 158 | 158 | function pcntl_strerror(int $errno): string |
| 159 | 159 | { |
| 160 | - error_clear_last(); |
|
| 161 | - $result = \pcntl_strerror($errno); |
|
| 162 | - if ($result === false) { |
|
| 163 | - throw PcntlException::createFromPhpError(); |
|
| 164 | - } |
|
| 165 | - return $result; |
|
| 160 | + error_clear_last(); |
|
| 161 | + $result = \pcntl_strerror($errno); |
|
| 162 | + if ($result === false) { |
|
| 163 | + throw PcntlException::createFromPhpError(); |
|
| 164 | + } |
|
| 165 | + return $result; |
|
| 166 | 166 | } |
@@ -16,12 +16,12 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | function create_function(string $args, string $code): string |
| 18 | 18 | { |
| 19 | - error_clear_last(); |
|
| 20 | - $result = \create_function($args, $code); |
|
| 21 | - if ($result === false) { |
|
| 22 | - throw FunchandException::createFromPhpError(); |
|
| 23 | - } |
|
| 24 | - return $result; |
|
| 19 | + error_clear_last(); |
|
| 20 | + $result = \create_function($args, $code); |
|
| 21 | + if ($result === false) { |
|
| 22 | + throw FunchandException::createFromPhpError(); |
|
| 23 | + } |
|
| 24 | + return $result; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | |
@@ -35,13 +35,13 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | function register_tick_function(callable $function, ...$params): void |
| 37 | 37 | { |
| 38 | - error_clear_last(); |
|
| 39 | - if ($params !== []) { |
|
| 40 | - $result = \register_tick_function($function, ...$params); |
|
| 41 | - } else { |
|
| 42 | - $result = \register_tick_function($function); |
|
| 43 | - } |
|
| 44 | - if ($result === false) { |
|
| 45 | - throw FunchandException::createFromPhpError(); |
|
| 46 | - } |
|
| 38 | + error_clear_last(); |
|
| 39 | + if ($params !== []) { |
|
| 40 | + $result = \register_tick_function($function, ...$params); |
|
| 41 | + } else { |
|
| 42 | + $result = \register_tick_function($function); |
|
| 43 | + } |
|
| 44 | + if ($result === false) { |
|
| 45 | + throw FunchandException::createFromPhpError(); |
|
| 46 | + } |
|
| 47 | 47 | } |
@@ -24,11 +24,11 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | function imap_append($imap_stream, string $mailbox, string $message, string $options = null, string $internal_date = null): void |
| 26 | 26 | { |
| 27 | - error_clear_last(); |
|
| 28 | - $result = \imap_append($imap_stream, $mailbox, $message, $options, $internal_date); |
|
| 29 | - if ($result === false) { |
|
| 30 | - throw ImapException::createFromPhpError(); |
|
| 31 | - } |
|
| 27 | + error_clear_last(); |
|
| 28 | + $result = \imap_append($imap_stream, $mailbox, $message, $options, $internal_date); |
|
| 29 | + if ($result === false) { |
|
| 30 | + throw ImapException::createFromPhpError(); |
|
| 31 | + } |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | |
@@ -73,12 +73,12 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | function imap_check($imap_stream): \stdClass |
| 75 | 75 | { |
| 76 | - error_clear_last(); |
|
| 77 | - $result = \imap_check($imap_stream); |
|
| 78 | - if ($result === false) { |
|
| 79 | - throw ImapException::createFromPhpError(); |
|
| 80 | - } |
|
| 81 | - return $result; |
|
| 76 | + error_clear_last(); |
|
| 77 | + $result = \imap_check($imap_stream); |
|
| 78 | + if ($result === false) { |
|
| 79 | + throw ImapException::createFromPhpError(); |
|
| 80 | + } |
|
| 81 | + return $result; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | */ |
| 110 | 110 | function imap_clearflag_full($imap_stream, string $sequence, string $flag, int $options = 0): void |
| 111 | 111 | { |
| 112 | - error_clear_last(); |
|
| 113 | - $result = \imap_clearflag_full($imap_stream, $sequence, $flag, $options); |
|
| 114 | - if ($result === false) { |
|
| 115 | - throw ImapException::createFromPhpError(); |
|
| 116 | - } |
|
| 112 | + error_clear_last(); |
|
| 113 | + $result = \imap_clearflag_full($imap_stream, $sequence, $flag, $options); |
|
| 114 | + if ($result === false) { |
|
| 115 | + throw ImapException::createFromPhpError(); |
|
| 116 | + } |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | |
@@ -131,11 +131,11 @@ discard block |
||
| 131 | 131 | */ |
| 132 | 132 | function imap_close($imap_stream, int $flag = 0): void |
| 133 | 133 | { |
| 134 | - error_clear_last(); |
|
| 135 | - $result = \imap_close($imap_stream, $flag); |
|
| 136 | - if ($result === false) { |
|
| 137 | - throw ImapException::createFromPhpError(); |
|
| 138 | - } |
|
| 134 | + error_clear_last(); |
|
| 135 | + $result = \imap_close($imap_stream, $flag); |
|
| 136 | + if ($result === false) { |
|
| 137 | + throw ImapException::createFromPhpError(); |
|
| 138 | + } |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | |
@@ -152,11 +152,11 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | function imap_createmailbox($imap_stream, string $mailbox): void |
| 154 | 154 | { |
| 155 | - error_clear_last(); |
|
| 156 | - $result = \imap_createmailbox($imap_stream, $mailbox); |
|
| 157 | - if ($result === false) { |
|
| 158 | - throw ImapException::createFromPhpError(); |
|
| 159 | - } |
|
| 155 | + error_clear_last(); |
|
| 156 | + $result = \imap_createmailbox($imap_stream, $mailbox); |
|
| 157 | + if ($result === false) { |
|
| 158 | + throw ImapException::createFromPhpError(); |
|
| 159 | + } |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | |
@@ -172,11 +172,11 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | function imap_deletemailbox($imap_stream, string $mailbox): void |
| 174 | 174 | { |
| 175 | - error_clear_last(); |
|
| 176 | - $result = \imap_deletemailbox($imap_stream, $mailbox); |
|
| 177 | - if ($result === false) { |
|
| 178 | - throw ImapException::createFromPhpError(); |
|
| 179 | - } |
|
| 175 | + error_clear_last(); |
|
| 176 | + $result = \imap_deletemailbox($imap_stream, $mailbox); |
|
| 177 | + if ($result === false) { |
|
| 178 | + throw ImapException::createFromPhpError(); |
|
| 179 | + } |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | |
@@ -319,12 +319,12 @@ discard block |
||
| 319 | 319 | */ |
| 320 | 320 | function imap_fetchstructure($imap_stream, int $msg_number, int $options = 0): \stdClass |
| 321 | 321 | { |
| 322 | - error_clear_last(); |
|
| 323 | - $result = \imap_fetchstructure($imap_stream, $msg_number, $options); |
|
| 324 | - if ($result === false) { |
|
| 325 | - throw ImapException::createFromPhpError(); |
|
| 326 | - } |
|
| 327 | - return $result; |
|
| 322 | + error_clear_last(); |
|
| 323 | + $result = \imap_fetchstructure($imap_stream, $msg_number, $options); |
|
| 324 | + if ($result === false) { |
|
| 325 | + throw ImapException::createFromPhpError(); |
|
| 326 | + } |
|
| 327 | + return $result; |
|
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | |
@@ -343,11 +343,11 @@ discard block |
||
| 343 | 343 | */ |
| 344 | 344 | function imap_gc($imap_stream, int $caches): void |
| 345 | 345 | { |
| 346 | - error_clear_last(); |
|
| 347 | - $result = \imap_gc($imap_stream, $caches); |
|
| 348 | - if ($result === false) { |
|
| 349 | - throw ImapException::createFromPhpError(); |
|
| 350 | - } |
|
| 346 | + error_clear_last(); |
|
| 347 | + $result = \imap_gc($imap_stream, $caches); |
|
| 348 | + if ($result === false) { |
|
| 349 | + throw ImapException::createFromPhpError(); |
|
| 350 | + } |
|
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | |
@@ -569,12 +569,12 @@ discard block |
||
| 569 | 569 | */ |
| 570 | 570 | function imap_headerinfo($imap_stream, int $msg_number, int $fromlength = 0, int $subjectlength = 0, string $defaulthost = null): \stdClass |
| 571 | 571 | { |
| 572 | - error_clear_last(); |
|
| 573 | - $result = \imap_headerinfo($imap_stream, $msg_number, $fromlength, $subjectlength, $defaulthost); |
|
| 574 | - if ($result === false) { |
|
| 575 | - throw ImapException::createFromPhpError(); |
|
| 576 | - } |
|
| 577 | - return $result; |
|
| 572 | + error_clear_last(); |
|
| 573 | + $result = \imap_headerinfo($imap_stream, $msg_number, $fromlength, $subjectlength, $defaulthost); |
|
| 574 | + if ($result === false) { |
|
| 575 | + throw ImapException::createFromPhpError(); |
|
| 576 | + } |
|
| 577 | + return $result; |
|
| 578 | 578 | } |
| 579 | 579 | |
| 580 | 580 | |
@@ -687,12 +687,12 @@ discard block |
||
| 687 | 687 | */ |
| 688 | 688 | function imap_mail_compose(array $envelope, array $body): string |
| 689 | 689 | { |
| 690 | - error_clear_last(); |
|
| 691 | - $result = \imap_mail_compose($envelope, $body); |
|
| 692 | - if ($result === false) { |
|
| 693 | - throw ImapException::createFromPhpError(); |
|
| 694 | - } |
|
| 695 | - return $result; |
|
| 690 | + error_clear_last(); |
|
| 691 | + $result = \imap_mail_compose($envelope, $body); |
|
| 692 | + if ($result === false) { |
|
| 693 | + throw ImapException::createFromPhpError(); |
|
| 694 | + } |
|
| 695 | + return $result; |
|
| 696 | 696 | } |
| 697 | 697 | |
| 698 | 698 | |
@@ -725,11 +725,11 @@ discard block |
||
| 725 | 725 | */ |
| 726 | 726 | function imap_mail_copy($imap_stream, string $msglist, string $mailbox, int $options = 0): void |
| 727 | 727 | { |
| 728 | - error_clear_last(); |
|
| 729 | - $result = \imap_mail_copy($imap_stream, $msglist, $mailbox, $options); |
|
| 730 | - if ($result === false) { |
|
| 731 | - throw ImapException::createFromPhpError(); |
|
| 732 | - } |
|
| 728 | + error_clear_last(); |
|
| 729 | + $result = \imap_mail_copy($imap_stream, $msglist, $mailbox, $options); |
|
| 730 | + if ($result === false) { |
|
| 731 | + throw ImapException::createFromPhpError(); |
|
| 732 | + } |
|
| 733 | 733 | } |
| 734 | 734 | |
| 735 | 735 | |
@@ -756,11 +756,11 @@ discard block |
||
| 756 | 756 | */ |
| 757 | 757 | function imap_mail_move($imap_stream, string $msglist, string $mailbox, int $options = 0): void |
| 758 | 758 | { |
| 759 | - error_clear_last(); |
|
| 760 | - $result = \imap_mail_move($imap_stream, $msglist, $mailbox, $options); |
|
| 761 | - if ($result === false) { |
|
| 762 | - throw ImapException::createFromPhpError(); |
|
| 763 | - } |
|
| 759 | + error_clear_last(); |
|
| 760 | + $result = \imap_mail_move($imap_stream, $msglist, $mailbox, $options); |
|
| 761 | + if ($result === false) { |
|
| 762 | + throw ImapException::createFromPhpError(); |
|
| 763 | + } |
|
| 764 | 764 | } |
| 765 | 765 | |
| 766 | 766 | |
@@ -786,11 +786,11 @@ discard block |
||
| 786 | 786 | */ |
| 787 | 787 | function imap_mail(string $to, string $subject, string $message, string $additional_headers = null, string $cc = null, string $bcc = null, string $rpath = null): void |
| 788 | 788 | { |
| 789 | - error_clear_last(); |
|
| 790 | - $result = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc, $rpath); |
|
| 791 | - if ($result === false) { |
|
| 792 | - throw ImapException::createFromPhpError(); |
|
| 793 | - } |
|
| 789 | + error_clear_last(); |
|
| 790 | + $result = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc, $rpath); |
|
| 791 | + if ($result === false) { |
|
| 792 | + throw ImapException::createFromPhpError(); |
|
| 793 | + } |
|
| 794 | 794 | } |
| 795 | 795 | |
| 796 | 796 | |
@@ -849,12 +849,12 @@ discard block |
||
| 849 | 849 | */ |
| 850 | 850 | function imap_mailboxmsginfo($imap_stream): \stdClass |
| 851 | 851 | { |
| 852 | - error_clear_last(); |
|
| 853 | - $result = \imap_mailboxmsginfo($imap_stream); |
|
| 854 | - if ($result === false) { |
|
| 855 | - throw ImapException::createFromPhpError(); |
|
| 856 | - } |
|
| 857 | - return $result; |
|
| 852 | + error_clear_last(); |
|
| 853 | + $result = \imap_mailboxmsginfo($imap_stream); |
|
| 854 | + if ($result === false) { |
|
| 855 | + throw ImapException::createFromPhpError(); |
|
| 856 | + } |
|
| 857 | + return $result; |
|
| 858 | 858 | } |
| 859 | 859 | |
| 860 | 860 | |
@@ -868,12 +868,12 @@ discard block |
||
| 868 | 868 | */ |
| 869 | 869 | function imap_mutf7_to_utf8(string $in): string |
| 870 | 870 | { |
| 871 | - error_clear_last(); |
|
| 872 | - $result = \imap_mutf7_to_utf8($in); |
|
| 873 | - if ($result === false) { |
|
| 874 | - throw ImapException::createFromPhpError(); |
|
| 875 | - } |
|
| 876 | - return $result; |
|
| 871 | + error_clear_last(); |
|
| 872 | + $result = \imap_mutf7_to_utf8($in); |
|
| 873 | + if ($result === false) { |
|
| 874 | + throw ImapException::createFromPhpError(); |
|
| 875 | + } |
|
| 876 | + return $result; |
|
| 877 | 877 | } |
| 878 | 878 | |
| 879 | 879 | |
@@ -888,12 +888,12 @@ discard block |
||
| 888 | 888 | */ |
| 889 | 889 | function imap_num_msg($imap_stream): int |
| 890 | 890 | { |
| 891 | - error_clear_last(); |
|
| 892 | - $result = \imap_num_msg($imap_stream); |
|
| 893 | - if ($result === false) { |
|
| 894 | - throw ImapException::createFromPhpError(); |
|
| 895 | - } |
|
| 896 | - return $result; |
|
| 891 | + error_clear_last(); |
|
| 892 | + $result = \imap_num_msg($imap_stream); |
|
| 893 | + if ($result === false) { |
|
| 894 | + throw ImapException::createFromPhpError(); |
|
| 895 | + } |
|
| 896 | + return $result; |
|
| 897 | 897 | } |
| 898 | 898 | |
| 899 | 899 | |
@@ -1103,12 +1103,12 @@ discard block |
||
| 1103 | 1103 | */ |
| 1104 | 1104 | function imap_open(string $mailbox, string $username, string $password, int $options = 0, int $n_retries = 0, ?array $params = null) |
| 1105 | 1105 | { |
| 1106 | - error_clear_last(); |
|
| 1107 | - $result = \imap_open($mailbox, $username, $password, $options, $n_retries, $params); |
|
| 1108 | - if ($result === false) { |
|
| 1109 | - throw ImapException::createFromPhpError(); |
|
| 1110 | - } |
|
| 1111 | - return $result; |
|
| 1106 | + error_clear_last(); |
|
| 1107 | + $result = \imap_open($mailbox, $username, $password, $options, $n_retries, $params); |
|
| 1108 | + if ($result === false) { |
|
| 1109 | + throw ImapException::createFromPhpError(); |
|
| 1110 | + } |
|
| 1111 | + return $result; |
|
| 1112 | 1112 | } |
| 1113 | 1113 | |
| 1114 | 1114 | |
@@ -1128,11 +1128,11 @@ discard block |
||
| 1128 | 1128 | */ |
| 1129 | 1129 | function imap_renamemailbox($imap_stream, string $old_mbox, string $new_mbox): void |
| 1130 | 1130 | { |
| 1131 | - error_clear_last(); |
|
| 1132 | - $result = \imap_renamemailbox($imap_stream, $old_mbox, $new_mbox); |
|
| 1133 | - if ($result === false) { |
|
| 1134 | - throw ImapException::createFromPhpError(); |
|
| 1135 | - } |
|
| 1131 | + error_clear_last(); |
|
| 1132 | + $result = \imap_renamemailbox($imap_stream, $old_mbox, $new_mbox); |
|
| 1133 | + if ($result === false) { |
|
| 1134 | + throw ImapException::createFromPhpError(); |
|
| 1135 | + } |
|
| 1136 | 1136 | } |
| 1137 | 1137 | |
| 1138 | 1138 | |
@@ -1171,11 +1171,11 @@ discard block |
||
| 1171 | 1171 | */ |
| 1172 | 1172 | function imap_savebody($imap_stream, $file, int $msg_number, string $part_number = "", int $options = 0): void |
| 1173 | 1173 | { |
| 1174 | - error_clear_last(); |
|
| 1175 | - $result = \imap_savebody($imap_stream, $file, $msg_number, $part_number, $options); |
|
| 1176 | - if ($result === false) { |
|
| 1177 | - throw ImapException::createFromPhpError(); |
|
| 1178 | - } |
|
| 1174 | + error_clear_last(); |
|
| 1175 | + $result = \imap_savebody($imap_stream, $file, $msg_number, $part_number, $options); |
|
| 1176 | + if ($result === false) { |
|
| 1177 | + throw ImapException::createFromPhpError(); |
|
| 1178 | + } |
|
| 1179 | 1179 | } |
| 1180 | 1180 | |
| 1181 | 1181 | |
@@ -1192,11 +1192,11 @@ discard block |
||
| 1192 | 1192 | */ |
| 1193 | 1193 | function imap_set_quota($imap_stream, string $quota_root, int $quota_limit): void |
| 1194 | 1194 | { |
| 1195 | - error_clear_last(); |
|
| 1196 | - $result = \imap_set_quota($imap_stream, $quota_root, $quota_limit); |
|
| 1197 | - if ($result === false) { |
|
| 1198 | - throw ImapException::createFromPhpError(); |
|
| 1199 | - } |
|
| 1195 | + error_clear_last(); |
|
| 1196 | + $result = \imap_set_quota($imap_stream, $quota_root, $quota_limit); |
|
| 1197 | + if ($result === false) { |
|
| 1198 | + throw ImapException::createFromPhpError(); |
|
| 1199 | + } |
|
| 1200 | 1200 | } |
| 1201 | 1201 | |
| 1202 | 1202 | |
@@ -1215,11 +1215,11 @@ discard block |
||
| 1215 | 1215 | */ |
| 1216 | 1216 | function imap_setacl($imap_stream, string $mailbox, string $id, string $rights): void |
| 1217 | 1217 | { |
| 1218 | - error_clear_last(); |
|
| 1219 | - $result = \imap_setacl($imap_stream, $mailbox, $id, $rights); |
|
| 1220 | - if ($result === false) { |
|
| 1221 | - throw ImapException::createFromPhpError(); |
|
| 1222 | - } |
|
| 1218 | + error_clear_last(); |
|
| 1219 | + $result = \imap_setacl($imap_stream, $mailbox, $id, $rights); |
|
| 1220 | + if ($result === false) { |
|
| 1221 | + throw ImapException::createFromPhpError(); |
|
| 1222 | + } |
|
| 1223 | 1223 | } |
| 1224 | 1224 | |
| 1225 | 1225 | |
@@ -1251,11 +1251,11 @@ discard block |
||
| 1251 | 1251 | */ |
| 1252 | 1252 | function imap_setflag_full($imap_stream, string $sequence, string $flag, int $options = NIL): void |
| 1253 | 1253 | { |
| 1254 | - error_clear_last(); |
|
| 1255 | - $result = \imap_setflag_full($imap_stream, $sequence, $flag, $options); |
|
| 1256 | - if ($result === false) { |
|
| 1257 | - throw ImapException::createFromPhpError(); |
|
| 1258 | - } |
|
| 1254 | + error_clear_last(); |
|
| 1255 | + $result = \imap_setflag_full($imap_stream, $sequence, $flag, $options); |
|
| 1256 | + if ($result === false) { |
|
| 1257 | + throw ImapException::createFromPhpError(); |
|
| 1258 | + } |
|
| 1259 | 1259 | } |
| 1260 | 1260 | |
| 1261 | 1261 | |
@@ -1327,12 +1327,12 @@ discard block |
||
| 1327 | 1327 | */ |
| 1328 | 1328 | function imap_sort($imap_stream, int $criteria, int $reverse, int $options = 0, string $search_criteria = null, string $charset = null): array |
| 1329 | 1329 | { |
| 1330 | - error_clear_last(); |
|
| 1331 | - $result = \imap_sort($imap_stream, $criteria, $reverse, $options, $search_criteria, $charset); |
|
| 1332 | - if ($result === false) { |
|
| 1333 | - throw ImapException::createFromPhpError(); |
|
| 1334 | - } |
|
| 1335 | - return $result; |
|
| 1330 | + error_clear_last(); |
|
| 1331 | + $result = \imap_sort($imap_stream, $criteria, $reverse, $options, $search_criteria, $charset); |
|
| 1332 | + if ($result === false) { |
|
| 1333 | + throw ImapException::createFromPhpError(); |
|
| 1334 | + } |
|
| 1335 | + return $result; |
|
| 1336 | 1336 | } |
| 1337 | 1337 | |
| 1338 | 1338 | |
@@ -1348,11 +1348,11 @@ discard block |
||
| 1348 | 1348 | */ |
| 1349 | 1349 | function imap_subscribe($imap_stream, string $mailbox): void |
| 1350 | 1350 | { |
| 1351 | - error_clear_last(); |
|
| 1352 | - $result = \imap_subscribe($imap_stream, $mailbox); |
|
| 1353 | - if ($result === false) { |
|
| 1354 | - throw ImapException::createFromPhpError(); |
|
| 1355 | - } |
|
| 1351 | + error_clear_last(); |
|
| 1352 | + $result = \imap_subscribe($imap_stream, $mailbox); |
|
| 1353 | + if ($result === false) { |
|
| 1354 | + throw ImapException::createFromPhpError(); |
|
| 1355 | + } |
|
| 1356 | 1356 | } |
| 1357 | 1357 | |
| 1358 | 1358 | |
@@ -1383,12 +1383,12 @@ discard block |
||
| 1383 | 1383 | */ |
| 1384 | 1384 | function imap_thread($imap_stream, int $options = SE_FREE): array |
| 1385 | 1385 | { |
| 1386 | - error_clear_last(); |
|
| 1387 | - $result = \imap_thread($imap_stream, $options); |
|
| 1388 | - if ($result === false) { |
|
| 1389 | - throw ImapException::createFromPhpError(); |
|
| 1390 | - } |
|
| 1391 | - return $result; |
|
| 1386 | + error_clear_last(); |
|
| 1387 | + $result = \imap_thread($imap_stream, $options); |
|
| 1388 | + if ($result === false) { |
|
| 1389 | + throw ImapException::createFromPhpError(); |
|
| 1390 | + } |
|
| 1391 | + return $result; |
|
| 1392 | 1392 | } |
| 1393 | 1393 | |
| 1394 | 1394 | |
@@ -1412,12 +1412,12 @@ discard block |
||
| 1412 | 1412 | */ |
| 1413 | 1413 | function imap_timeout(int $timeout_type, int $timeout = -1) |
| 1414 | 1414 | { |
| 1415 | - error_clear_last(); |
|
| 1416 | - $result = \imap_timeout($timeout_type, $timeout); |
|
| 1417 | - if ($result === false) { |
|
| 1418 | - throw ImapException::createFromPhpError(); |
|
| 1419 | - } |
|
| 1420 | - return $result; |
|
| 1415 | + error_clear_last(); |
|
| 1416 | + $result = \imap_timeout($timeout_type, $timeout); |
|
| 1417 | + if ($result === false) { |
|
| 1418 | + throw ImapException::createFromPhpError(); |
|
| 1419 | + } |
|
| 1420 | + return $result; |
|
| 1421 | 1421 | } |
| 1422 | 1422 | |
| 1423 | 1423 | |
@@ -1434,11 +1434,11 @@ discard block |
||
| 1434 | 1434 | */ |
| 1435 | 1435 | function imap_undelete($imap_stream, int $msg_number, int $flags = 0): void |
| 1436 | 1436 | { |
| 1437 | - error_clear_last(); |
|
| 1438 | - $result = \imap_undelete($imap_stream, $msg_number, $flags); |
|
| 1439 | - if ($result === false) { |
|
| 1440 | - throw ImapException::createFromPhpError(); |
|
| 1441 | - } |
|
| 1437 | + error_clear_last(); |
|
| 1438 | + $result = \imap_undelete($imap_stream, $msg_number, $flags); |
|
| 1439 | + if ($result === false) { |
|
| 1440 | + throw ImapException::createFromPhpError(); |
|
| 1441 | + } |
|
| 1442 | 1442 | } |
| 1443 | 1443 | |
| 1444 | 1444 | |
@@ -1454,11 +1454,11 @@ discard block |
||
| 1454 | 1454 | */ |
| 1455 | 1455 | function imap_unsubscribe($imap_stream, string $mailbox): void |
| 1456 | 1456 | { |
| 1457 | - error_clear_last(); |
|
| 1458 | - $result = \imap_unsubscribe($imap_stream, $mailbox); |
|
| 1459 | - if ($result === false) { |
|
| 1460 | - throw ImapException::createFromPhpError(); |
|
| 1461 | - } |
|
| 1457 | + error_clear_last(); |
|
| 1458 | + $result = \imap_unsubscribe($imap_stream, $mailbox); |
|
| 1459 | + if ($result === false) { |
|
| 1460 | + throw ImapException::createFromPhpError(); |
|
| 1461 | + } |
|
| 1462 | 1462 | } |
| 1463 | 1463 | |
| 1464 | 1464 | |
@@ -1472,10 +1472,10 @@ discard block |
||
| 1472 | 1472 | */ |
| 1473 | 1473 | function imap_utf8_to_mutf7(string $in): string |
| 1474 | 1474 | { |
| 1475 | - error_clear_last(); |
|
| 1476 | - $result = \imap_utf8_to_mutf7($in); |
|
| 1477 | - if ($result === false) { |
|
| 1478 | - throw ImapException::createFromPhpError(); |
|
| 1479 | - } |
|
| 1480 | - return $result; |
|
| 1475 | + error_clear_last(); |
|
| 1476 | + $result = \imap_utf8_to_mutf7($in); |
|
| 1477 | + if ($result === false) { |
|
| 1478 | + throw ImapException::createFromPhpError(); |
|
| 1479 | + } |
|
| 1480 | + return $result; |
|
| 1481 | 1481 | } |
@@ -14,11 +14,11 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | function bzclose($bz): void |
| 16 | 16 | { |
| 17 | - error_clear_last(); |
|
| 18 | - $result = \bzclose($bz); |
|
| 19 | - if ($result === false) { |
|
| 20 | - throw Bzip2Exception::createFromPhpError(); |
|
| 21 | - } |
|
| 17 | + error_clear_last(); |
|
| 18 | + $result = \bzclose($bz); |
|
| 19 | + if ($result === false) { |
|
| 20 | + throw Bzip2Exception::createFromPhpError(); |
|
| 21 | + } |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | |
@@ -33,11 +33,11 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | function bzflush($bz): void |
| 35 | 35 | { |
| 36 | - error_clear_last(); |
|
| 37 | - $result = \bzflush($bz); |
|
| 38 | - if ($result === false) { |
|
| 39 | - throw Bzip2Exception::createFromPhpError(); |
|
| 40 | - } |
|
| 36 | + error_clear_last(); |
|
| 37 | + $result = \bzflush($bz); |
|
| 38 | + if ($result === false) { |
|
| 39 | + throw Bzip2Exception::createFromPhpError(); |
|
| 40 | + } |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | |
@@ -58,12 +58,12 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | function bzread($bz, int $length = 1024): string |
| 60 | 60 | { |
| 61 | - error_clear_last(); |
|
| 62 | - $result = \bzread($bz, $length); |
|
| 63 | - if ($result === false) { |
|
| 64 | - throw Bzip2Exception::createFromPhpError(); |
|
| 65 | - } |
|
| 66 | - return $result; |
|
| 61 | + error_clear_last(); |
|
| 62 | + $result = \bzread($bz, $length); |
|
| 63 | + if ($result === false) { |
|
| 64 | + throw Bzip2Exception::createFromPhpError(); |
|
| 65 | + } |
|
| 66 | + return $result; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | |
@@ -83,14 +83,14 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | function bzwrite($bz, string $data, int $length = null): int |
| 85 | 85 | { |
| 86 | - error_clear_last(); |
|
| 87 | - if ($length !== null) { |
|
| 88 | - $result = \bzwrite($bz, $data, $length); |
|
| 89 | - } else { |
|
| 90 | - $result = \bzwrite($bz, $data); |
|
| 91 | - } |
|
| 92 | - if ($result === false) { |
|
| 93 | - throw Bzip2Exception::createFromPhpError(); |
|
| 94 | - } |
|
| 95 | - return $result; |
|
| 86 | + error_clear_last(); |
|
| 87 | + if ($length !== null) { |
|
| 88 | + $result = \bzwrite($bz, $data, $length); |
|
| 89 | + } else { |
|
| 90 | + $result = \bzwrite($bz, $data); |
|
| 91 | + } |
|
| 92 | + if ($result === false) { |
|
| 93 | + throw Bzip2Exception::createFromPhpError(); |
|
| 94 | + } |
|
| 95 | + return $result; |
|
| 96 | 96 | } |
@@ -22,11 +22,11 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | function posix_access(string $file, int $mode = POSIX_F_OK): void |
| 24 | 24 | { |
| 25 | - error_clear_last(); |
|
| 26 | - $result = \posix_access($file, $mode); |
|
| 27 | - if ($result === false) { |
|
| 28 | - throw PosixException::createFromPhpError(); |
|
| 29 | - } |
|
| 25 | + error_clear_last(); |
|
| 26 | + $result = \posix_access($file, $mode); |
|
| 27 | + if ($result === false) { |
|
| 28 | + throw PosixException::createFromPhpError(); |
|
| 29 | + } |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | |
@@ -85,12 +85,12 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | function posix_getgrnam(string $name): array |
| 87 | 87 | { |
| 88 | - error_clear_last(); |
|
| 89 | - $result = \posix_getgrnam($name); |
|
| 90 | - if ($result === false) { |
|
| 91 | - throw PosixException::createFromPhpError(); |
|
| 92 | - } |
|
| 93 | - return $result; |
|
| 88 | + error_clear_last(); |
|
| 89 | + $result = \posix_getgrnam($name); |
|
| 90 | + if ($result === false) { |
|
| 91 | + throw PosixException::createFromPhpError(); |
|
| 92 | + } |
|
| 93 | + return $result; |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | |
@@ -105,12 +105,12 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | function posix_getpgid(int $pid): int |
| 107 | 107 | { |
| 108 | - error_clear_last(); |
|
| 109 | - $result = \posix_getpgid($pid); |
|
| 110 | - if ($result === false) { |
|
| 111 | - throw PosixException::createFromPhpError(); |
|
| 112 | - } |
|
| 113 | - return $result; |
|
| 108 | + error_clear_last(); |
|
| 109 | + $result = \posix_getpgid($pid); |
|
| 110 | + if ($result === false) { |
|
| 111 | + throw PosixException::createFromPhpError(); |
|
| 112 | + } |
|
| 113 | + return $result; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | |
@@ -124,11 +124,11 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | function posix_initgroups(string $name, int $base_group_id): void |
| 126 | 126 | { |
| 127 | - error_clear_last(); |
|
| 128 | - $result = \posix_initgroups($name, $base_group_id); |
|
| 129 | - if ($result === false) { |
|
| 130 | - throw PosixException::createFromPhpError(); |
|
| 131 | - } |
|
| 127 | + error_clear_last(); |
|
| 128 | + $result = \posix_initgroups($name, $base_group_id); |
|
| 129 | + if ($result === false) { |
|
| 130 | + throw PosixException::createFromPhpError(); |
|
| 131 | + } |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | |
@@ -143,11 +143,11 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | function posix_kill(int $pid, int $sig): void |
| 145 | 145 | { |
| 146 | - error_clear_last(); |
|
| 147 | - $result = \posix_kill($pid, $sig); |
|
| 148 | - if ($result === false) { |
|
| 149 | - throw PosixException::createFromPhpError(); |
|
| 150 | - } |
|
| 146 | + error_clear_last(); |
|
| 147 | + $result = \posix_kill($pid, $sig); |
|
| 148 | + if ($result === false) { |
|
| 149 | + throw PosixException::createFromPhpError(); |
|
| 150 | + } |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | |
@@ -167,11 +167,11 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | function posix_mkfifo(string $pathname, int $mode): void |
| 169 | 169 | { |
| 170 | - error_clear_last(); |
|
| 171 | - $result = \posix_mkfifo($pathname, $mode); |
|
| 172 | - if ($result === false) { |
|
| 173 | - throw PosixException::createFromPhpError(); |
|
| 174 | - } |
|
| 170 | + error_clear_last(); |
|
| 171 | + $result = \posix_mkfifo($pathname, $mode); |
|
| 172 | + if ($result === false) { |
|
| 173 | + throw PosixException::createFromPhpError(); |
|
| 174 | + } |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | |
@@ -192,11 +192,11 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | function posix_mknod(string $pathname, int $mode, int $major = 0, int $minor = 0): void |
| 194 | 194 | { |
| 195 | - error_clear_last(); |
|
| 196 | - $result = \posix_mknod($pathname, $mode, $major, $minor); |
|
| 197 | - if ($result === false) { |
|
| 198 | - throw PosixException::createFromPhpError(); |
|
| 199 | - } |
|
| 195 | + error_clear_last(); |
|
| 196 | + $result = \posix_mknod($pathname, $mode, $major, $minor); |
|
| 197 | + if ($result === false) { |
|
| 198 | + throw PosixException::createFromPhpError(); |
|
| 199 | + } |
|
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | |
@@ -211,11 +211,11 @@ discard block |
||
| 211 | 211 | */ |
| 212 | 212 | function posix_setegid(int $gid): void |
| 213 | 213 | { |
| 214 | - error_clear_last(); |
|
| 215 | - $result = \posix_setegid($gid); |
|
| 216 | - if ($result === false) { |
|
| 217 | - throw PosixException::createFromPhpError(); |
|
| 218 | - } |
|
| 214 | + error_clear_last(); |
|
| 215 | + $result = \posix_setegid($gid); |
|
| 216 | + if ($result === false) { |
|
| 217 | + throw PosixException::createFromPhpError(); |
|
| 218 | + } |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | |
@@ -230,11 +230,11 @@ discard block |
||
| 230 | 230 | */ |
| 231 | 231 | function posix_seteuid(int $uid): void |
| 232 | 232 | { |
| 233 | - error_clear_last(); |
|
| 234 | - $result = \posix_seteuid($uid); |
|
| 235 | - if ($result === false) { |
|
| 236 | - throw PosixException::createFromPhpError(); |
|
| 237 | - } |
|
| 233 | + error_clear_last(); |
|
| 234 | + $result = \posix_seteuid($uid); |
|
| 235 | + if ($result === false) { |
|
| 236 | + throw PosixException::createFromPhpError(); |
|
| 237 | + } |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | |
@@ -252,11 +252,11 @@ discard block |
||
| 252 | 252 | */ |
| 253 | 253 | function posix_setgid(int $gid): void |
| 254 | 254 | { |
| 255 | - error_clear_last(); |
|
| 256 | - $result = \posix_setgid($gid); |
|
| 257 | - if ($result === false) { |
|
| 258 | - throw PosixException::createFromPhpError(); |
|
| 259 | - } |
|
| 255 | + error_clear_last(); |
|
| 256 | + $result = \posix_setgid($gid); |
|
| 257 | + if ($result === false) { |
|
| 258 | + throw PosixException::createFromPhpError(); |
|
| 259 | + } |
|
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | |
@@ -271,11 +271,11 @@ discard block |
||
| 271 | 271 | */ |
| 272 | 272 | function posix_setpgid(int $pid, int $pgid): void |
| 273 | 273 | { |
| 274 | - error_clear_last(); |
|
| 275 | - $result = \posix_setpgid($pid, $pgid); |
|
| 276 | - if ($result === false) { |
|
| 277 | - throw PosixException::createFromPhpError(); |
|
| 278 | - } |
|
| 274 | + error_clear_last(); |
|
| 275 | + $result = \posix_setpgid($pid, $pgid); |
|
| 276 | + if ($result === false) { |
|
| 277 | + throw PosixException::createFromPhpError(); |
|
| 278 | + } |
|
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | |
@@ -302,11 +302,11 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | function posix_setrlimit(int $resource, int $softlimit, int $hardlimit): void |
| 304 | 304 | { |
| 305 | - error_clear_last(); |
|
| 306 | - $result = \posix_setrlimit($resource, $softlimit, $hardlimit); |
|
| 307 | - if ($result === false) { |
|
| 308 | - throw PosixException::createFromPhpError(); |
|
| 309 | - } |
|
| 305 | + error_clear_last(); |
|
| 306 | + $result = \posix_setrlimit($resource, $softlimit, $hardlimit); |
|
| 307 | + if ($result === false) { |
|
| 308 | + throw PosixException::createFromPhpError(); |
|
| 309 | + } |
|
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | |
@@ -321,9 +321,9 @@ discard block |
||
| 321 | 321 | */ |
| 322 | 322 | function posix_setuid(int $uid): void |
| 323 | 323 | { |
| 324 | - error_clear_last(); |
|
| 325 | - $result = \posix_setuid($uid); |
|
| 326 | - if ($result === false) { |
|
| 327 | - throw PosixException::createFromPhpError(); |
|
| 328 | - } |
|
| 324 | + error_clear_last(); |
|
| 325 | + $result = \posix_setuid($uid); |
|
| 326 | + if ($result === false) { |
|
| 327 | + throw PosixException::createFromPhpError(); |
|
| 328 | + } |
|
| 329 | 329 | } |
@@ -14,12 +14,12 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | function convert_uudecode(string $data): string |
| 16 | 16 | { |
| 17 | - error_clear_last(); |
|
| 18 | - $result = \convert_uudecode($data); |
|
| 19 | - if ($result === false) { |
|
| 20 | - throw StringsException::createFromPhpError(); |
|
| 21 | - } |
|
| 22 | - return $result; |
|
| 17 | + error_clear_last(); |
|
| 18 | + $result = \convert_uudecode($data); |
|
| 19 | + if ($result === false) { |
|
| 20 | + throw StringsException::createFromPhpError(); |
|
| 21 | + } |
|
| 22 | + return $result; |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | |
@@ -38,12 +38,12 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | function convert_uuencode(string $data): string |
| 40 | 40 | { |
| 41 | - error_clear_last(); |
|
| 42 | - $result = \convert_uuencode($data); |
|
| 43 | - if ($result === false) { |
|
| 44 | - throw StringsException::createFromPhpError(); |
|
| 45 | - } |
|
| 46 | - return $result; |
|
| 41 | + error_clear_last(); |
|
| 42 | + $result = \convert_uuencode($data); |
|
| 43 | + if ($result === false) { |
|
| 44 | + throw StringsException::createFromPhpError(); |
|
| 45 | + } |
|
| 46 | + return $result; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | |
@@ -57,12 +57,12 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | function hex2bin(string $data): string |
| 59 | 59 | { |
| 60 | - error_clear_last(); |
|
| 61 | - $result = \hex2bin($data); |
|
| 62 | - if ($result === false) { |
|
| 63 | - throw StringsException::createFromPhpError(); |
|
| 64 | - } |
|
| 65 | - return $result; |
|
| 60 | + error_clear_last(); |
|
| 61 | + $result = \hex2bin($data); |
|
| 62 | + if ($result === false) { |
|
| 63 | + throw StringsException::createFromPhpError(); |
|
| 64 | + } |
|
| 65 | + return $result; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | |
@@ -82,12 +82,12 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | function md5_file(string $filename, bool $raw_output = false): string |
| 84 | 84 | { |
| 85 | - error_clear_last(); |
|
| 86 | - $result = \md5_file($filename, $raw_output); |
|
| 87 | - if ($result === false) { |
|
| 88 | - throw StringsException::createFromPhpError(); |
|
| 89 | - } |
|
| 90 | - return $result; |
|
| 85 | + error_clear_last(); |
|
| 86 | + $result = \md5_file($filename, $raw_output); |
|
| 87 | + if ($result === false) { |
|
| 88 | + throw StringsException::createFromPhpError(); |
|
| 89 | + } |
|
| 90 | + return $result; |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | |
@@ -114,12 +114,12 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | function metaphone(string $str, int $phonemes = 0): string |
| 116 | 116 | { |
| 117 | - error_clear_last(); |
|
| 118 | - $result = \metaphone($str, $phonemes); |
|
| 119 | - if ($result === false) { |
|
| 120 | - throw StringsException::createFromPhpError(); |
|
| 121 | - } |
|
| 122 | - return $result; |
|
| 117 | + error_clear_last(); |
|
| 118 | + $result = \metaphone($str, $phonemes); |
|
| 119 | + if ($result === false) { |
|
| 120 | + throw StringsException::createFromPhpError(); |
|
| 121 | + } |
|
| 122 | + return $result; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | |
@@ -135,12 +135,12 @@ discard block |
||
| 135 | 135 | */ |
| 136 | 136 | function sha1_file(string $filename, bool $raw_output = false): string |
| 137 | 137 | { |
| 138 | - error_clear_last(); |
|
| 139 | - $result = \sha1_file($filename, $raw_output); |
|
| 140 | - if ($result === false) { |
|
| 141 | - throw StringsException::createFromPhpError(); |
|
| 142 | - } |
|
| 143 | - return $result; |
|
| 138 | + error_clear_last(); |
|
| 139 | + $result = \sha1_file($filename, $raw_output); |
|
| 140 | + if ($result === false) { |
|
| 141 | + throw StringsException::createFromPhpError(); |
|
| 142 | + } |
|
| 143 | + return $result; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | |
@@ -164,12 +164,12 @@ discard block |
||
| 164 | 164 | */ |
| 165 | 165 | function soundex(string $str): string |
| 166 | 166 | { |
| 167 | - error_clear_last(); |
|
| 168 | - $result = \soundex($str); |
|
| 169 | - if ($result === false) { |
|
| 170 | - throw StringsException::createFromPhpError(); |
|
| 171 | - } |
|
| 172 | - return $result; |
|
| 167 | + error_clear_last(); |
|
| 168 | + $result = \soundex($str); |
|
| 169 | + if ($result === false) { |
|
| 170 | + throw StringsException::createFromPhpError(); |
|
| 171 | + } |
|
| 172 | + return $result; |
|
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | |
@@ -466,16 +466,16 @@ discard block |
||
| 466 | 466 | */ |
| 467 | 467 | function sprintf(string $format, ...$params): string |
| 468 | 468 | { |
| 469 | - error_clear_last(); |
|
| 470 | - if ($params !== []) { |
|
| 471 | - $result = \sprintf($format, ...$params); |
|
| 472 | - } else { |
|
| 473 | - $result = \sprintf($format); |
|
| 474 | - } |
|
| 475 | - if ($result === false) { |
|
| 476 | - throw StringsException::createFromPhpError(); |
|
| 477 | - } |
|
| 478 | - return $result; |
|
| 469 | + error_clear_last(); |
|
| 470 | + if ($params !== []) { |
|
| 471 | + $result = \sprintf($format, ...$params); |
|
| 472 | + } else { |
|
| 473 | + $result = \sprintf($format); |
|
| 474 | + } |
|
| 475 | + if ($result === false) { |
|
| 476 | + throw StringsException::createFromPhpError(); |
|
| 477 | + } |
|
| 478 | + return $result; |
|
| 479 | 479 | } |
| 480 | 480 | |
| 481 | 481 | |
@@ -531,16 +531,16 @@ discard block |
||
| 531 | 531 | */ |
| 532 | 532 | function substr(string $string, int $start, int $length = null): string |
| 533 | 533 | { |
| 534 | - error_clear_last(); |
|
| 535 | - if ($length !== null) { |
|
| 536 | - $result = \substr($string, $start, $length); |
|
| 537 | - } else { |
|
| 538 | - $result = \substr($string, $start); |
|
| 539 | - } |
|
| 540 | - if ($result === false) { |
|
| 541 | - throw StringsException::createFromPhpError(); |
|
| 542 | - } |
|
| 543 | - return $result; |
|
| 534 | + error_clear_last(); |
|
| 535 | + if ($length !== null) { |
|
| 536 | + $result = \substr($string, $start, $length); |
|
| 537 | + } else { |
|
| 538 | + $result = \substr($string, $start); |
|
| 539 | + } |
|
| 540 | + if ($result === false) { |
|
| 541 | + throw StringsException::createFromPhpError(); |
|
| 542 | + } |
|
| 543 | + return $result; |
|
| 544 | 544 | } |
| 545 | 545 | |
| 546 | 546 | |
@@ -837,10 +837,10 @@ discard block |
||
| 837 | 837 | */ |
| 838 | 838 | function vsprintf(string $format, array $args): string |
| 839 | 839 | { |
| 840 | - error_clear_last(); |
|
| 841 | - $result = \vsprintf($format, $args); |
|
| 842 | - if ($result === false) { |
|
| 843 | - throw StringsException::createFromPhpError(); |
|
| 844 | - } |
|
| 845 | - return $result; |
|
| 840 | + error_clear_last(); |
|
| 841 | + $result = \vsprintf($format, $args); |
|
| 842 | + if ($result === false) { |
|
| 843 | + throw StringsException::createFromPhpError(); |
|
| 844 | + } |
|
| 845 | + return $result; |
|
| 846 | 846 | } |