@@ -1,56 +1,56 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | - 'apc_cache_info', |
|
| 5 | - 'apc_cas', |
|
| 6 | - 'apc_compile_file', |
|
| 7 | - 'apc_dec', |
|
| 8 | - 'apc_define_constants', |
|
| 9 | - 'apc_delete', |
|
| 10 | - 'apc_delete_file', |
|
| 11 | - 'apc_inc', |
|
| 12 | - 'apc_load_constants', |
|
| 13 | - 'apc_sma_info', |
|
| 14 | - 'event_add', |
|
| 15 | - 'event_base_loopbreak', |
|
| 16 | - 'event_base_loopexit', |
|
| 17 | - 'event_base_new', |
|
| 18 | - 'event_base_priority_init', |
|
| 19 | - 'event_base_reinit', |
|
| 20 | - 'event_base_set', |
|
| 21 | - 'event_buffer_base_set', |
|
| 22 | - 'event_buffer_disable', |
|
| 23 | - 'event_buffer_enable', |
|
| 24 | - 'event_buffer_new', |
|
| 25 | - 'event_buffer_priority_set', |
|
| 26 | - 'event_buffer_set_callback', |
|
| 27 | - 'event_buffer_write', |
|
| 28 | - 'event_del', |
|
| 29 | - 'event_new', |
|
| 30 | - 'event_priority_set', |
|
| 31 | - 'event_set', |
|
| 32 | - 'event_timer_set', |
|
| 33 | - 'imagepsencodefont', |
|
| 34 | - 'imagepsextendfont', |
|
| 35 | - 'imagepsfreefont', |
|
| 36 | - 'imagepsslantfont', |
|
| 37 | - 'mssql_bind', |
|
| 38 | - 'mssql_close', |
|
| 39 | - 'mssql_connect', |
|
| 40 | - 'mssql_data_seek', |
|
| 41 | - 'mssql_field_length', |
|
| 42 | - 'mssql_field_name', |
|
| 43 | - 'mssql_field_seek', |
|
| 44 | - 'mssql_field_type', |
|
| 45 | - 'mssql_free_result', |
|
| 46 | - 'mssql_free_statement', |
|
| 47 | - 'mssql_init', |
|
| 48 | - 'mssql_pconnect', |
|
| 49 | - 'mssql_query', |
|
| 50 | - 'mssql_select_db', |
|
| 51 | - 'stats_covariance', |
|
| 52 | - 'stats_standard_deviation', |
|
| 53 | - 'stats_stat_correlation', |
|
| 54 | - 'stats_stat_innerproduct', |
|
| 55 | - 'stats_variance', |
|
| 4 | + 'apc_cache_info', |
|
| 5 | + 'apc_cas', |
|
| 6 | + 'apc_compile_file', |
|
| 7 | + 'apc_dec', |
|
| 8 | + 'apc_define_constants', |
|
| 9 | + 'apc_delete', |
|
| 10 | + 'apc_delete_file', |
|
| 11 | + 'apc_inc', |
|
| 12 | + 'apc_load_constants', |
|
| 13 | + 'apc_sma_info', |
|
| 14 | + 'event_add', |
|
| 15 | + 'event_base_loopbreak', |
|
| 16 | + 'event_base_loopexit', |
|
| 17 | + 'event_base_new', |
|
| 18 | + 'event_base_priority_init', |
|
| 19 | + 'event_base_reinit', |
|
| 20 | + 'event_base_set', |
|
| 21 | + 'event_buffer_base_set', |
|
| 22 | + 'event_buffer_disable', |
|
| 23 | + 'event_buffer_enable', |
|
| 24 | + 'event_buffer_new', |
|
| 25 | + 'event_buffer_priority_set', |
|
| 26 | + 'event_buffer_set_callback', |
|
| 27 | + 'event_buffer_write', |
|
| 28 | + 'event_del', |
|
| 29 | + 'event_new', |
|
| 30 | + 'event_priority_set', |
|
| 31 | + 'event_set', |
|
| 32 | + 'event_timer_set', |
|
| 33 | + 'imagepsencodefont', |
|
| 34 | + 'imagepsextendfont', |
|
| 35 | + 'imagepsfreefont', |
|
| 36 | + 'imagepsslantfont', |
|
| 37 | + 'mssql_bind', |
|
| 38 | + 'mssql_close', |
|
| 39 | + 'mssql_connect', |
|
| 40 | + 'mssql_data_seek', |
|
| 41 | + 'mssql_field_length', |
|
| 42 | + 'mssql_field_name', |
|
| 43 | + 'mssql_field_seek', |
|
| 44 | + 'mssql_field_type', |
|
| 45 | + 'mssql_free_result', |
|
| 46 | + 'mssql_free_statement', |
|
| 47 | + 'mssql_init', |
|
| 48 | + 'mssql_pconnect', |
|
| 49 | + 'mssql_query', |
|
| 50 | + 'mssql_select_db', |
|
| 51 | + 'stats_covariance', |
|
| 52 | + 'stats_standard_deviation', |
|
| 53 | + 'stats_stat_correlation', |
|
| 54 | + 'stats_stat_innerproduct', |
|
| 55 | + 'stats_variance', |
|
| 56 | 56 | ]; |
@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | function event_add($event, int $timeout = -1): void |
| 23 | 23 | { |
| 24 | - error_clear_last(); |
|
| 25 | - $result = \event_add($event, $timeout); |
|
| 26 | - if ($result === false) { |
|
| 27 | - throw LibeventException::createFromPhpError(); |
|
| 28 | - } |
|
| 24 | + error_clear_last(); |
|
| 25 | + $result = \event_add($event, $timeout); |
|
| 26 | + if ($result === false) { |
|
| 27 | + throw LibeventException::createFromPhpError(); |
|
| 28 | + } |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | |
@@ -39,11 +39,11 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | function event_base_loopbreak($event_base): void |
| 41 | 41 | { |
| 42 | - error_clear_last(); |
|
| 43 | - $result = \event_base_loopbreak($event_base); |
|
| 44 | - if ($result === false) { |
|
| 45 | - throw LibeventException::createFromPhpError(); |
|
| 46 | - } |
|
| 42 | + error_clear_last(); |
|
| 43 | + $result = \event_base_loopbreak($event_base); |
|
| 44 | + if ($result === false) { |
|
| 45 | + throw LibeventException::createFromPhpError(); |
|
| 46 | + } |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | |
@@ -58,11 +58,11 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | function event_base_loopexit($event_base, int $timeout = -1): void |
| 60 | 60 | { |
| 61 | - error_clear_last(); |
|
| 62 | - $result = \event_base_loopexit($event_base, $timeout); |
|
| 63 | - if ($result === false) { |
|
| 64 | - throw LibeventException::createFromPhpError(); |
|
| 65 | - } |
|
| 61 | + error_clear_last(); |
|
| 62 | + $result = \event_base_loopexit($event_base, $timeout); |
|
| 63 | + if ($result === false) { |
|
| 64 | + throw LibeventException::createFromPhpError(); |
|
| 65 | + } |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | |
@@ -77,12 +77,12 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | function event_base_new() |
| 79 | 79 | { |
| 80 | - error_clear_last(); |
|
| 81 | - $result = \event_base_new(); |
|
| 82 | - if ($result === false) { |
|
| 83 | - throw LibeventException::createFromPhpError(); |
|
| 84 | - } |
|
| 85 | - return $result; |
|
| 80 | + error_clear_last(); |
|
| 81 | + $result = \event_base_new(); |
|
| 82 | + if ($result === false) { |
|
| 83 | + throw LibeventException::createFromPhpError(); |
|
| 84 | + } |
|
| 85 | + return $result; |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | |
@@ -101,11 +101,11 @@ discard block |
||
| 101 | 101 | */ |
| 102 | 102 | function event_base_priority_init($event_base, int $npriorities): void |
| 103 | 103 | { |
| 104 | - error_clear_last(); |
|
| 105 | - $result = \event_base_priority_init($event_base, $npriorities); |
|
| 106 | - if ($result === false) { |
|
| 107 | - throw LibeventException::createFromPhpError(); |
|
| 108 | - } |
|
| 104 | + error_clear_last(); |
|
| 105 | + $result = \event_base_priority_init($event_base, $npriorities); |
|
| 106 | + if ($result === false) { |
|
| 107 | + throw LibeventException::createFromPhpError(); |
|
| 108 | + } |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | |
@@ -120,11 +120,11 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | function event_base_reinit($event_base): void |
| 122 | 122 | { |
| 123 | - error_clear_last(); |
|
| 124 | - $result = \event_base_reinit($event_base); |
|
| 125 | - if ($result === false) { |
|
| 126 | - throw LibeventException::createFromPhpError(); |
|
| 127 | - } |
|
| 123 | + error_clear_last(); |
|
| 124 | + $result = \event_base_reinit($event_base); |
|
| 125 | + if ($result === false) { |
|
| 126 | + throw LibeventException::createFromPhpError(); |
|
| 127 | + } |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | |
@@ -139,11 +139,11 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | function event_base_set($event, $event_base): void |
| 141 | 141 | { |
| 142 | - error_clear_last(); |
|
| 143 | - $result = \event_base_set($event, $event_base); |
|
| 144 | - if ($result === false) { |
|
| 145 | - throw LibeventException::createFromPhpError(); |
|
| 146 | - } |
|
| 142 | + error_clear_last(); |
|
| 143 | + $result = \event_base_set($event, $event_base); |
|
| 144 | + if ($result === false) { |
|
| 145 | + throw LibeventException::createFromPhpError(); |
|
| 146 | + } |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | |
@@ -158,11 +158,11 @@ discard block |
||
| 158 | 158 | */ |
| 159 | 159 | function event_buffer_base_set($bevent, $event_base): void |
| 160 | 160 | { |
| 161 | - error_clear_last(); |
|
| 162 | - $result = \event_buffer_base_set($bevent, $event_base); |
|
| 163 | - if ($result === false) { |
|
| 164 | - throw LibeventException::createFromPhpError(); |
|
| 165 | - } |
|
| 161 | + error_clear_last(); |
|
| 162 | + $result = \event_buffer_base_set($bevent, $event_base); |
|
| 163 | + if ($result === false) { |
|
| 164 | + throw LibeventException::createFromPhpError(); |
|
| 165 | + } |
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | |
@@ -177,11 +177,11 @@ discard block |
||
| 177 | 177 | */ |
| 178 | 178 | function event_buffer_disable($bevent, int $events): void |
| 179 | 179 | { |
| 180 | - error_clear_last(); |
|
| 181 | - $result = \event_buffer_disable($bevent, $events); |
|
| 182 | - if ($result === false) { |
|
| 183 | - throw LibeventException::createFromPhpError(); |
|
| 184 | - } |
|
| 180 | + error_clear_last(); |
|
| 181 | + $result = \event_buffer_disable($bevent, $events); |
|
| 182 | + if ($result === false) { |
|
| 183 | + throw LibeventException::createFromPhpError(); |
|
| 184 | + } |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | |
@@ -196,11 +196,11 @@ discard block |
||
| 196 | 196 | */ |
| 197 | 197 | function event_buffer_enable($bevent, int $events): void |
| 198 | 198 | { |
| 199 | - error_clear_last(); |
|
| 200 | - $result = \event_buffer_enable($bevent, $events); |
|
| 201 | - if ($result === false) { |
|
| 202 | - throw LibeventException::createFromPhpError(); |
|
| 203 | - } |
|
| 199 | + error_clear_last(); |
|
| 200 | + $result = \event_buffer_enable($bevent, $events); |
|
| 201 | + if ($result === false) { |
|
| 202 | + throw LibeventException::createFromPhpError(); |
|
| 203 | + } |
|
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | |
@@ -225,16 +225,16 @@ discard block |
||
| 225 | 225 | */ |
| 226 | 226 | function event_buffer_new($stream, $readcb, $writecb, $errorcb, $arg = null) |
| 227 | 227 | { |
| 228 | - error_clear_last(); |
|
| 229 | - if ($arg !== null) { |
|
| 230 | - $result = \event_buffer_new($stream, $readcb, $writecb, $errorcb, $arg); |
|
| 231 | - } else { |
|
| 232 | - $result = \event_buffer_new($stream, $readcb, $writecb, $errorcb); |
|
| 233 | - } |
|
| 234 | - if ($result === false) { |
|
| 235 | - throw LibeventException::createFromPhpError(); |
|
| 236 | - } |
|
| 237 | - return $result; |
|
| 228 | + error_clear_last(); |
|
| 229 | + if ($arg !== null) { |
|
| 230 | + $result = \event_buffer_new($stream, $readcb, $writecb, $errorcb, $arg); |
|
| 231 | + } else { |
|
| 232 | + $result = \event_buffer_new($stream, $readcb, $writecb, $errorcb); |
|
| 233 | + } |
|
| 234 | + if ($result === false) { |
|
| 235 | + throw LibeventException::createFromPhpError(); |
|
| 236 | + } |
|
| 237 | + return $result; |
|
| 238 | 238 | } |
| 239 | 239 | |
| 240 | 240 | |
@@ -249,11 +249,11 @@ discard block |
||
| 249 | 249 | */ |
| 250 | 250 | function event_buffer_priority_set($bevent, int $priority): void |
| 251 | 251 | { |
| 252 | - error_clear_last(); |
|
| 253 | - $result = \event_buffer_priority_set($bevent, $priority); |
|
| 254 | - if ($result === false) { |
|
| 255 | - throw LibeventException::createFromPhpError(); |
|
| 256 | - } |
|
| 252 | + error_clear_last(); |
|
| 253 | + $result = \event_buffer_priority_set($bevent, $priority); |
|
| 254 | + if ($result === false) { |
|
| 255 | + throw LibeventException::createFromPhpError(); |
|
| 256 | + } |
|
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | |
@@ -273,15 +273,15 @@ discard block |
||
| 273 | 273 | */ |
| 274 | 274 | function event_buffer_set_callback($event, $readcb, $writecb, $errorcb, $arg = null): void |
| 275 | 275 | { |
| 276 | - error_clear_last(); |
|
| 277 | - if ($arg !== null) { |
|
| 278 | - $result = \event_buffer_set_callback($event, $readcb, $writecb, $errorcb, $arg); |
|
| 279 | - } else { |
|
| 280 | - $result = \event_buffer_set_callback($event, $readcb, $writecb, $errorcb); |
|
| 281 | - } |
|
| 282 | - if ($result === false) { |
|
| 283 | - throw LibeventException::createFromPhpError(); |
|
| 284 | - } |
|
| 276 | + error_clear_last(); |
|
| 277 | + if ($arg !== null) { |
|
| 278 | + $result = \event_buffer_set_callback($event, $readcb, $writecb, $errorcb, $arg); |
|
| 279 | + } else { |
|
| 280 | + $result = \event_buffer_set_callback($event, $readcb, $writecb, $errorcb); |
|
| 281 | + } |
|
| 282 | + if ($result === false) { |
|
| 283 | + throw LibeventException::createFromPhpError(); |
|
| 284 | + } |
|
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | |
@@ -299,11 +299,11 @@ discard block |
||
| 299 | 299 | */ |
| 300 | 300 | function event_buffer_write($bevent, string $data, int $data_size = -1): void |
| 301 | 301 | { |
| 302 | - error_clear_last(); |
|
| 303 | - $result = \event_buffer_write($bevent, $data, $data_size); |
|
| 304 | - if ($result === false) { |
|
| 305 | - throw LibeventException::createFromPhpError(); |
|
| 306 | - } |
|
| 302 | + error_clear_last(); |
|
| 303 | + $result = \event_buffer_write($bevent, $data, $data_size); |
|
| 304 | + if ($result === false) { |
|
| 305 | + throw LibeventException::createFromPhpError(); |
|
| 306 | + } |
|
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | |
@@ -316,11 +316,11 @@ discard block |
||
| 316 | 316 | */ |
| 317 | 317 | function event_del($event): void |
| 318 | 318 | { |
| 319 | - error_clear_last(); |
|
| 320 | - $result = \event_del($event); |
|
| 321 | - if ($result === false) { |
|
| 322 | - throw LibeventException::createFromPhpError(); |
|
| 323 | - } |
|
| 319 | + error_clear_last(); |
|
| 320 | + $result = \event_del($event); |
|
| 321 | + if ($result === false) { |
|
| 322 | + throw LibeventException::createFromPhpError(); |
|
| 323 | + } |
|
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | |
@@ -333,12 +333,12 @@ discard block |
||
| 333 | 333 | */ |
| 334 | 334 | function event_new() |
| 335 | 335 | { |
| 336 | - error_clear_last(); |
|
| 337 | - $result = \event_new(); |
|
| 338 | - if ($result === false) { |
|
| 339 | - throw LibeventException::createFromPhpError(); |
|
| 340 | - } |
|
| 341 | - return $result; |
|
| 336 | + error_clear_last(); |
|
| 337 | + $result = \event_new(); |
|
| 338 | + if ($result === false) { |
|
| 339 | + throw LibeventException::createFromPhpError(); |
|
| 340 | + } |
|
| 341 | + return $result; |
|
| 342 | 342 | } |
| 343 | 343 | |
| 344 | 344 | |
@@ -354,11 +354,11 @@ discard block |
||
| 354 | 354 | */ |
| 355 | 355 | function event_priority_set($event, int $priority): void |
| 356 | 356 | { |
| 357 | - error_clear_last(); |
|
| 358 | - $result = \event_priority_set($event, $priority); |
|
| 359 | - if ($result === false) { |
|
| 360 | - throw LibeventException::createFromPhpError(); |
|
| 361 | - } |
|
| 357 | + error_clear_last(); |
|
| 358 | + $result = \event_priority_set($event, $priority); |
|
| 359 | + if ($result === false) { |
|
| 360 | + throw LibeventException::createFromPhpError(); |
|
| 361 | + } |
|
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | |
@@ -425,15 +425,15 @@ discard block |
||
| 425 | 425 | */ |
| 426 | 426 | function event_set($event, $fd, int $events, $callback, $arg = null): void |
| 427 | 427 | { |
| 428 | - error_clear_last(); |
|
| 429 | - if ($arg !== null) { |
|
| 430 | - $result = \event_set($event, $fd, $events, $callback, $arg); |
|
| 431 | - } else { |
|
| 432 | - $result = \event_set($event, $fd, $events, $callback); |
|
| 433 | - } |
|
| 434 | - if ($result === false) { |
|
| 435 | - throw LibeventException::createFromPhpError(); |
|
| 436 | - } |
|
| 428 | + error_clear_last(); |
|
| 429 | + if ($arg !== null) { |
|
| 430 | + $result = \event_set($event, $fd, $events, $callback, $arg); |
|
| 431 | + } else { |
|
| 432 | + $result = \event_set($event, $fd, $events, $callback); |
|
| 433 | + } |
|
| 434 | + if ($result === false) { |
|
| 435 | + throw LibeventException::createFromPhpError(); |
|
| 436 | + } |
|
| 437 | 437 | } |
| 438 | 438 | |
| 439 | 439 | |
@@ -484,13 +484,13 @@ discard block |
||
| 484 | 484 | */ |
| 485 | 485 | function event_timer_set($event, callable $callback, $arg = null): void |
| 486 | 486 | { |
| 487 | - error_clear_last(); |
|
| 488 | - if ($arg !== null) { |
|
| 489 | - $result = \event_timer_set($event, $callback, $arg); |
|
| 490 | - } else { |
|
| 491 | - $result = \event_timer_set($event, $callback); |
|
| 492 | - } |
|
| 493 | - if ($result === false) { |
|
| 494 | - throw LibeventException::createFromPhpError(); |
|
| 495 | - } |
|
| 487 | + error_clear_last(); |
|
| 488 | + if ($arg !== null) { |
|
| 489 | + $result = \event_timer_set($event, $callback, $arg); |
|
| 490 | + } else { |
|
| 491 | + $result = \event_timer_set($event, $callback); |
|
| 492 | + } |
|
| 493 | + if ($result === false) { |
|
| 494 | + throw LibeventException::createFromPhpError(); |
|
| 495 | + } |
|
| 496 | 496 | } |
@@ -35,11 +35,11 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | function mssql_bind($stmt, string $param_name, &$var, int $type, bool $is_output = false, bool $is_null = false, int $maxlen = -1): void |
| 37 | 37 | { |
| 38 | - error_clear_last(); |
|
| 39 | - $result = \mssql_bind($stmt, $param_name, $var, $type, $is_output, $is_null, $maxlen); |
|
| 40 | - if ($result === false) { |
|
| 41 | - throw MssqlException::createFromPhpError(); |
|
| 42 | - } |
|
| 38 | + error_clear_last(); |
|
| 39 | + $result = \mssql_bind($stmt, $param_name, $var, $type, $is_output, $is_null, $maxlen); |
|
| 40 | + if ($result === false) { |
|
| 41 | + throw MssqlException::createFromPhpError(); |
|
| 42 | + } |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | |
@@ -62,15 +62,15 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | function mssql_close($link_identifier = null): void |
| 64 | 64 | { |
| 65 | - error_clear_last(); |
|
| 66 | - if ($link_identifier !== null) { |
|
| 67 | - $result = \mssql_close($link_identifier); |
|
| 68 | - } else { |
|
| 69 | - $result = \mssql_close(); |
|
| 70 | - } |
|
| 71 | - if ($result === false) { |
|
| 72 | - throw MssqlException::createFromPhpError(); |
|
| 73 | - } |
|
| 65 | + error_clear_last(); |
|
| 66 | + if ($link_identifier !== null) { |
|
| 67 | + $result = \mssql_close($link_identifier); |
|
| 68 | + } else { |
|
| 69 | + $result = \mssql_close(); |
|
| 70 | + } |
|
| 71 | + if ($result === false) { |
|
| 72 | + throw MssqlException::createFromPhpError(); |
|
| 73 | + } |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | |
@@ -99,22 +99,22 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | function mssql_connect(string $servername = null, string $username = null, string $password = null, bool $new_link = false) |
| 101 | 101 | { |
| 102 | - error_clear_last(); |
|
| 103 | - if ($new_link !== false) { |
|
| 104 | - $result = \mssql_connect($servername, $username, $password, $new_link); |
|
| 105 | - } elseif ($password !== null) { |
|
| 106 | - $result = \mssql_connect($servername, $username, $password); |
|
| 107 | - } elseif ($username !== null) { |
|
| 108 | - $result = \mssql_connect($servername, $username); |
|
| 109 | - } elseif ($servername !== null) { |
|
| 110 | - $result = \mssql_connect($servername); |
|
| 111 | - } else { |
|
| 112 | - $result = \mssql_connect(); |
|
| 113 | - } |
|
| 114 | - if ($result === false) { |
|
| 115 | - throw MssqlException::createFromPhpError(); |
|
| 116 | - } |
|
| 117 | - return $result; |
|
| 102 | + error_clear_last(); |
|
| 103 | + if ($new_link !== false) { |
|
| 104 | + $result = \mssql_connect($servername, $username, $password, $new_link); |
|
| 105 | + } elseif ($password !== null) { |
|
| 106 | + $result = \mssql_connect($servername, $username, $password); |
|
| 107 | + } elseif ($username !== null) { |
|
| 108 | + $result = \mssql_connect($servername, $username); |
|
| 109 | + } elseif ($servername !== null) { |
|
| 110 | + $result = \mssql_connect($servername); |
|
| 111 | + } else { |
|
| 112 | + $result = \mssql_connect(); |
|
| 113 | + } |
|
| 114 | + if ($result === false) { |
|
| 115 | + throw MssqlException::createFromPhpError(); |
|
| 116 | + } |
|
| 117 | + return $result; |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | |
@@ -132,11 +132,11 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | function mssql_data_seek($result_identifier, int $row_number): void |
| 134 | 134 | { |
| 135 | - error_clear_last(); |
|
| 136 | - $result = \mssql_data_seek($result_identifier, $row_number); |
|
| 137 | - if ($result === false) { |
|
| 138 | - throw MssqlException::createFromPhpError(); |
|
| 139 | - } |
|
| 135 | + error_clear_last(); |
|
| 136 | + $result = \mssql_data_seek($result_identifier, $row_number); |
|
| 137 | + if ($result === false) { |
|
| 138 | + throw MssqlException::createFromPhpError(); |
|
| 139 | + } |
|
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | |
@@ -153,12 +153,12 @@ discard block |
||
| 153 | 153 | */ |
| 154 | 154 | function mssql_field_length($result, int $offset = -1): int |
| 155 | 155 | { |
| 156 | - error_clear_last(); |
|
| 157 | - $result = \mssql_field_length($result, $offset); |
|
| 158 | - if ($result === false) { |
|
| 159 | - throw MssqlException::createFromPhpError(); |
|
| 160 | - } |
|
| 161 | - return $result; |
|
| 156 | + error_clear_last(); |
|
| 157 | + $result = \mssql_field_length($result, $offset); |
|
| 158 | + if ($result === false) { |
|
| 159 | + throw MssqlException::createFromPhpError(); |
|
| 160 | + } |
|
| 161 | + return $result; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | |
@@ -175,12 +175,12 @@ discard block |
||
| 175 | 175 | */ |
| 176 | 176 | function mssql_field_name($result, int $offset = -1): string |
| 177 | 177 | { |
| 178 | - error_clear_last(); |
|
| 179 | - $result = \mssql_field_name($result, $offset); |
|
| 180 | - if ($result === false) { |
|
| 181 | - throw MssqlException::createFromPhpError(); |
|
| 182 | - } |
|
| 183 | - return $result; |
|
| 178 | + error_clear_last(); |
|
| 179 | + $result = \mssql_field_name($result, $offset); |
|
| 180 | + if ($result === false) { |
|
| 181 | + throw MssqlException::createFromPhpError(); |
|
| 182 | + } |
|
| 183 | + return $result; |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | |
@@ -197,11 +197,11 @@ discard block |
||
| 197 | 197 | */ |
| 198 | 198 | function mssql_field_seek($result, int $field_offset): void |
| 199 | 199 | { |
| 200 | - error_clear_last(); |
|
| 201 | - $result = \mssql_field_seek($result, $field_offset); |
|
| 202 | - if ($result === false) { |
|
| 203 | - throw MssqlException::createFromPhpError(); |
|
| 204 | - } |
|
| 200 | + error_clear_last(); |
|
| 201 | + $result = \mssql_field_seek($result, $field_offset); |
|
| 202 | + if ($result === false) { |
|
| 203 | + throw MssqlException::createFromPhpError(); |
|
| 204 | + } |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | |
@@ -218,12 +218,12 @@ discard block |
||
| 218 | 218 | */ |
| 219 | 219 | function mssql_field_type($result, int $offset = -1): string |
| 220 | 220 | { |
| 221 | - error_clear_last(); |
|
| 222 | - $result = \mssql_field_type($result, $offset); |
|
| 223 | - if ($result === false) { |
|
| 224 | - throw MssqlException::createFromPhpError(); |
|
| 225 | - } |
|
| 226 | - return $result; |
|
| 221 | + error_clear_last(); |
|
| 222 | + $result = \mssql_field_type($result, $offset); |
|
| 223 | + if ($result === false) { |
|
| 224 | + throw MssqlException::createFromPhpError(); |
|
| 225 | + } |
|
| 226 | + return $result; |
|
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | |
@@ -242,11 +242,11 @@ discard block |
||
| 242 | 242 | */ |
| 243 | 243 | function mssql_free_result($result): void |
| 244 | 244 | { |
| 245 | - error_clear_last(); |
|
| 246 | - $result = \mssql_free_result($result); |
|
| 247 | - if ($result === false) { |
|
| 248 | - throw MssqlException::createFromPhpError(); |
|
| 249 | - } |
|
| 245 | + error_clear_last(); |
|
| 246 | + $result = \mssql_free_result($result); |
|
| 247 | + if ($result === false) { |
|
| 248 | + throw MssqlException::createFromPhpError(); |
|
| 249 | + } |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | |
@@ -264,11 +264,11 @@ discard block |
||
| 264 | 264 | */ |
| 265 | 265 | function mssql_free_statement($stmt): void |
| 266 | 266 | { |
| 267 | - error_clear_last(); |
|
| 268 | - $result = \mssql_free_statement($stmt); |
|
| 269 | - if ($result === false) { |
|
| 270 | - throw MssqlException::createFromPhpError(); |
|
| 271 | - } |
|
| 267 | + error_clear_last(); |
|
| 268 | + $result = \mssql_free_statement($stmt); |
|
| 269 | + if ($result === false) { |
|
| 270 | + throw MssqlException::createFromPhpError(); |
|
| 271 | + } |
|
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | |
@@ -286,16 +286,16 @@ discard block |
||
| 286 | 286 | */ |
| 287 | 287 | function mssql_init(string $sp_name, $link_identifier = null) |
| 288 | 288 | { |
| 289 | - error_clear_last(); |
|
| 290 | - if ($link_identifier !== null) { |
|
| 291 | - $result = \mssql_init($sp_name, $link_identifier); |
|
| 292 | - } else { |
|
| 293 | - $result = \mssql_init($sp_name); |
|
| 294 | - } |
|
| 295 | - if ($result === false) { |
|
| 296 | - throw MssqlException::createFromPhpError(); |
|
| 297 | - } |
|
| 298 | - return $result; |
|
| 289 | + error_clear_last(); |
|
| 290 | + if ($link_identifier !== null) { |
|
| 291 | + $result = \mssql_init($sp_name, $link_identifier); |
|
| 292 | + } else { |
|
| 293 | + $result = \mssql_init($sp_name); |
|
| 294 | + } |
|
| 295 | + if ($result === false) { |
|
| 296 | + throw MssqlException::createFromPhpError(); |
|
| 297 | + } |
|
| 298 | + return $result; |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | |
@@ -332,22 +332,22 @@ discard block |
||
| 332 | 332 | */ |
| 333 | 333 | function mssql_pconnect(string $servername = null, string $username = null, string $password = null, bool $new_link = false) |
| 334 | 334 | { |
| 335 | - error_clear_last(); |
|
| 336 | - if ($new_link !== false) { |
|
| 337 | - $result = \mssql_pconnect($servername, $username, $password, $new_link); |
|
| 338 | - } elseif ($password !== null) { |
|
| 339 | - $result = \mssql_pconnect($servername, $username, $password); |
|
| 340 | - } elseif ($username !== null) { |
|
| 341 | - $result = \mssql_pconnect($servername, $username); |
|
| 342 | - } elseif ($servername !== null) { |
|
| 343 | - $result = \mssql_pconnect($servername); |
|
| 344 | - } else { |
|
| 345 | - $result = \mssql_pconnect(); |
|
| 346 | - } |
|
| 347 | - if ($result === false) { |
|
| 348 | - throw MssqlException::createFromPhpError(); |
|
| 349 | - } |
|
| 350 | - return $result; |
|
| 335 | + error_clear_last(); |
|
| 336 | + if ($new_link !== false) { |
|
| 337 | + $result = \mssql_pconnect($servername, $username, $password, $new_link); |
|
| 338 | + } elseif ($password !== null) { |
|
| 339 | + $result = \mssql_pconnect($servername, $username, $password); |
|
| 340 | + } elseif ($username !== null) { |
|
| 341 | + $result = \mssql_pconnect($servername, $username); |
|
| 342 | + } elseif ($servername !== null) { |
|
| 343 | + $result = \mssql_pconnect($servername); |
|
| 344 | + } else { |
|
| 345 | + $result = \mssql_pconnect(); |
|
| 346 | + } |
|
| 347 | + if ($result === false) { |
|
| 348 | + throw MssqlException::createFromPhpError(); |
|
| 349 | + } |
|
| 350 | + return $result; |
|
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | |
@@ -372,18 +372,18 @@ discard block |
||
| 372 | 372 | */ |
| 373 | 373 | function mssql_query(string $query, $link_identifier = null, int $batch_size = 0) |
| 374 | 374 | { |
| 375 | - error_clear_last(); |
|
| 376 | - if ($batch_size !== 0) { |
|
| 377 | - $result = \mssql_query($query, $link_identifier, $batch_size); |
|
| 378 | - } elseif ($link_identifier !== null) { |
|
| 379 | - $result = \mssql_query($query, $link_identifier); |
|
| 380 | - } else { |
|
| 381 | - $result = \mssql_query($query); |
|
| 382 | - } |
|
| 383 | - if ($result === false) { |
|
| 384 | - throw MssqlException::createFromPhpError(); |
|
| 385 | - } |
|
| 386 | - return $result; |
|
| 375 | + error_clear_last(); |
|
| 376 | + if ($batch_size !== 0) { |
|
| 377 | + $result = \mssql_query($query, $link_identifier, $batch_size); |
|
| 378 | + } elseif ($link_identifier !== null) { |
|
| 379 | + $result = \mssql_query($query, $link_identifier); |
|
| 380 | + } else { |
|
| 381 | + $result = \mssql_query($query); |
|
| 382 | + } |
|
| 383 | + if ($result === false) { |
|
| 384 | + throw MssqlException::createFromPhpError(); |
|
| 385 | + } |
|
| 386 | + return $result; |
|
| 387 | 387 | } |
| 388 | 388 | |
| 389 | 389 | |
@@ -414,13 +414,13 @@ discard block |
||
| 414 | 414 | */ |
| 415 | 415 | function mssql_select_db(string $database_name, $link_identifier = null): void |
| 416 | 416 | { |
| 417 | - error_clear_last(); |
|
| 418 | - if ($link_identifier !== null) { |
|
| 419 | - $result = \mssql_select_db($database_name, $link_identifier); |
|
| 420 | - } else { |
|
| 421 | - $result = \mssql_select_db($database_name); |
|
| 422 | - } |
|
| 423 | - if ($result === false) { |
|
| 424 | - throw MssqlException::createFromPhpError(); |
|
| 425 | - } |
|
| 417 | + error_clear_last(); |
|
| 418 | + if ($link_identifier !== null) { |
|
| 419 | + $result = \mssql_select_db($database_name, $link_identifier); |
|
| 420 | + } else { |
|
| 421 | + $result = \mssql_select_db($database_name); |
|
| 422 | + } |
|
| 423 | + if ($result === false) { |
|
| 424 | + throw MssqlException::createFromPhpError(); |
|
| 425 | + } |
|
| 426 | 426 | } |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | class StatsException extends \ErrorException implements SafeExceptionInterface |
| 5 | 5 | { |
| 6 | - public static function createFromPhpError(): self |
|
| 7 | - { |
|
| 8 | - $error = error_get_last(); |
|
| 9 | - return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | - } |
|
| 6 | + public static function createFromPhpError(): self |
|
| 7 | + { |
|
| 8 | + $error = error_get_last(); |
|
| 9 | + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | + } |
|
| 11 | 11 | } |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | class MssqlException extends \ErrorException implements SafeExceptionInterface |
| 5 | 5 | { |
| 6 | - public static function createFromPhpError(): self |
|
| 7 | - { |
|
| 8 | - $error = error_get_last(); |
|
| 9 | - return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | - } |
|
| 6 | + public static function createFromPhpError(): self |
|
| 7 | + { |
|
| 8 | + $error = error_get_last(); |
|
| 9 | + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | + } |
|
| 11 | 11 | } |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | class ApcException extends \ErrorException implements SafeExceptionInterface |
| 5 | 5 | { |
| 6 | - public static function createFromPhpError(): self |
|
| 7 | - { |
|
| 8 | - $error = error_get_last(); |
|
| 9 | - return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | - } |
|
| 6 | + public static function createFromPhpError(): self |
|
| 7 | + { |
|
| 8 | + $error = error_get_last(); |
|
| 9 | + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | + } |
|
| 11 | 11 | } |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | |
| 4 | 4 | class LibeventException extends \ErrorException implements SafeExceptionInterface |
| 5 | 5 | { |
| 6 | - public static function createFromPhpError(): self |
|
| 7 | - { |
|
| 8 | - $error = error_get_last(); |
|
| 9 | - return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | - } |
|
| 6 | + public static function createFromPhpError(): self |
|
| 7 | + { |
|
| 8 | + $error = error_get_last(); |
|
| 9 | + return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1); |
|
| 10 | + } |
|
| 11 | 11 | } |
@@ -15,12 +15,12 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | function stats_covariance(array $a, array $b): float |
| 17 | 17 | { |
| 18 | - error_clear_last(); |
|
| 19 | - $result = \stats_covariance($a, $b); |
|
| 20 | - if ($result === false) { |
|
| 21 | - throw StatsException::createFromPhpError(); |
|
| 22 | - } |
|
| 23 | - return $result; |
|
| 18 | + error_clear_last(); |
|
| 19 | + $result = \stats_covariance($a, $b); |
|
| 20 | + if ($result === false) { |
|
| 21 | + throw StatsException::createFromPhpError(); |
|
| 22 | + } |
|
| 23 | + return $result; |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | |
@@ -37,12 +37,12 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | function stats_standard_deviation(array $a, bool $sample = false): float |
| 39 | 39 | { |
| 40 | - error_clear_last(); |
|
| 41 | - $result = \stats_standard_deviation($a, $sample); |
|
| 42 | - if ($result === false) { |
|
| 43 | - throw StatsException::createFromPhpError(); |
|
| 44 | - } |
|
| 45 | - return $result; |
|
| 40 | + error_clear_last(); |
|
| 41 | + $result = \stats_standard_deviation($a, $sample); |
|
| 42 | + if ($result === false) { |
|
| 43 | + throw StatsException::createFromPhpError(); |
|
| 44 | + } |
|
| 45 | + return $result; |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | |
@@ -57,12 +57,12 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | function stats_stat_correlation(array $arr1, array $arr2): float |
| 59 | 59 | { |
| 60 | - error_clear_last(); |
|
| 61 | - $result = \stats_stat_correlation($arr1, $arr2); |
|
| 62 | - if ($result === false) { |
|
| 63 | - throw StatsException::createFromPhpError(); |
|
| 64 | - } |
|
| 65 | - return $result; |
|
| 60 | + error_clear_last(); |
|
| 61 | + $result = \stats_stat_correlation($arr1, $arr2); |
|
| 62 | + if ($result === false) { |
|
| 63 | + throw StatsException::createFromPhpError(); |
|
| 64 | + } |
|
| 65 | + return $result; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | |
@@ -77,12 +77,12 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | function stats_stat_innerproduct(array $arr1, array $arr2): float |
| 79 | 79 | { |
| 80 | - error_clear_last(); |
|
| 81 | - $result = \stats_stat_innerproduct($arr1, $arr2); |
|
| 82 | - if ($result === false) { |
|
| 83 | - throw StatsException::createFromPhpError(); |
|
| 84 | - } |
|
| 85 | - return $result; |
|
| 80 | + error_clear_last(); |
|
| 81 | + $result = \stats_stat_innerproduct($arr1, $arr2); |
|
| 82 | + if ($result === false) { |
|
| 83 | + throw StatsException::createFromPhpError(); |
|
| 84 | + } |
|
| 85 | + return $result; |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | |
@@ -99,10 +99,10 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | function stats_variance(array $a, bool $sample = false): float |
| 101 | 101 | { |
| 102 | - error_clear_last(); |
|
| 103 | - $result = \stats_variance($a, $sample); |
|
| 104 | - if ($result === false) { |
|
| 105 | - throw StatsException::createFromPhpError(); |
|
| 106 | - } |
|
| 107 | - return $result; |
|
| 102 | + error_clear_last(); |
|
| 103 | + $result = \stats_variance($a, $sample); |
|
| 104 | + if ($result === false) { |
|
| 105 | + throw StatsException::createFromPhpError(); |
|
| 106 | + } |
|
| 107 | + return $result; |
|
| 108 | 108 | } |
@@ -17,9 +17,9 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | function class_alias(string $original, string $alias, bool $autoload = true): void |
| 19 | 19 | { |
| 20 | - error_clear_last(); |
|
| 21 | - $result = \class_alias($original, $alias, $autoload); |
|
| 22 | - if ($result === false) { |
|
| 23 | - throw ClassobjException::createFromPhpError(); |
|
| 24 | - } |
|
| 20 | + error_clear_last(); |
|
| 21 | + $result = \class_alias($original, $alias, $autoload); |
|
| 22 | + if ($result === false) { |
|
| 23 | + throw ClassobjException::createFromPhpError(); |
|
| 24 | + } |
|
| 25 | 25 | } |