@@ -17,12 +17,12 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | function msql_affected_rows($result): int |
| 19 | 19 | { |
| 20 | - error_clear_last(); |
|
| 21 | - $result = \msql_affected_rows($result); |
|
| 22 | - if ($result === false) { |
|
| 23 | - throw MsqlException::createFromPhpError(); |
|
| 24 | - } |
|
| 25 | - return $result; |
|
| 20 | + error_clear_last(); |
|
| 21 | + $result = \msql_affected_rows($result); |
|
| 22 | + if ($result === false) { |
|
| 23 | + throw MsqlException::createFromPhpError(); |
|
| 24 | + } |
|
| 25 | + return $result; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | |
@@ -43,15 +43,15 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | function msql_close($link_identifier = null): void |
| 45 | 45 | { |
| 46 | - error_clear_last(); |
|
| 47 | - if ($link_identifier !== null) { |
|
| 48 | - $result = \msql_close($link_identifier); |
|
| 49 | - } else { |
|
| 50 | - $result = \msql_close(); |
|
| 51 | - } |
|
| 52 | - if ($result === false) { |
|
| 53 | - throw MsqlException::createFromPhpError(); |
|
| 54 | - } |
|
| 46 | + error_clear_last(); |
|
| 47 | + if ($link_identifier !== null) { |
|
| 48 | + $result = \msql_close($link_identifier); |
|
| 49 | + } else { |
|
| 50 | + $result = \msql_close(); |
|
| 51 | + } |
|
| 52 | + if ($result === false) { |
|
| 53 | + throw MsqlException::createFromPhpError(); |
|
| 54 | + } |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | |
@@ -83,16 +83,16 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | function msql_connect(string $hostname = null) |
| 85 | 85 | { |
| 86 | - error_clear_last(); |
|
| 87 | - if ($hostname !== null) { |
|
| 88 | - $result = \msql_connect($hostname); |
|
| 89 | - } else { |
|
| 90 | - $result = \msql_connect(); |
|
| 91 | - } |
|
| 92 | - if ($result === false) { |
|
| 93 | - throw MsqlException::createFromPhpError(); |
|
| 94 | - } |
|
| 95 | - return $result; |
|
| 86 | + error_clear_last(); |
|
| 87 | + if ($hostname !== null) { |
|
| 88 | + $result = \msql_connect($hostname); |
|
| 89 | + } else { |
|
| 90 | + $result = \msql_connect(); |
|
| 91 | + } |
|
| 92 | + if ($result === false) { |
|
| 93 | + throw MsqlException::createFromPhpError(); |
|
| 94 | + } |
|
| 95 | + return $result; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | |
@@ -110,15 +110,15 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | function msql_create_db(string $database_name, $link_identifier = null): void |
| 112 | 112 | { |
| 113 | - error_clear_last(); |
|
| 114 | - if ($link_identifier !== null) { |
|
| 115 | - $result = \msql_create_db($database_name, $link_identifier); |
|
| 116 | - } else { |
|
| 117 | - $result = \msql_create_db($database_name); |
|
| 118 | - } |
|
| 119 | - if ($result === false) { |
|
| 120 | - throw MsqlException::createFromPhpError(); |
|
| 121 | - } |
|
| 113 | + error_clear_last(); |
|
| 114 | + if ($link_identifier !== null) { |
|
| 115 | + $result = \msql_create_db($database_name, $link_identifier); |
|
| 116 | + } else { |
|
| 117 | + $result = \msql_create_db($database_name); |
|
| 118 | + } |
|
| 119 | + if ($result === false) { |
|
| 120 | + throw MsqlException::createFromPhpError(); |
|
| 121 | + } |
|
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | |
@@ -138,11 +138,11 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | function msql_data_seek($result, int $row_number): void |
| 140 | 140 | { |
| 141 | - error_clear_last(); |
|
| 142 | - $result = \msql_data_seek($result, $row_number); |
|
| 143 | - if ($result === false) { |
|
| 144 | - throw MsqlException::createFromPhpError(); |
|
| 145 | - } |
|
| 141 | + error_clear_last(); |
|
| 142 | + $result = \msql_data_seek($result, $row_number); |
|
| 143 | + if ($result === false) { |
|
| 144 | + throw MsqlException::createFromPhpError(); |
|
| 145 | + } |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | |
@@ -162,16 +162,16 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | function msql_db_query(string $database, string $query, $link_identifier = null) |
| 164 | 164 | { |
| 165 | - error_clear_last(); |
|
| 166 | - if ($link_identifier !== null) { |
|
| 167 | - $result = \msql_db_query($database, $query, $link_identifier); |
|
| 168 | - } else { |
|
| 169 | - $result = \msql_db_query($database, $query); |
|
| 170 | - } |
|
| 171 | - if ($result === false) { |
|
| 172 | - throw MsqlException::createFromPhpError(); |
|
| 173 | - } |
|
| 174 | - return $result; |
|
| 165 | + error_clear_last(); |
|
| 166 | + if ($link_identifier !== null) { |
|
| 167 | + $result = \msql_db_query($database, $query, $link_identifier); |
|
| 168 | + } else { |
|
| 169 | + $result = \msql_db_query($database, $query); |
|
| 170 | + } |
|
| 171 | + if ($result === false) { |
|
| 172 | + throw MsqlException::createFromPhpError(); |
|
| 173 | + } |
|
| 174 | + return $result; |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | |
@@ -189,15 +189,15 @@ discard block |
||
| 189 | 189 | */ |
| 190 | 190 | function msql_drop_db(string $database_name, $link_identifier = null): void |
| 191 | 191 | { |
| 192 | - error_clear_last(); |
|
| 193 | - if ($link_identifier !== null) { |
|
| 194 | - $result = \msql_drop_db($database_name, $link_identifier); |
|
| 195 | - } else { |
|
| 196 | - $result = \msql_drop_db($database_name); |
|
| 197 | - } |
|
| 198 | - if ($result === false) { |
|
| 199 | - throw MsqlException::createFromPhpError(); |
|
| 200 | - } |
|
| 192 | + error_clear_last(); |
|
| 193 | + if ($link_identifier !== null) { |
|
| 194 | + $result = \msql_drop_db($database_name, $link_identifier); |
|
| 195 | + } else { |
|
| 196 | + $result = \msql_drop_db($database_name); |
|
| 197 | + } |
|
| 198 | + if ($result === false) { |
|
| 199 | + throw MsqlException::createFromPhpError(); |
|
| 200 | + } |
|
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | |
@@ -216,12 +216,12 @@ discard block |
||
| 216 | 216 | */ |
| 217 | 217 | function msql_field_len($result, int $field_offset): int |
| 218 | 218 | { |
| 219 | - error_clear_last(); |
|
| 220 | - $result = \msql_field_len($result, $field_offset); |
|
| 221 | - if ($result === false) { |
|
| 222 | - throw MsqlException::createFromPhpError(); |
|
| 223 | - } |
|
| 224 | - return $result; |
|
| 219 | + error_clear_last(); |
|
| 220 | + $result = \msql_field_len($result, $field_offset); |
|
| 221 | + if ($result === false) { |
|
| 222 | + throw MsqlException::createFromPhpError(); |
|
| 223 | + } |
|
| 224 | + return $result; |
|
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | |
@@ -240,12 +240,12 @@ discard block |
||
| 240 | 240 | */ |
| 241 | 241 | function msql_field_name($result, int $field_offset): string |
| 242 | 242 | { |
| 243 | - error_clear_last(); |
|
| 244 | - $result = \msql_field_name($result, $field_offset); |
|
| 245 | - if ($result === false) { |
|
| 246 | - throw MsqlException::createFromPhpError(); |
|
| 247 | - } |
|
| 248 | - return $result; |
|
| 243 | + error_clear_last(); |
|
| 244 | + $result = \msql_field_name($result, $field_offset); |
|
| 245 | + if ($result === false) { |
|
| 246 | + throw MsqlException::createFromPhpError(); |
|
| 247 | + } |
|
| 248 | + return $result; |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | |
@@ -264,11 +264,11 @@ discard block |
||
| 264 | 264 | */ |
| 265 | 265 | function msql_field_seek($result, int $field_offset): void |
| 266 | 266 | { |
| 267 | - error_clear_last(); |
|
| 268 | - $result = \msql_field_seek($result, $field_offset); |
|
| 269 | - if ($result === false) { |
|
| 270 | - throw MsqlException::createFromPhpError(); |
|
| 271 | - } |
|
| 267 | + error_clear_last(); |
|
| 268 | + $result = \msql_field_seek($result, $field_offset); |
|
| 269 | + if ($result === false) { |
|
| 270 | + throw MsqlException::createFromPhpError(); |
|
| 271 | + } |
|
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | |
@@ -286,12 +286,12 @@ discard block |
||
| 286 | 286 | */ |
| 287 | 287 | function msql_field_table($result, int $field_offset): int |
| 288 | 288 | { |
| 289 | - error_clear_last(); |
|
| 290 | - $result = \msql_field_table($result, $field_offset); |
|
| 291 | - if ($result === false) { |
|
| 292 | - throw MsqlException::createFromPhpError(); |
|
| 293 | - } |
|
| 294 | - return $result; |
|
| 289 | + error_clear_last(); |
|
| 290 | + $result = \msql_field_table($result, $field_offset); |
|
| 291 | + if ($result === false) { |
|
| 292 | + throw MsqlException::createFromPhpError(); |
|
| 293 | + } |
|
| 294 | + return $result; |
|
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | |
@@ -313,12 +313,12 @@ discard block |
||
| 313 | 313 | */ |
| 314 | 314 | function msql_field_type($result, int $field_offset): string |
| 315 | 315 | { |
| 316 | - error_clear_last(); |
|
| 317 | - $result = \msql_field_type($result, $field_offset); |
|
| 318 | - if ($result === false) { |
|
| 319 | - throw MsqlException::createFromPhpError(); |
|
| 320 | - } |
|
| 321 | - return $result; |
|
| 316 | + error_clear_last(); |
|
| 317 | + $result = \msql_field_type($result, $field_offset); |
|
| 318 | + if ($result === false) { |
|
| 319 | + throw MsqlException::createFromPhpError(); |
|
| 320 | + } |
|
| 321 | + return $result; |
|
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | |
@@ -337,11 +337,11 @@ discard block |
||
| 337 | 337 | */ |
| 338 | 338 | function msql_free_result($result): void |
| 339 | 339 | { |
| 340 | - error_clear_last(); |
|
| 341 | - $result = \msql_free_result($result); |
|
| 342 | - if ($result === false) { |
|
| 343 | - throw MsqlException::createFromPhpError(); |
|
| 344 | - } |
|
| 340 | + error_clear_last(); |
|
| 341 | + $result = \msql_free_result($result); |
|
| 342 | + if ($result === false) { |
|
| 343 | + throw MsqlException::createFromPhpError(); |
|
| 344 | + } |
|
| 345 | 345 | } |
| 346 | 346 | |
| 347 | 347 | |
@@ -371,16 +371,16 @@ discard block |
||
| 371 | 371 | */ |
| 372 | 372 | function msql_pconnect(string $hostname = null) |
| 373 | 373 | { |
| 374 | - error_clear_last(); |
|
| 375 | - if ($hostname !== null) { |
|
| 376 | - $result = \msql_pconnect($hostname); |
|
| 377 | - } else { |
|
| 378 | - $result = \msql_pconnect(); |
|
| 379 | - } |
|
| 380 | - if ($result === false) { |
|
| 381 | - throw MsqlException::createFromPhpError(); |
|
| 382 | - } |
|
| 383 | - return $result; |
|
| 374 | + error_clear_last(); |
|
| 375 | + if ($hostname !== null) { |
|
| 376 | + $result = \msql_pconnect($hostname); |
|
| 377 | + } else { |
|
| 378 | + $result = \msql_pconnect(); |
|
| 379 | + } |
|
| 380 | + if ($result === false) { |
|
| 381 | + throw MsqlException::createFromPhpError(); |
|
| 382 | + } |
|
| 383 | + return $result; |
|
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | |
@@ -400,16 +400,16 @@ discard block |
||
| 400 | 400 | */ |
| 401 | 401 | function msql_query(string $query, $link_identifier = null) |
| 402 | 402 | { |
| 403 | - error_clear_last(); |
|
| 404 | - if ($link_identifier !== null) { |
|
| 405 | - $result = \msql_query($query, $link_identifier); |
|
| 406 | - } else { |
|
| 407 | - $result = \msql_query($query); |
|
| 408 | - } |
|
| 409 | - if ($result === false) { |
|
| 410 | - throw MsqlException::createFromPhpError(); |
|
| 411 | - } |
|
| 412 | - return $result; |
|
| 403 | + error_clear_last(); |
|
| 404 | + if ($link_identifier !== null) { |
|
| 405 | + $result = \msql_query($query, $link_identifier); |
|
| 406 | + } else { |
|
| 407 | + $result = \msql_query($query); |
|
| 408 | + } |
|
| 409 | + if ($result === false) { |
|
| 410 | + throw MsqlException::createFromPhpError(); |
|
| 411 | + } |
|
| 412 | + return $result; |
|
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | |
@@ -431,13 +431,13 @@ discard block |
||
| 431 | 431 | */ |
| 432 | 432 | function msql_select_db(string $database_name, $link_identifier = null): void |
| 433 | 433 | { |
| 434 | - error_clear_last(); |
|
| 435 | - if ($link_identifier !== null) { |
|
| 436 | - $result = \msql_select_db($database_name, $link_identifier); |
|
| 437 | - } else { |
|
| 438 | - $result = \msql_select_db($database_name); |
|
| 439 | - } |
|
| 440 | - if ($result === false) { |
|
| 441 | - throw MsqlException::createFromPhpError(); |
|
| 442 | - } |
|
| 434 | + error_clear_last(); |
|
| 435 | + if ($link_identifier !== null) { |
|
| 436 | + $result = \msql_select_db($database_name, $link_identifier); |
|
| 437 | + } else { |
|
| 438 | + $result = \msql_select_db($database_name); |
|
| 439 | + } |
|
| 440 | + if ($result === false) { |
|
| 441 | + throw MsqlException::createFromPhpError(); |
|
| 442 | + } |
|
| 443 | 443 | } |
@@ -18,12 +18,12 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | function ssdeep_fuzzy_compare(string $signature1, string $signature2): int |
| 20 | 20 | { |
| 21 | - error_clear_last(); |
|
| 22 | - $result = \ssdeep_fuzzy_compare($signature1, $signature2); |
|
| 23 | - if ($result === false) { |
|
| 24 | - throw SsdeepException::createFromPhpError(); |
|
| 25 | - } |
|
| 26 | - return $result; |
|
| 21 | + error_clear_last(); |
|
| 22 | + $result = \ssdeep_fuzzy_compare($signature1, $signature2); |
|
| 23 | + if ($result === false) { |
|
| 24 | + throw SsdeepException::createFromPhpError(); |
|
| 25 | + } |
|
| 26 | + return $result; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | |
@@ -40,12 +40,12 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | function ssdeep_fuzzy_hash_filename(string $file_name): string |
| 42 | 42 | { |
| 43 | - error_clear_last(); |
|
| 44 | - $result = \ssdeep_fuzzy_hash_filename($file_name); |
|
| 45 | - if ($result === false) { |
|
| 46 | - throw SsdeepException::createFromPhpError(); |
|
| 47 | - } |
|
| 48 | - return $result; |
|
| 43 | + error_clear_last(); |
|
| 44 | + $result = \ssdeep_fuzzy_hash_filename($file_name); |
|
| 45 | + if ($result === false) { |
|
| 46 | + throw SsdeepException::createFromPhpError(); |
|
| 47 | + } |
|
| 48 | + return $result; |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | |
@@ -61,10 +61,10 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | function ssdeep_fuzzy_hash(string $to_hash): string |
| 63 | 63 | { |
| 64 | - error_clear_last(); |
|
| 65 | - $result = \ssdeep_fuzzy_hash($to_hash); |
|
| 66 | - if ($result === false) { |
|
| 67 | - throw SsdeepException::createFromPhpError(); |
|
| 68 | - } |
|
| 69 | - return $result; |
|
| 64 | + error_clear_last(); |
|
| 65 | + $result = \ssdeep_fuzzy_hash($to_hash); |
|
| 66 | + if ($result === false) { |
|
| 67 | + throw SsdeepException::createFromPhpError(); |
|
| 68 | + } |
|
| 69 | + return $result; |
|
| 70 | 70 | } |
@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | function ob_end_clean(): void |
| 23 | 23 | { |
| 24 | - error_clear_last(); |
|
| 25 | - $result = \ob_end_clean(); |
|
| 26 | - if ($result === false) { |
|
| 27 | - throw OutcontrolException::createFromPhpError(); |
|
| 28 | - } |
|
| 24 | + error_clear_last(); |
|
| 25 | + $result = \ob_end_clean(); |
|
| 26 | + if ($result === false) { |
|
| 27 | + throw OutcontrolException::createFromPhpError(); |
|
| 28 | + } |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | |
@@ -47,11 +47,11 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | function ob_end_flush(): void |
| 49 | 49 | { |
| 50 | - error_clear_last(); |
|
| 51 | - $result = \ob_end_flush(); |
|
| 52 | - if ($result === false) { |
|
| 53 | - throw OutcontrolException::createFromPhpError(); |
|
| 54 | - } |
|
| 50 | + error_clear_last(); |
|
| 51 | + $result = \ob_end_flush(); |
|
| 52 | + if ($result === false) { |
|
| 53 | + throw OutcontrolException::createFromPhpError(); |
|
| 54 | + } |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | |
@@ -74,11 +74,11 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | function output_add_rewrite_var(string $name, string $value): void |
| 76 | 76 | { |
| 77 | - error_clear_last(); |
|
| 78 | - $result = \output_add_rewrite_var($name, $value); |
|
| 79 | - if ($result === false) { |
|
| 80 | - throw OutcontrolException::createFromPhpError(); |
|
| 81 | - } |
|
| 77 | + error_clear_last(); |
|
| 78 | + $result = \output_add_rewrite_var($name, $value); |
|
| 79 | + if ($result === false) { |
|
| 80 | + throw OutcontrolException::createFromPhpError(); |
|
| 81 | + } |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | |
@@ -92,9 +92,9 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | function output_reset_rewrite_vars(): void |
| 94 | 94 | { |
| 95 | - error_clear_last(); |
|
| 96 | - $result = \output_reset_rewrite_vars(); |
|
| 97 | - if ($result === false) { |
|
| 98 | - throw OutcontrolException::createFromPhpError(); |
|
| 99 | - } |
|
| 95 | + error_clear_last(); |
|
| 96 | + $result = \output_reset_rewrite_vars(); |
|
| 97 | + if ($result === false) { |
|
| 98 | + throw OutcontrolException::createFromPhpError(); |
|
| 99 | + } |
|
| 100 | 100 | } |
@@ -15,16 +15,16 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | function mb_chr(int $cp, string $encoding = null): string |
| 17 | 17 | { |
| 18 | - error_clear_last(); |
|
| 19 | - if ($encoding !== null) { |
|
| 20 | - $result = \mb_chr($cp, $encoding); |
|
| 21 | - } else { |
|
| 22 | - $result = \mb_chr($cp); |
|
| 23 | - } |
|
| 24 | - if ($result === false) { |
|
| 25 | - throw MbstringException::createFromPhpError(); |
|
| 26 | - } |
|
| 27 | - return $result; |
|
| 18 | + error_clear_last(); |
|
| 19 | + if ($encoding !== null) { |
|
| 20 | + $result = \mb_chr($cp, $encoding); |
|
| 21 | + } else { |
|
| 22 | + $result = \mb_chr($cp); |
|
| 23 | + } |
|
| 24 | + if ($result === false) { |
|
| 25 | + throw MbstringException::createFromPhpError(); |
|
| 26 | + } |
|
| 27 | + return $result; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | |
@@ -59,16 +59,16 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | function mb_detect_order($encoding_list = null) |
| 61 | 61 | { |
| 62 | - error_clear_last(); |
|
| 63 | - if ($encoding_list !== null) { |
|
| 64 | - $result = \mb_detect_order($encoding_list); |
|
| 65 | - } else { |
|
| 66 | - $result = \mb_detect_order(); |
|
| 67 | - } |
|
| 68 | - if ($result === false) { |
|
| 69 | - throw MbstringException::createFromPhpError(); |
|
| 70 | - } |
|
| 71 | - return $result; |
|
| 62 | + error_clear_last(); |
|
| 63 | + if ($encoding_list !== null) { |
|
| 64 | + $result = \mb_detect_order($encoding_list); |
|
| 65 | + } else { |
|
| 66 | + $result = \mb_detect_order(); |
|
| 67 | + } |
|
| 68 | + if ($result === false) { |
|
| 69 | + throw MbstringException::createFromPhpError(); |
|
| 70 | + } |
|
| 71 | + return $result; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | |
@@ -82,12 +82,12 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | function mb_encoding_aliases(string $encoding): array |
| 84 | 84 | { |
| 85 | - error_clear_last(); |
|
| 86 | - $result = \mb_encoding_aliases($encoding); |
|
| 87 | - if ($result === false) { |
|
| 88 | - throw MbstringException::createFromPhpError(); |
|
| 89 | - } |
|
| 90 | - return $result; |
|
| 85 | + error_clear_last(); |
|
| 86 | + $result = \mb_encoding_aliases($encoding); |
|
| 87 | + if ($result === false) { |
|
| 88 | + throw MbstringException::createFromPhpError(); |
|
| 89 | + } |
|
| 90 | + return $result; |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | |
@@ -125,12 +125,12 @@ discard block |
||
| 125 | 125 | */ |
| 126 | 126 | function mb_ereg_replace_callback(string $pattern, callable $callback, string $string, string $option = "msr"): string |
| 127 | 127 | { |
| 128 | - error_clear_last(); |
|
| 129 | - $result = \mb_ereg_replace_callback($pattern, $callback, $string, $option); |
|
| 130 | - if ($result === false) { |
|
| 131 | - throw MbstringException::createFromPhpError(); |
|
| 132 | - } |
|
| 133 | - return $result; |
|
| 128 | + error_clear_last(); |
|
| 129 | + $result = \mb_ereg_replace_callback($pattern, $callback, $string, $option); |
|
| 130 | + if ($result === false) { |
|
| 131 | + throw MbstringException::createFromPhpError(); |
|
| 132 | + } |
|
| 133 | + return $result; |
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | |
@@ -149,12 +149,12 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | function mb_ereg_replace(string $pattern, string $replacement, string $string, string $option = "msr"): string |
| 151 | 151 | { |
| 152 | - error_clear_last(); |
|
| 153 | - $result = \mb_ereg_replace($pattern, $replacement, $string, $option); |
|
| 154 | - if ($result === false) { |
|
| 155 | - throw MbstringException::createFromPhpError(); |
|
| 156 | - } |
|
| 157 | - return $result; |
|
| 152 | + error_clear_last(); |
|
| 153 | + $result = \mb_ereg_replace($pattern, $replacement, $string, $option); |
|
| 154 | + if ($result === false) { |
|
| 155 | + throw MbstringException::createFromPhpError(); |
|
| 156 | + } |
|
| 157 | + return $result; |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | |
@@ -167,12 +167,12 @@ discard block |
||
| 167 | 167 | */ |
| 168 | 168 | function mb_ereg_search_getregs(): array |
| 169 | 169 | { |
| 170 | - error_clear_last(); |
|
| 171 | - $result = \mb_ereg_search_getregs(); |
|
| 172 | - if ($result === false) { |
|
| 173 | - throw MbstringException::createFromPhpError(); |
|
| 174 | - } |
|
| 175 | - return $result; |
|
| 170 | + error_clear_last(); |
|
| 171 | + $result = \mb_ereg_search_getregs(); |
|
| 172 | + if ($result === false) { |
|
| 173 | + throw MbstringException::createFromPhpError(); |
|
| 174 | + } |
|
| 175 | + return $result; |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | |
@@ -192,17 +192,17 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | function mb_ereg_search_init(string $string, string $pattern = null, string $option = "msr"): void |
| 194 | 194 | { |
| 195 | - error_clear_last(); |
|
| 196 | - if ($option !== "msr") { |
|
| 197 | - $result = \mb_ereg_search_init($string, $pattern, $option); |
|
| 198 | - } elseif ($pattern !== null) { |
|
| 199 | - $result = \mb_ereg_search_init($string, $pattern); |
|
| 200 | - } else { |
|
| 201 | - $result = \mb_ereg_search_init($string); |
|
| 202 | - } |
|
| 203 | - if ($result === false) { |
|
| 204 | - throw MbstringException::createFromPhpError(); |
|
| 205 | - } |
|
| 195 | + error_clear_last(); |
|
| 196 | + if ($option !== "msr") { |
|
| 197 | + $result = \mb_ereg_search_init($string, $pattern, $option); |
|
| 198 | + } elseif ($pattern !== null) { |
|
| 199 | + $result = \mb_ereg_search_init($string, $pattern); |
|
| 200 | + } else { |
|
| 201 | + $result = \mb_ereg_search_init($string); |
|
| 202 | + } |
|
| 203 | + if ($result === false) { |
|
| 204 | + throw MbstringException::createFromPhpError(); |
|
| 205 | + } |
|
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | |
@@ -217,18 +217,18 @@ discard block |
||
| 217 | 217 | */ |
| 218 | 218 | function mb_ereg_search_regs(string $pattern = null, string $option = "ms"): array |
| 219 | 219 | { |
| 220 | - error_clear_last(); |
|
| 221 | - if ($option !== "ms") { |
|
| 222 | - $result = \mb_ereg_search_regs($pattern, $option); |
|
| 223 | - } elseif ($pattern !== null) { |
|
| 224 | - $result = \mb_ereg_search_regs($pattern); |
|
| 225 | - } else { |
|
| 226 | - $result = \mb_ereg_search_regs(); |
|
| 227 | - } |
|
| 228 | - if ($result === false) { |
|
| 229 | - throw MbstringException::createFromPhpError(); |
|
| 230 | - } |
|
| 231 | - return $result; |
|
| 220 | + error_clear_last(); |
|
| 221 | + if ($option !== "ms") { |
|
| 222 | + $result = \mb_ereg_search_regs($pattern, $option); |
|
| 223 | + } elseif ($pattern !== null) { |
|
| 224 | + $result = \mb_ereg_search_regs($pattern); |
|
| 225 | + } else { |
|
| 226 | + $result = \mb_ereg_search_regs(); |
|
| 227 | + } |
|
| 228 | + if ($result === false) { |
|
| 229 | + throw MbstringException::createFromPhpError(); |
|
| 230 | + } |
|
| 231 | + return $result; |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | |
@@ -241,11 +241,11 @@ discard block |
||
| 241 | 241 | */ |
| 242 | 242 | function mb_ereg_search_setpos(int $position): void |
| 243 | 243 | { |
| 244 | - error_clear_last(); |
|
| 245 | - $result = \mb_ereg_search_setpos($position); |
|
| 246 | - if ($result === false) { |
|
| 247 | - throw MbstringException::createFromPhpError(); |
|
| 248 | - } |
|
| 244 | + error_clear_last(); |
|
| 245 | + $result = \mb_ereg_search_setpos($position); |
|
| 246 | + if ($result === false) { |
|
| 247 | + throw MbstringException::createFromPhpError(); |
|
| 248 | + } |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | |
@@ -262,12 +262,12 @@ discard block |
||
| 262 | 262 | */ |
| 263 | 263 | function mb_eregi_replace(string $pattern, string $replace, string $string, string $option = "msri"): string |
| 264 | 264 | { |
| 265 | - error_clear_last(); |
|
| 266 | - $result = \mb_eregi_replace($pattern, $replace, $string, $option); |
|
| 267 | - if ($result === false) { |
|
| 268 | - throw MbstringException::createFromPhpError(); |
|
| 269 | - } |
|
| 270 | - return $result; |
|
| 265 | + error_clear_last(); |
|
| 266 | + $result = \mb_eregi_replace($pattern, $replace, $string, $option); |
|
| 267 | + if ($result === false) { |
|
| 268 | + throw MbstringException::createFromPhpError(); |
|
| 269 | + } |
|
| 270 | + return $result; |
|
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | |
@@ -291,16 +291,16 @@ discard block |
||
| 291 | 291 | */ |
| 292 | 292 | function mb_http_output(string $encoding = null) |
| 293 | 293 | { |
| 294 | - error_clear_last(); |
|
| 295 | - if ($encoding !== null) { |
|
| 296 | - $result = \mb_http_output($encoding); |
|
| 297 | - } else { |
|
| 298 | - $result = \mb_http_output(); |
|
| 299 | - } |
|
| 300 | - if ($result === false) { |
|
| 301 | - throw MbstringException::createFromPhpError(); |
|
| 302 | - } |
|
| 303 | - return $result; |
|
| 294 | + error_clear_last(); |
|
| 295 | + if ($encoding !== null) { |
|
| 296 | + $result = \mb_http_output($encoding); |
|
| 297 | + } else { |
|
| 298 | + $result = \mb_http_output(); |
|
| 299 | + } |
|
| 300 | + if ($result === false) { |
|
| 301 | + throw MbstringException::createFromPhpError(); |
|
| 302 | + } |
|
| 303 | + return $result; |
|
| 304 | 304 | } |
| 305 | 305 | |
| 306 | 306 | |
@@ -322,16 +322,16 @@ discard block |
||
| 322 | 322 | */ |
| 323 | 323 | function mb_internal_encoding(string $encoding = null) |
| 324 | 324 | { |
| 325 | - error_clear_last(); |
|
| 326 | - if ($encoding !== null) { |
|
| 327 | - $result = \mb_internal_encoding($encoding); |
|
| 328 | - } else { |
|
| 329 | - $result = \mb_internal_encoding(); |
|
| 330 | - } |
|
| 331 | - if ($result === false) { |
|
| 332 | - throw MbstringException::createFromPhpError(); |
|
| 333 | - } |
|
| 334 | - return $result; |
|
| 325 | + error_clear_last(); |
|
| 326 | + if ($encoding !== null) { |
|
| 327 | + $result = \mb_internal_encoding($encoding); |
|
| 328 | + } else { |
|
| 329 | + $result = \mb_internal_encoding(); |
|
| 330 | + } |
|
| 331 | + if ($result === false) { |
|
| 332 | + throw MbstringException::createFromPhpError(); |
|
| 333 | + } |
|
| 334 | + return $result; |
|
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | |
@@ -346,16 +346,16 @@ discard block |
||
| 346 | 346 | */ |
| 347 | 347 | function mb_ord(string $str, string $encoding = null): int |
| 348 | 348 | { |
| 349 | - error_clear_last(); |
|
| 350 | - if ($encoding !== null) { |
|
| 351 | - $result = \mb_ord($str, $encoding); |
|
| 352 | - } else { |
|
| 353 | - $result = \mb_ord($str); |
|
| 354 | - } |
|
| 355 | - if ($result === false) { |
|
| 356 | - throw MbstringException::createFromPhpError(); |
|
| 357 | - } |
|
| 358 | - return $result; |
|
| 349 | + error_clear_last(); |
|
| 350 | + if ($encoding !== null) { |
|
| 351 | + $result = \mb_ord($str, $encoding); |
|
| 352 | + } else { |
|
| 353 | + $result = \mb_ord($str); |
|
| 354 | + } |
|
| 355 | + if ($result === false) { |
|
| 356 | + throw MbstringException::createFromPhpError(); |
|
| 357 | + } |
|
| 358 | + return $result; |
|
| 359 | 359 | } |
| 360 | 360 | |
| 361 | 361 | |
@@ -374,11 +374,11 @@ discard block |
||
| 374 | 374 | */ |
| 375 | 375 | function mb_parse_str(string $encoded_string, ?array &$result): void |
| 376 | 376 | { |
| 377 | - error_clear_last(); |
|
| 378 | - $result = \mb_parse_str($encoded_string, $result); |
|
| 379 | - if ($result === false) { |
|
| 380 | - throw MbstringException::createFromPhpError(); |
|
| 381 | - } |
|
| 377 | + error_clear_last(); |
|
| 378 | + $result = \mb_parse_str($encoded_string, $result); |
|
| 379 | + if ($result === false) { |
|
| 380 | + throw MbstringException::createFromPhpError(); |
|
| 381 | + } |
|
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | |
@@ -394,16 +394,16 @@ discard block |
||
| 394 | 394 | */ |
| 395 | 395 | function mb_regex_encoding(string $encoding = null) |
| 396 | 396 | { |
| 397 | - error_clear_last(); |
|
| 398 | - if ($encoding !== null) { |
|
| 399 | - $result = \mb_regex_encoding($encoding); |
|
| 400 | - } else { |
|
| 401 | - $result = \mb_regex_encoding(); |
|
| 402 | - } |
|
| 403 | - if ($result === false) { |
|
| 404 | - throw MbstringException::createFromPhpError(); |
|
| 405 | - } |
|
| 406 | - return $result; |
|
| 397 | + error_clear_last(); |
|
| 398 | + if ($encoding !== null) { |
|
| 399 | + $result = \mb_regex_encoding($encoding); |
|
| 400 | + } else { |
|
| 401 | + $result = \mb_regex_encoding(); |
|
| 402 | + } |
|
| 403 | + if ($result === false) { |
|
| 404 | + throw MbstringException::createFromPhpError(); |
|
| 405 | + } |
|
| 406 | + return $result; |
|
| 407 | 407 | } |
| 408 | 408 | |
| 409 | 409 | |
@@ -466,11 +466,11 @@ discard block |
||
| 466 | 466 | */ |
| 467 | 467 | function mb_send_mail(string $to, string $subject, string $message, $additional_headers = null, string $additional_parameter = null): void |
| 468 | 468 | { |
| 469 | - error_clear_last(); |
|
| 470 | - $result = \mb_send_mail($to, $subject, $message, $additional_headers, $additional_parameter); |
|
| 471 | - if ($result === false) { |
|
| 472 | - throw MbstringException::createFromPhpError(); |
|
| 473 | - } |
|
| 469 | + error_clear_last(); |
|
| 470 | + $result = \mb_send_mail($to, $subject, $message, $additional_headers, $additional_parameter); |
|
| 471 | + if ($result === false) { |
|
| 472 | + throw MbstringException::createFromPhpError(); |
|
| 473 | + } |
|
| 474 | 474 | } |
| 475 | 475 | |
| 476 | 476 | |
@@ -486,12 +486,12 @@ discard block |
||
| 486 | 486 | */ |
| 487 | 487 | function mb_split(string $pattern, string $string, int $limit = -1): array |
| 488 | 488 | { |
| 489 | - error_clear_last(); |
|
| 490 | - $result = \mb_split($pattern, $string, $limit); |
|
| 491 | - if ($result === false) { |
|
| 492 | - throw MbstringException::createFromPhpError(); |
|
| 493 | - } |
|
| 494 | - return $result; |
|
| 489 | + error_clear_last(); |
|
| 490 | + $result = \mb_split($pattern, $string, $limit); |
|
| 491 | + if ($result === false) { |
|
| 492 | + throw MbstringException::createFromPhpError(); |
|
| 493 | + } |
|
| 494 | + return $result; |
|
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | |
@@ -513,14 +513,14 @@ discard block |
||
| 513 | 513 | */ |
| 514 | 514 | function mb_str_split(string $string, int $split_length = 1, string $encoding = null): array |
| 515 | 515 | { |
| 516 | - error_clear_last(); |
|
| 517 | - if ($encoding !== null) { |
|
| 518 | - $result = \mb_str_split($string, $split_length, $encoding); |
|
| 519 | - } else { |
|
| 520 | - $result = \mb_str_split($string, $split_length); |
|
| 521 | - } |
|
| 522 | - if ($result === false) { |
|
| 523 | - throw MbstringException::createFromPhpError(); |
|
| 524 | - } |
|
| 525 | - return $result; |
|
| 516 | + error_clear_last(); |
|
| 517 | + if ($encoding !== null) { |
|
| 518 | + $result = \mb_str_split($string, $split_length, $encoding); |
|
| 519 | + } else { |
|
| 520 | + $result = \mb_str_split($string, $split_length); |
|
| 521 | + } |
|
| 522 | + if ($result === false) { |
|
| 523 | + throw MbstringException::createFromPhpError(); |
|
| 524 | + } |
|
| 525 | + return $result; |
|
| 526 | 526 | } |
@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | function mysqlnd_qc_clear_cache(): void |
| 23 | 23 | { |
| 24 | - error_clear_last(); |
|
| 25 | - $result = \mysqlnd_qc_clear_cache(); |
|
| 26 | - if ($result === false) { |
|
| 27 | - throw MysqlndQcException::createFromPhpError(); |
|
| 28 | - } |
|
| 24 | + error_clear_last(); |
|
| 25 | + $result = \mysqlnd_qc_clear_cache(); |
|
| 26 | + if ($result === false) { |
|
| 27 | + throw MysqlndQcException::createFromPhpError(); |
|
| 28 | + } |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | |
@@ -63,12 +63,12 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | function mysqlnd_qc_set_is_select(string $callback) |
| 65 | 65 | { |
| 66 | - error_clear_last(); |
|
| 67 | - $result = \mysqlnd_qc_set_is_select($callback); |
|
| 68 | - if ($result === false) { |
|
| 69 | - throw MysqlndQcException::createFromPhpError(); |
|
| 70 | - } |
|
| 71 | - return $result; |
|
| 66 | + error_clear_last(); |
|
| 67 | + $result = \mysqlnd_qc_set_is_select($callback); |
|
| 68 | + if ($result === false) { |
|
| 69 | + throw MysqlndQcException::createFromPhpError(); |
|
| 70 | + } |
|
| 71 | + return $result; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | |
@@ -95,9 +95,9 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | function mysqlnd_qc_set_storage_handler(string $handler): void |
| 97 | 97 | { |
| 98 | - error_clear_last(); |
|
| 99 | - $result = \mysqlnd_qc_set_storage_handler($handler); |
|
| 100 | - if ($result === false) { |
|
| 101 | - throw MysqlndQcException::createFromPhpError(); |
|
| 102 | - } |
|
| 98 | + error_clear_last(); |
|
| 99 | + $result = \mysqlnd_qc_set_storage_handler($handler); |
|
| 100 | + if ($result === false) { |
|
| 101 | + throw MysqlndQcException::createFromPhpError(); |
|
| 102 | + } |
|
| 103 | 103 | } |
@@ -25,12 +25,12 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | function mysqlnd_ms_dump_servers($connection): array |
| 27 | 27 | { |
| 28 | - error_clear_last(); |
|
| 29 | - $result = \mysqlnd_ms_dump_servers($connection); |
|
| 30 | - if ($result === false) { |
|
| 31 | - throw MysqlndMsException::createFromPhpError(); |
|
| 32 | - } |
|
| 33 | - return $result; |
|
| 28 | + error_clear_last(); |
|
| 29 | + $result = \mysqlnd_ms_dump_servers($connection); |
|
| 30 | + if ($result === false) { |
|
| 31 | + throw MysqlndMsException::createFromPhpError(); |
|
| 32 | + } |
|
| 33 | + return $result; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | |
@@ -51,12 +51,12 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | function mysqlnd_ms_fabric_select_global($connection, $table_name): array |
| 53 | 53 | { |
| 54 | - error_clear_last(); |
|
| 55 | - $result = \mysqlnd_ms_fabric_select_global($connection, $table_name); |
|
| 56 | - if ($result === false) { |
|
| 57 | - throw MysqlndMsException::createFromPhpError(); |
|
| 58 | - } |
|
| 59 | - return $result; |
|
| 54 | + error_clear_last(); |
|
| 55 | + $result = \mysqlnd_ms_fabric_select_global($connection, $table_name); |
|
| 56 | + if ($result === false) { |
|
| 57 | + throw MysqlndMsException::createFromPhpError(); |
|
| 58 | + } |
|
| 59 | + return $result; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | |
@@ -78,12 +78,12 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | function mysqlnd_ms_fabric_select_shard($connection, $table_name, $shard_key): array |
| 80 | 80 | { |
| 81 | - error_clear_last(); |
|
| 82 | - $result = \mysqlnd_ms_fabric_select_shard($connection, $table_name, $shard_key); |
|
| 83 | - if ($result === false) { |
|
| 84 | - throw MysqlndMsException::createFromPhpError(); |
|
| 85 | - } |
|
| 86 | - return $result; |
|
| 81 | + error_clear_last(); |
|
| 82 | + $result = \mysqlnd_ms_fabric_select_shard($connection, $table_name, $shard_key); |
|
| 83 | + if ($result === false) { |
|
| 84 | + throw MysqlndMsException::createFromPhpError(); |
|
| 85 | + } |
|
| 86 | + return $result; |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | |
@@ -110,10 +110,10 @@ discard block |
||
| 110 | 110 | */ |
| 111 | 111 | function mysqlnd_ms_get_last_used_connection($connection): array |
| 112 | 112 | { |
| 113 | - error_clear_last(); |
|
| 114 | - $result = \mysqlnd_ms_get_last_used_connection($connection); |
|
| 115 | - if ($result === false) { |
|
| 116 | - throw MysqlndMsException::createFromPhpError(); |
|
| 117 | - } |
|
| 118 | - return $result; |
|
| 113 | + error_clear_last(); |
|
| 114 | + $result = \mysqlnd_ms_get_last_used_connection($connection); |
|
| 115 | + if ($result === false) { |
|
| 116 | + throw MysqlndMsException::createFromPhpError(); |
|
| 117 | + } |
|
| 118 | + return $result; |
|
| 119 | 119 | } |
@@ -15,11 +15,11 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | function PDF_activate_item($pdfdoc, int $id): void |
| 17 | 17 | { |
| 18 | - error_clear_last(); |
|
| 19 | - $result = \PDF_activate_item($pdfdoc, $id); |
|
| 20 | - if ($result === false) { |
|
| 21 | - throw PdfException::createFromPhpError(); |
|
| 22 | - } |
|
| 18 | + error_clear_last(); |
|
| 19 | + $result = \PDF_activate_item($pdfdoc, $id); |
|
| 20 | + if ($result === false) { |
|
| 21 | + throw PdfException::createFromPhpError(); |
|
| 22 | + } |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | |
@@ -44,11 +44,11 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | function PDF_add_locallink($pdfdoc, float $lowerleftx, float $lowerlefty, float $upperrightx, float $upperrighty, int $page, string $dest): void |
| 46 | 46 | { |
| 47 | - error_clear_last(); |
|
| 48 | - $result = \PDF_add_locallink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $page, $dest); |
|
| 49 | - if ($result === false) { |
|
| 50 | - throw PdfException::createFromPhpError(); |
|
| 51 | - } |
|
| 47 | + error_clear_last(); |
|
| 48 | + $result = \PDF_add_locallink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $page, $dest); |
|
| 49 | + if ($result === false) { |
|
| 50 | + throw PdfException::createFromPhpError(); |
|
| 51 | + } |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | |
@@ -64,11 +64,11 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | function PDF_add_nameddest($pdfdoc, string $name, string $optlist): void |
| 66 | 66 | { |
| 67 | - error_clear_last(); |
|
| 68 | - $result = \PDF_add_nameddest($pdfdoc, $name, $optlist); |
|
| 69 | - if ($result === false) { |
|
| 70 | - throw PdfException::createFromPhpError(); |
|
| 71 | - } |
|
| 67 | + error_clear_last(); |
|
| 68 | + $result = \PDF_add_nameddest($pdfdoc, $name, $optlist); |
|
| 69 | + if ($result === false) { |
|
| 70 | + throw PdfException::createFromPhpError(); |
|
| 71 | + } |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | |
@@ -93,11 +93,11 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | function PDF_add_note($pdfdoc, float $llx, float $lly, float $urx, float $ury, string $contents, string $title, string $icon, int $open): void |
| 95 | 95 | { |
| 96 | - error_clear_last(); |
|
| 97 | - $result = \PDF_add_note($pdfdoc, $llx, $lly, $urx, $ury, $contents, $title, $icon, $open); |
|
| 98 | - if ($result === false) { |
|
| 99 | - throw PdfException::createFromPhpError(); |
|
| 100 | - } |
|
| 96 | + error_clear_last(); |
|
| 97 | + $result = \PDF_add_note($pdfdoc, $llx, $lly, $urx, $ury, $contents, $title, $icon, $open); |
|
| 98 | + if ($result === false) { |
|
| 99 | + throw PdfException::createFromPhpError(); |
|
| 100 | + } |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | |
@@ -124,11 +124,11 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | function PDF_add_pdflink($pdfdoc, float $bottom_left_x, float $bottom_left_y, float $up_right_x, float $up_right_y, string $filename, int $page, string $dest): void |
| 126 | 126 | { |
| 127 | - error_clear_last(); |
|
| 128 | - $result = \PDF_add_pdflink($pdfdoc, $bottom_left_x, $bottom_left_y, $up_right_x, $up_right_y, $filename, $page, $dest); |
|
| 129 | - if ($result === false) { |
|
| 130 | - throw PdfException::createFromPhpError(); |
|
| 131 | - } |
|
| 127 | + error_clear_last(); |
|
| 128 | + $result = \PDF_add_pdflink($pdfdoc, $bottom_left_x, $bottom_left_y, $up_right_x, $up_right_y, $filename, $page, $dest); |
|
| 129 | + if ($result === false) { |
|
| 130 | + throw PdfException::createFromPhpError(); |
|
| 131 | + } |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | |
@@ -143,11 +143,11 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | function PDF_add_thumbnail($pdfdoc, int $image): void |
| 145 | 145 | { |
| 146 | - error_clear_last(); |
|
| 147 | - $result = \PDF_add_thumbnail($pdfdoc, $image); |
|
| 148 | - if ($result === false) { |
|
| 149 | - throw PdfException::createFromPhpError(); |
|
| 150 | - } |
|
| 146 | + error_clear_last(); |
|
| 147 | + $result = \PDF_add_thumbnail($pdfdoc, $image); |
|
| 148 | + if ($result === false) { |
|
| 149 | + throw PdfException::createFromPhpError(); |
|
| 150 | + } |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | |
@@ -171,11 +171,11 @@ discard block |
||
| 171 | 171 | */ |
| 172 | 172 | function PDF_add_weblink($pdfdoc, float $lowerleftx, float $lowerlefty, float $upperrightx, float $upperrighty, string $url): void |
| 173 | 173 | { |
| 174 | - error_clear_last(); |
|
| 175 | - $result = \PDF_add_weblink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $url); |
|
| 176 | - if ($result === false) { |
|
| 177 | - throw PdfException::createFromPhpError(); |
|
| 178 | - } |
|
| 174 | + error_clear_last(); |
|
| 175 | + $result = \PDF_add_weblink($pdfdoc, $lowerleftx, $lowerlefty, $upperrightx, $upperrighty, $url); |
|
| 176 | + if ($result === false) { |
|
| 177 | + throw PdfException::createFromPhpError(); |
|
| 178 | + } |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | |
@@ -201,11 +201,11 @@ discard block |
||
| 201 | 201 | */ |
| 202 | 202 | function PDF_attach_file($pdfdoc, float $llx, float $lly, float $urx, float $ury, string $filename, string $description, string $author, string $mimetype, string $icon): void |
| 203 | 203 | { |
| 204 | - error_clear_last(); |
|
| 205 | - $result = \PDF_attach_file($pdfdoc, $llx, $lly, $urx, $ury, $filename, $description, $author, $mimetype, $icon); |
|
| 206 | - if ($result === false) { |
|
| 207 | - throw PdfException::createFromPhpError(); |
|
| 208 | - } |
|
| 204 | + error_clear_last(); |
|
| 205 | + $result = \PDF_attach_file($pdfdoc, $llx, $lly, $urx, $ury, $filename, $description, $author, $mimetype, $icon); |
|
| 206 | + if ($result === false) { |
|
| 207 | + throw PdfException::createFromPhpError(); |
|
| 208 | + } |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | |
@@ -221,11 +221,11 @@ discard block |
||
| 221 | 221 | */ |
| 222 | 222 | function PDF_begin_layer($pdfdoc, int $layer): void |
| 223 | 223 | { |
| 224 | - error_clear_last(); |
|
| 225 | - $result = \PDF_begin_layer($pdfdoc, $layer); |
|
| 226 | - if ($result === false) { |
|
| 227 | - throw PdfException::createFromPhpError(); |
|
| 228 | - } |
|
| 224 | + error_clear_last(); |
|
| 225 | + $result = \PDF_begin_layer($pdfdoc, $layer); |
|
| 226 | + if ($result === false) { |
|
| 227 | + throw PdfException::createFromPhpError(); |
|
| 228 | + } |
|
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | |
@@ -305,11 +305,11 @@ discard block |
||
| 305 | 305 | */ |
| 306 | 306 | function PDF_begin_page_ext($pdfdoc, float $width, float $height, string $optlist): void |
| 307 | 307 | { |
| 308 | - error_clear_last(); |
|
| 309 | - $result = \PDF_begin_page_ext($pdfdoc, $width, $height, $optlist); |
|
| 310 | - if ($result === false) { |
|
| 311 | - throw PdfException::createFromPhpError(); |
|
| 312 | - } |
|
| 308 | + error_clear_last(); |
|
| 309 | + $result = \PDF_begin_page_ext($pdfdoc, $width, $height, $optlist); |
|
| 310 | + if ($result === false) { |
|
| 311 | + throw PdfException::createFromPhpError(); |
|
| 312 | + } |
|
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | |
@@ -327,11 +327,11 @@ discard block |
||
| 327 | 327 | */ |
| 328 | 328 | function PDF_begin_page($pdfdoc, float $width, float $height): void |
| 329 | 329 | { |
| 330 | - error_clear_last(); |
|
| 331 | - $result = \PDF_begin_page($pdfdoc, $width, $height); |
|
| 332 | - if ($result === false) { |
|
| 333 | - throw PdfException::createFromPhpError(); |
|
| 334 | - } |
|
| 330 | + error_clear_last(); |
|
| 331 | + $result = \PDF_begin_page($pdfdoc, $width, $height); |
|
| 332 | + if ($result === false) { |
|
| 333 | + throw PdfException::createFromPhpError(); |
|
| 334 | + } |
|
| 335 | 335 | } |
| 336 | 336 | |
| 337 | 337 | |
@@ -347,11 +347,11 @@ discard block |
||
| 347 | 347 | */ |
| 348 | 348 | function PDF_circle($pdfdoc, float $x, float $y, float $r): void |
| 349 | 349 | { |
| 350 | - error_clear_last(); |
|
| 351 | - $result = \PDF_circle($pdfdoc, $x, $y, $r); |
|
| 352 | - if ($result === false) { |
|
| 353 | - throw PdfException::createFromPhpError(); |
|
| 354 | - } |
|
| 350 | + error_clear_last(); |
|
| 351 | + $result = \PDF_circle($pdfdoc, $x, $y, $r); |
|
| 352 | + if ($result === false) { |
|
| 353 | + throw PdfException::createFromPhpError(); |
|
| 354 | + } |
|
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | |
@@ -364,11 +364,11 @@ discard block |
||
| 364 | 364 | */ |
| 365 | 365 | function PDF_clip($p): void |
| 366 | 366 | { |
| 367 | - error_clear_last(); |
|
| 368 | - $result = \PDF_clip($p); |
|
| 369 | - if ($result === false) { |
|
| 370 | - throw PdfException::createFromPhpError(); |
|
| 371 | - } |
|
| 367 | + error_clear_last(); |
|
| 368 | + $result = \PDF_clip($p); |
|
| 369 | + if ($result === false) { |
|
| 370 | + throw PdfException::createFromPhpError(); |
|
| 371 | + } |
|
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | |
@@ -382,11 +382,11 @@ discard block |
||
| 382 | 382 | */ |
| 383 | 383 | function PDF_close_pdi_page($p, int $page): void |
| 384 | 384 | { |
| 385 | - error_clear_last(); |
|
| 386 | - $result = \PDF_close_pdi_page($p, $page); |
|
| 387 | - if ($result === false) { |
|
| 388 | - throw PdfException::createFromPhpError(); |
|
| 389 | - } |
|
| 385 | + error_clear_last(); |
|
| 386 | + $result = \PDF_close_pdi_page($p, $page); |
|
| 387 | + if ($result === false) { |
|
| 388 | + throw PdfException::createFromPhpError(); |
|
| 389 | + } |
|
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | |
@@ -403,11 +403,11 @@ discard block |
||
| 403 | 403 | */ |
| 404 | 404 | function PDF_close_pdi($p, int $doc): void |
| 405 | 405 | { |
| 406 | - error_clear_last(); |
|
| 407 | - $result = \PDF_close_pdi($p, $doc); |
|
| 408 | - if ($result === false) { |
|
| 409 | - throw PdfException::createFromPhpError(); |
|
| 410 | - } |
|
| 406 | + error_clear_last(); |
|
| 407 | + $result = \PDF_close_pdi($p, $doc); |
|
| 408 | + if ($result === false) { |
|
| 409 | + throw PdfException::createFromPhpError(); |
|
| 410 | + } |
|
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | |
@@ -424,11 +424,11 @@ discard block |
||
| 424 | 424 | */ |
| 425 | 425 | function PDF_close($p): void |
| 426 | 426 | { |
| 427 | - error_clear_last(); |
|
| 428 | - $result = \PDF_close($p); |
|
| 429 | - if ($result === false) { |
|
| 430 | - throw PdfException::createFromPhpError(); |
|
| 431 | - } |
|
| 427 | + error_clear_last(); |
|
| 428 | + $result = \PDF_close($p); |
|
| 429 | + if ($result === false) { |
|
| 430 | + throw PdfException::createFromPhpError(); |
|
| 431 | + } |
|
| 432 | 432 | } |
| 433 | 433 | |
| 434 | 434 | |
@@ -441,11 +441,11 @@ discard block |
||
| 441 | 441 | */ |
| 442 | 442 | function PDF_closepath_fill_stroke($p): void |
| 443 | 443 | { |
| 444 | - error_clear_last(); |
|
| 445 | - $result = \PDF_closepath_fill_stroke($p); |
|
| 446 | - if ($result === false) { |
|
| 447 | - throw PdfException::createFromPhpError(); |
|
| 448 | - } |
|
| 444 | + error_clear_last(); |
|
| 445 | + $result = \PDF_closepath_fill_stroke($p); |
|
| 446 | + if ($result === false) { |
|
| 447 | + throw PdfException::createFromPhpError(); |
|
| 448 | + } |
|
| 449 | 449 | } |
| 450 | 450 | |
| 451 | 451 | |
@@ -458,11 +458,11 @@ discard block |
||
| 458 | 458 | */ |
| 459 | 459 | function PDF_closepath_stroke($p): void |
| 460 | 460 | { |
| 461 | - error_clear_last(); |
|
| 462 | - $result = \PDF_closepath_stroke($p); |
|
| 463 | - if ($result === false) { |
|
| 464 | - throw PdfException::createFromPhpError(); |
|
| 465 | - } |
|
| 461 | + error_clear_last(); |
|
| 462 | + $result = \PDF_closepath_stroke($p); |
|
| 463 | + if ($result === false) { |
|
| 464 | + throw PdfException::createFromPhpError(); |
|
| 465 | + } |
|
| 466 | 466 | } |
| 467 | 467 | |
| 468 | 468 | |
@@ -475,11 +475,11 @@ discard block |
||
| 475 | 475 | */ |
| 476 | 476 | function PDF_closepath($p): void |
| 477 | 477 | { |
| 478 | - error_clear_last(); |
|
| 479 | - $result = \PDF_closepath($p); |
|
| 480 | - if ($result === false) { |
|
| 481 | - throw PdfException::createFromPhpError(); |
|
| 482 | - } |
|
| 478 | + error_clear_last(); |
|
| 479 | + $result = \PDF_closepath($p); |
|
| 480 | + if ($result === false) { |
|
| 481 | + throw PdfException::createFromPhpError(); |
|
| 482 | + } |
|
| 483 | 483 | } |
| 484 | 484 | |
| 485 | 485 | |
@@ -498,11 +498,11 @@ discard block |
||
| 498 | 498 | */ |
| 499 | 499 | function PDF_concat($p, float $a, float $b, float $c, float $d, float $e, float $f): void |
| 500 | 500 | { |
| 501 | - error_clear_last(); |
|
| 502 | - $result = \PDF_concat($p, $a, $b, $c, $d, $e, $f); |
|
| 503 | - if ($result === false) { |
|
| 504 | - throw PdfException::createFromPhpError(); |
|
| 505 | - } |
|
| 501 | + error_clear_last(); |
|
| 502 | + $result = \PDF_concat($p, $a, $b, $c, $d, $e, $f); |
|
| 503 | + if ($result === false) { |
|
| 504 | + throw PdfException::createFromPhpError(); |
|
| 505 | + } |
|
| 506 | 506 | } |
| 507 | 507 | |
| 508 | 508 | |
@@ -516,11 +516,11 @@ discard block |
||
| 516 | 516 | */ |
| 517 | 517 | function PDF_continue_text($p, string $text): void |
| 518 | 518 | { |
| 519 | - error_clear_last(); |
|
| 520 | - $result = \PDF_continue_text($p, $text); |
|
| 521 | - if ($result === false) { |
|
| 522 | - throw PdfException::createFromPhpError(); |
|
| 523 | - } |
|
| 519 | + error_clear_last(); |
|
| 520 | + $result = \PDF_continue_text($p, $text); |
|
| 521 | + if ($result === false) { |
|
| 522 | + throw PdfException::createFromPhpError(); |
|
| 523 | + } |
|
| 524 | 524 | } |
| 525 | 525 | |
| 526 | 526 | |
@@ -540,11 +540,11 @@ discard block |
||
| 540 | 540 | */ |
| 541 | 541 | function PDF_curveto($p, float $x1, float $y1, float $x2, float $y2, float $x3, float $y3): void |
| 542 | 542 | { |
| 543 | - error_clear_last(); |
|
| 544 | - $result = \PDF_curveto($p, $x1, $y1, $x2, $y2, $x3, $y3); |
|
| 545 | - if ($result === false) { |
|
| 546 | - throw PdfException::createFromPhpError(); |
|
| 547 | - } |
|
| 543 | + error_clear_last(); |
|
| 544 | + $result = \PDF_curveto($p, $x1, $y1, $x2, $y2, $x3, $y3); |
|
| 545 | + if ($result === false) { |
|
| 546 | + throw PdfException::createFromPhpError(); |
|
| 547 | + } |
|
| 548 | 548 | } |
| 549 | 549 | |
| 550 | 550 | |
@@ -557,11 +557,11 @@ discard block |
||
| 557 | 557 | */ |
| 558 | 558 | function PDF_delete($pdfdoc): void |
| 559 | 559 | { |
| 560 | - error_clear_last(); |
|
| 561 | - $result = \PDF_delete($pdfdoc); |
|
| 562 | - if ($result === false) { |
|
| 563 | - throw PdfException::createFromPhpError(); |
|
| 564 | - } |
|
| 560 | + error_clear_last(); |
|
| 561 | + $result = \PDF_delete($pdfdoc); |
|
| 562 | + if ($result === false) { |
|
| 563 | + throw PdfException::createFromPhpError(); |
|
| 564 | + } |
|
| 565 | 565 | } |
| 566 | 566 | |
| 567 | 567 | |
@@ -576,11 +576,11 @@ discard block |
||
| 576 | 576 | */ |
| 577 | 577 | function PDF_end_layer($pdfdoc): void |
| 578 | 578 | { |
| 579 | - error_clear_last(); |
|
| 580 | - $result = \PDF_end_layer($pdfdoc); |
|
| 581 | - if ($result === false) { |
|
| 582 | - throw PdfException::createFromPhpError(); |
|
| 583 | - } |
|
| 579 | + error_clear_last(); |
|
| 580 | + $result = \PDF_end_layer($pdfdoc); |
|
| 581 | + if ($result === false) { |
|
| 582 | + throw PdfException::createFromPhpError(); |
|
| 583 | + } |
|
| 584 | 584 | } |
| 585 | 585 | |
| 586 | 586 | |
@@ -594,11 +594,11 @@ discard block |
||
| 594 | 594 | */ |
| 595 | 595 | function PDF_end_page_ext($pdfdoc, string $optlist): void |
| 596 | 596 | { |
| 597 | - error_clear_last(); |
|
| 598 | - $result = \PDF_end_page_ext($pdfdoc, $optlist); |
|
| 599 | - if ($result === false) { |
|
| 600 | - throw PdfException::createFromPhpError(); |
|
| 601 | - } |
|
| 597 | + error_clear_last(); |
|
| 598 | + $result = \PDF_end_page_ext($pdfdoc, $optlist); |
|
| 599 | + if ($result === false) { |
|
| 600 | + throw PdfException::createFromPhpError(); |
|
| 601 | + } |
|
| 602 | 602 | } |
| 603 | 603 | |
| 604 | 604 | |
@@ -611,11 +611,11 @@ discard block |
||
| 611 | 611 | */ |
| 612 | 612 | function PDF_end_page($p): void |
| 613 | 613 | { |
| 614 | - error_clear_last(); |
|
| 615 | - $result = \PDF_end_page($p); |
|
| 616 | - if ($result === false) { |
|
| 617 | - throw PdfException::createFromPhpError(); |
|
| 618 | - } |
|
| 614 | + error_clear_last(); |
|
| 615 | + $result = \PDF_end_page($p); |
|
| 616 | + if ($result === false) { |
|
| 617 | + throw PdfException::createFromPhpError(); |
|
| 618 | + } |
|
| 619 | 619 | } |
| 620 | 620 | |
| 621 | 621 | |
@@ -628,11 +628,11 @@ discard block |
||
| 628 | 628 | */ |
| 629 | 629 | function PDF_end_pattern($p): void |
| 630 | 630 | { |
| 631 | - error_clear_last(); |
|
| 632 | - $result = \PDF_end_pattern($p); |
|
| 633 | - if ($result === false) { |
|
| 634 | - throw PdfException::createFromPhpError(); |
|
| 635 | - } |
|
| 631 | + error_clear_last(); |
|
| 632 | + $result = \PDF_end_pattern($p); |
|
| 633 | + if ($result === false) { |
|
| 634 | + throw PdfException::createFromPhpError(); |
|
| 635 | + } |
|
| 636 | 636 | } |
| 637 | 637 | |
| 638 | 638 | |
@@ -645,11 +645,11 @@ discard block |
||
| 645 | 645 | */ |
| 646 | 646 | function PDF_end_template($p): void |
| 647 | 647 | { |
| 648 | - error_clear_last(); |
|
| 649 | - $result = \PDF_end_template($p); |
|
| 650 | - if ($result === false) { |
|
| 651 | - throw PdfException::createFromPhpError(); |
|
| 652 | - } |
|
| 648 | + error_clear_last(); |
|
| 649 | + $result = \PDF_end_template($p); |
|
| 650 | + if ($result === false) { |
|
| 651 | + throw PdfException::createFromPhpError(); |
|
| 652 | + } |
|
| 653 | 653 | } |
| 654 | 654 | |
| 655 | 655 | |
@@ -663,11 +663,11 @@ discard block |
||
| 663 | 663 | */ |
| 664 | 664 | function PDF_fill_stroke($p): void |
| 665 | 665 | { |
| 666 | - error_clear_last(); |
|
| 667 | - $result = \PDF_fill_stroke($p); |
|
| 668 | - if ($result === false) { |
|
| 669 | - throw PdfException::createFromPhpError(); |
|
| 670 | - } |
|
| 666 | + error_clear_last(); |
|
| 667 | + $result = \PDF_fill_stroke($p); |
|
| 668 | + if ($result === false) { |
|
| 669 | + throw PdfException::createFromPhpError(); |
|
| 670 | + } |
|
| 671 | 671 | } |
| 672 | 672 | |
| 673 | 673 | |
@@ -681,11 +681,11 @@ discard block |
||
| 681 | 681 | */ |
| 682 | 682 | function PDF_fill($p): void |
| 683 | 683 | { |
| 684 | - error_clear_last(); |
|
| 685 | - $result = \PDF_fill($p); |
|
| 686 | - if ($result === false) { |
|
| 687 | - throw PdfException::createFromPhpError(); |
|
| 688 | - } |
|
| 684 | + error_clear_last(); |
|
| 685 | + $result = \PDF_fill($p); |
|
| 686 | + if ($result === false) { |
|
| 687 | + throw PdfException::createFromPhpError(); |
|
| 688 | + } |
|
| 689 | 689 | } |
| 690 | 690 | |
| 691 | 691 | |
@@ -703,11 +703,11 @@ discard block |
||
| 703 | 703 | */ |
| 704 | 704 | function PDF_fit_image($pdfdoc, int $image, float $x, float $y, string $optlist): void |
| 705 | 705 | { |
| 706 | - error_clear_last(); |
|
| 707 | - $result = \PDF_fit_image($pdfdoc, $image, $x, $y, $optlist); |
|
| 708 | - if ($result === false) { |
|
| 709 | - throw PdfException::createFromPhpError(); |
|
| 710 | - } |
|
| 706 | + error_clear_last(); |
|
| 707 | + $result = \PDF_fit_image($pdfdoc, $image, $x, $y, $optlist); |
|
| 708 | + if ($result === false) { |
|
| 709 | + throw PdfException::createFromPhpError(); |
|
| 710 | + } |
|
| 711 | 711 | } |
| 712 | 712 | |
| 713 | 713 | |
@@ -725,11 +725,11 @@ discard block |
||
| 725 | 725 | */ |
| 726 | 726 | function PDF_fit_pdi_page($pdfdoc, int $page, float $x, float $y, string $optlist): void |
| 727 | 727 | { |
| 728 | - error_clear_last(); |
|
| 729 | - $result = \PDF_fit_pdi_page($pdfdoc, $page, $x, $y, $optlist); |
|
| 730 | - if ($result === false) { |
|
| 731 | - throw PdfException::createFromPhpError(); |
|
| 732 | - } |
|
| 728 | + error_clear_last(); |
|
| 729 | + $result = \PDF_fit_pdi_page($pdfdoc, $page, $x, $y, $optlist); |
|
| 730 | + if ($result === false) { |
|
| 731 | + throw PdfException::createFromPhpError(); |
|
| 732 | + } |
|
| 733 | 733 | } |
| 734 | 734 | |
| 735 | 735 | |
@@ -746,11 +746,11 @@ discard block |
||
| 746 | 746 | */ |
| 747 | 747 | function PDF_fit_textline($pdfdoc, string $text, float $x, float $y, string $optlist): void |
| 748 | 748 | { |
| 749 | - error_clear_last(); |
|
| 750 | - $result = \PDF_fit_textline($pdfdoc, $text, $x, $y, $optlist); |
|
| 751 | - if ($result === false) { |
|
| 752 | - throw PdfException::createFromPhpError(); |
|
| 753 | - } |
|
| 749 | + error_clear_last(); |
|
| 750 | + $result = \PDF_fit_textline($pdfdoc, $text, $x, $y, $optlist); |
|
| 751 | + if ($result === false) { |
|
| 752 | + throw PdfException::createFromPhpError(); |
|
| 753 | + } |
|
| 754 | 754 | } |
| 755 | 755 | |
| 756 | 756 | |
@@ -764,11 +764,11 @@ discard block |
||
| 764 | 764 | */ |
| 765 | 765 | function PDF_initgraphics($p): void |
| 766 | 766 | { |
| 767 | - error_clear_last(); |
|
| 768 | - $result = \PDF_initgraphics($p); |
|
| 769 | - if ($result === false) { |
|
| 770 | - throw PdfException::createFromPhpError(); |
|
| 771 | - } |
|
| 767 | + error_clear_last(); |
|
| 768 | + $result = \PDF_initgraphics($p); |
|
| 769 | + if ($result === false) { |
|
| 770 | + throw PdfException::createFromPhpError(); |
|
| 771 | + } |
|
| 772 | 772 | } |
| 773 | 773 | |
| 774 | 774 | |
@@ -783,11 +783,11 @@ discard block |
||
| 783 | 783 | */ |
| 784 | 784 | function PDF_lineto($p, float $x, float $y): void |
| 785 | 785 | { |
| 786 | - error_clear_last(); |
|
| 787 | - $result = \PDF_lineto($p, $x, $y); |
|
| 788 | - if ($result === false) { |
|
| 789 | - throw PdfException::createFromPhpError(); |
|
| 790 | - } |
|
| 786 | + error_clear_last(); |
|
| 787 | + $result = \PDF_lineto($p, $x, $y); |
|
| 788 | + if ($result === false) { |
|
| 789 | + throw PdfException::createFromPhpError(); |
|
| 790 | + } |
|
| 791 | 791 | } |
| 792 | 792 | |
| 793 | 793 | |
@@ -803,12 +803,12 @@ discard block |
||
| 803 | 803 | */ |
| 804 | 804 | function PDF_makespotcolor($p, string $spotname): int |
| 805 | 805 | { |
| 806 | - error_clear_last(); |
|
| 807 | - $result = \PDF_makespotcolor($p, $spotname); |
|
| 808 | - if ($result === false) { |
|
| 809 | - throw PdfException::createFromPhpError(); |
|
| 810 | - } |
|
| 811 | - return $result; |
|
| 806 | + error_clear_last(); |
|
| 807 | + $result = \PDF_makespotcolor($p, $spotname); |
|
| 808 | + if ($result === false) { |
|
| 809 | + throw PdfException::createFromPhpError(); |
|
| 810 | + } |
|
| 811 | + return $result; |
|
| 812 | 812 | } |
| 813 | 813 | |
| 814 | 814 | |
@@ -823,11 +823,11 @@ discard block |
||
| 823 | 823 | */ |
| 824 | 824 | function PDF_moveto($p, float $x, float $y): void |
| 825 | 825 | { |
| 826 | - error_clear_last(); |
|
| 827 | - $result = \PDF_moveto($p, $x, $y); |
|
| 828 | - if ($result === false) { |
|
| 829 | - throw PdfException::createFromPhpError(); |
|
| 830 | - } |
|
| 826 | + error_clear_last(); |
|
| 827 | + $result = \PDF_moveto($p, $x, $y); |
|
| 828 | + if ($result === false) { |
|
| 829 | + throw PdfException::createFromPhpError(); |
|
| 830 | + } |
|
| 831 | 831 | } |
| 832 | 832 | |
| 833 | 833 | |
@@ -845,11 +845,11 @@ discard block |
||
| 845 | 845 | */ |
| 846 | 846 | function PDF_open_file($p, string $filename): void |
| 847 | 847 | { |
| 848 | - error_clear_last(); |
|
| 849 | - $result = \PDF_open_file($p, $filename); |
|
| 850 | - if ($result === false) { |
|
| 851 | - throw PdfException::createFromPhpError(); |
|
| 852 | - } |
|
| 848 | + error_clear_last(); |
|
| 849 | + $result = \PDF_open_file($p, $filename); |
|
| 850 | + if ($result === false) { |
|
| 851 | + throw PdfException::createFromPhpError(); |
|
| 852 | + } |
|
| 853 | 853 | } |
| 854 | 854 | |
| 855 | 855 | |
@@ -869,11 +869,11 @@ discard block |
||
| 869 | 869 | */ |
| 870 | 870 | function PDF_place_image($pdfdoc, int $image, float $x, float $y, float $scale): void |
| 871 | 871 | { |
| 872 | - error_clear_last(); |
|
| 873 | - $result = \PDF_place_image($pdfdoc, $image, $x, $y, $scale); |
|
| 874 | - if ($result === false) { |
|
| 875 | - throw PdfException::createFromPhpError(); |
|
| 876 | - } |
|
| 872 | + error_clear_last(); |
|
| 873 | + $result = \PDF_place_image($pdfdoc, $image, $x, $y, $scale); |
|
| 874 | + if ($result === false) { |
|
| 875 | + throw PdfException::createFromPhpError(); |
|
| 876 | + } |
|
| 877 | 877 | } |
| 878 | 878 | |
| 879 | 879 | |
@@ -894,11 +894,11 @@ discard block |
||
| 894 | 894 | */ |
| 895 | 895 | function PDF_place_pdi_page($pdfdoc, int $page, float $x, float $y, float $sx, float $sy): void |
| 896 | 896 | { |
| 897 | - error_clear_last(); |
|
| 898 | - $result = \PDF_place_pdi_page($pdfdoc, $page, $x, $y, $sx, $sy); |
|
| 899 | - if ($result === false) { |
|
| 900 | - throw PdfException::createFromPhpError(); |
|
| 901 | - } |
|
| 897 | + error_clear_last(); |
|
| 898 | + $result = \PDF_place_pdi_page($pdfdoc, $page, $x, $y, $sx, $sy); |
|
| 899 | + if ($result === false) { |
|
| 900 | + throw PdfException::createFromPhpError(); |
|
| 901 | + } |
|
| 902 | 902 | } |
| 903 | 903 | |
| 904 | 904 | |
@@ -915,11 +915,11 @@ discard block |
||
| 915 | 915 | */ |
| 916 | 916 | function PDF_rect($p, float $x, float $y, float $width, float $height): void |
| 917 | 917 | { |
| 918 | - error_clear_last(); |
|
| 919 | - $result = \PDF_rect($p, $x, $y, $width, $height); |
|
| 920 | - if ($result === false) { |
|
| 921 | - throw PdfException::createFromPhpError(); |
|
| 922 | - } |
|
| 918 | + error_clear_last(); |
|
| 919 | + $result = \PDF_rect($p, $x, $y, $width, $height); |
|
| 920 | + if ($result === false) { |
|
| 921 | + throw PdfException::createFromPhpError(); |
|
| 922 | + } |
|
| 923 | 923 | } |
| 924 | 924 | |
| 925 | 925 | |
@@ -932,11 +932,11 @@ discard block |
||
| 932 | 932 | */ |
| 933 | 933 | function PDF_restore($p): void |
| 934 | 934 | { |
| 935 | - error_clear_last(); |
|
| 936 | - $result = \PDF_restore($p); |
|
| 937 | - if ($result === false) { |
|
| 938 | - throw PdfException::createFromPhpError(); |
|
| 939 | - } |
|
| 935 | + error_clear_last(); |
|
| 936 | + $result = \PDF_restore($p); |
|
| 937 | + if ($result === false) { |
|
| 938 | + throw PdfException::createFromPhpError(); |
|
| 939 | + } |
|
| 940 | 940 | } |
| 941 | 941 | |
| 942 | 942 | |
@@ -950,11 +950,11 @@ discard block |
||
| 950 | 950 | */ |
| 951 | 951 | function PDF_rotate($p, float $phi): void |
| 952 | 952 | { |
| 953 | - error_clear_last(); |
|
| 954 | - $result = \PDF_rotate($p, $phi); |
|
| 955 | - if ($result === false) { |
|
| 956 | - throw PdfException::createFromPhpError(); |
|
| 957 | - } |
|
| 953 | + error_clear_last(); |
|
| 954 | + $result = \PDF_rotate($p, $phi); |
|
| 955 | + if ($result === false) { |
|
| 956 | + throw PdfException::createFromPhpError(); |
|
| 957 | + } |
|
| 958 | 958 | } |
| 959 | 959 | |
| 960 | 960 | |
@@ -967,11 +967,11 @@ discard block |
||
| 967 | 967 | */ |
| 968 | 968 | function PDF_save($p): void |
| 969 | 969 | { |
| 970 | - error_clear_last(); |
|
| 971 | - $result = \PDF_save($p); |
|
| 972 | - if ($result === false) { |
|
| 973 | - throw PdfException::createFromPhpError(); |
|
| 974 | - } |
|
| 970 | + error_clear_last(); |
|
| 971 | + $result = \PDF_save($p); |
|
| 972 | + if ($result === false) { |
|
| 973 | + throw PdfException::createFromPhpError(); |
|
| 974 | + } |
|
| 975 | 975 | } |
| 976 | 976 | |
| 977 | 977 | |
@@ -986,11 +986,11 @@ discard block |
||
| 986 | 986 | */ |
| 987 | 987 | function PDF_scale($p, float $sx, float $sy): void |
| 988 | 988 | { |
| 989 | - error_clear_last(); |
|
| 990 | - $result = \PDF_scale($p, $sx, $sy); |
|
| 991 | - if ($result === false) { |
|
| 992 | - throw PdfException::createFromPhpError(); |
|
| 993 | - } |
|
| 989 | + error_clear_last(); |
|
| 990 | + $result = \PDF_scale($p, $sx, $sy); |
|
| 991 | + if ($result === false) { |
|
| 992 | + throw PdfException::createFromPhpError(); |
|
| 993 | + } |
|
| 994 | 994 | } |
| 995 | 995 | |
| 996 | 996 | |
@@ -1010,11 +1010,11 @@ discard block |
||
| 1010 | 1010 | */ |
| 1011 | 1011 | function PDF_set_border_color($p, float $red, float $green, float $blue): void |
| 1012 | 1012 | { |
| 1013 | - error_clear_last(); |
|
| 1014 | - $result = \PDF_set_border_color($p, $red, $green, $blue); |
|
| 1015 | - if ($result === false) { |
|
| 1016 | - throw PdfException::createFromPhpError(); |
|
| 1017 | - } |
|
| 1013 | + error_clear_last(); |
|
| 1014 | + $result = \PDF_set_border_color($p, $red, $green, $blue); |
|
| 1015 | + if ($result === false) { |
|
| 1016 | + throw PdfException::createFromPhpError(); |
|
| 1017 | + } |
|
| 1018 | 1018 | } |
| 1019 | 1019 | |
| 1020 | 1020 | |
@@ -1033,11 +1033,11 @@ discard block |
||
| 1033 | 1033 | */ |
| 1034 | 1034 | function PDF_set_border_dash($pdfdoc, float $black, float $white): void |
| 1035 | 1035 | { |
| 1036 | - error_clear_last(); |
|
| 1037 | - $result = \PDF_set_border_dash($pdfdoc, $black, $white); |
|
| 1038 | - if ($result === false) { |
|
| 1039 | - throw PdfException::createFromPhpError(); |
|
| 1040 | - } |
|
| 1036 | + error_clear_last(); |
|
| 1037 | + $result = \PDF_set_border_dash($pdfdoc, $black, $white); |
|
| 1038 | + if ($result === false) { |
|
| 1039 | + throw PdfException::createFromPhpError(); |
|
| 1040 | + } |
|
| 1041 | 1041 | } |
| 1042 | 1042 | |
| 1043 | 1043 | |
@@ -1057,11 +1057,11 @@ discard block |
||
| 1057 | 1057 | */ |
| 1058 | 1058 | function PDF_set_border_style($pdfdoc, string $style, float $width): void |
| 1059 | 1059 | { |
| 1060 | - error_clear_last(); |
|
| 1061 | - $result = \PDF_set_border_style($pdfdoc, $style, $width); |
|
| 1062 | - if ($result === false) { |
|
| 1063 | - throw PdfException::createFromPhpError(); |
|
| 1064 | - } |
|
| 1060 | + error_clear_last(); |
|
| 1061 | + $result = \PDF_set_border_style($pdfdoc, $style, $width); |
|
| 1062 | + if ($result === false) { |
|
| 1063 | + throw PdfException::createFromPhpError(); |
|
| 1064 | + } |
|
| 1065 | 1065 | } |
| 1066 | 1066 | |
| 1067 | 1067 | |
@@ -1077,11 +1077,11 @@ discard block |
||
| 1077 | 1077 | */ |
| 1078 | 1078 | function PDF_set_info($p, string $key, string $value): void |
| 1079 | 1079 | { |
| 1080 | - error_clear_last(); |
|
| 1081 | - $result = \PDF_set_info($p, $key, $value); |
|
| 1082 | - if ($result === false) { |
|
| 1083 | - throw PdfException::createFromPhpError(); |
|
| 1084 | - } |
|
| 1080 | + error_clear_last(); |
|
| 1081 | + $result = \PDF_set_info($p, $key, $value); |
|
| 1082 | + if ($result === false) { |
|
| 1083 | + throw PdfException::createFromPhpError(); |
|
| 1084 | + } |
|
| 1085 | 1085 | } |
| 1086 | 1086 | |
| 1087 | 1087 | |
@@ -1098,11 +1098,11 @@ discard block |
||
| 1098 | 1098 | */ |
| 1099 | 1099 | function PDF_set_layer_dependency($pdfdoc, string $type, string $optlist): void |
| 1100 | 1100 | { |
| 1101 | - error_clear_last(); |
|
| 1102 | - $result = \PDF_set_layer_dependency($pdfdoc, $type, $optlist); |
|
| 1103 | - if ($result === false) { |
|
| 1104 | - throw PdfException::createFromPhpError(); |
|
| 1105 | - } |
|
| 1101 | + error_clear_last(); |
|
| 1102 | + $result = \PDF_set_layer_dependency($pdfdoc, $type, $optlist); |
|
| 1103 | + if ($result === false) { |
|
| 1104 | + throw PdfException::createFromPhpError(); |
|
| 1105 | + } |
|
| 1106 | 1106 | } |
| 1107 | 1107 | |
| 1108 | 1108 | |
@@ -1117,11 +1117,11 @@ discard block |
||
| 1117 | 1117 | */ |
| 1118 | 1118 | function PDF_set_parameter($p, string $key, string $value): void |
| 1119 | 1119 | { |
| 1120 | - error_clear_last(); |
|
| 1121 | - $result = \PDF_set_parameter($p, $key, $value); |
|
| 1122 | - if ($result === false) { |
|
| 1123 | - throw PdfException::createFromPhpError(); |
|
| 1124 | - } |
|
| 1120 | + error_clear_last(); |
|
| 1121 | + $result = \PDF_set_parameter($p, $key, $value); |
|
| 1122 | + if ($result === false) { |
|
| 1123 | + throw PdfException::createFromPhpError(); |
|
| 1124 | + } |
|
| 1125 | 1125 | } |
| 1126 | 1126 | |
| 1127 | 1127 | |
@@ -1136,11 +1136,11 @@ discard block |
||
| 1136 | 1136 | */ |
| 1137 | 1137 | function PDF_set_text_pos($p, float $x, float $y): void |
| 1138 | 1138 | { |
| 1139 | - error_clear_last(); |
|
| 1140 | - $result = \PDF_set_text_pos($p, $x, $y); |
|
| 1141 | - if ($result === false) { |
|
| 1142 | - throw PdfException::createFromPhpError(); |
|
| 1143 | - } |
|
| 1139 | + error_clear_last(); |
|
| 1140 | + $result = \PDF_set_text_pos($p, $x, $y); |
|
| 1141 | + if ($result === false) { |
|
| 1142 | + throw PdfException::createFromPhpError(); |
|
| 1143 | + } |
|
| 1144 | 1144 | } |
| 1145 | 1145 | |
| 1146 | 1146 | |
@@ -1155,11 +1155,11 @@ discard block |
||
| 1155 | 1155 | */ |
| 1156 | 1156 | function PDF_set_value($p, string $key, float $value): void |
| 1157 | 1157 | { |
| 1158 | - error_clear_last(); |
|
| 1159 | - $result = \PDF_set_value($p, $key, $value); |
|
| 1160 | - if ($result === false) { |
|
| 1161 | - throw PdfException::createFromPhpError(); |
|
| 1162 | - } |
|
| 1158 | + error_clear_last(); |
|
| 1159 | + $result = \PDF_set_value($p, $key, $value); |
|
| 1160 | + if ($result === false) { |
|
| 1161 | + throw PdfException::createFromPhpError(); |
|
| 1162 | + } |
|
| 1163 | 1163 | } |
| 1164 | 1164 | |
| 1165 | 1165 | |
@@ -1178,11 +1178,11 @@ discard block |
||
| 1178 | 1178 | */ |
| 1179 | 1179 | function PDF_setcolor($p, string $fstype, string $colorspace, float $c1, float $c2, float $c3, float $c4): void |
| 1180 | 1180 | { |
| 1181 | - error_clear_last(); |
|
| 1182 | - $result = \PDF_setcolor($p, $fstype, $colorspace, $c1, $c2, $c3, $c4); |
|
| 1183 | - if ($result === false) { |
|
| 1184 | - throw PdfException::createFromPhpError(); |
|
| 1185 | - } |
|
| 1181 | + error_clear_last(); |
|
| 1182 | + $result = \PDF_setcolor($p, $fstype, $colorspace, $c1, $c2, $c3, $c4); |
|
| 1183 | + if ($result === false) { |
|
| 1184 | + throw PdfException::createFromPhpError(); |
|
| 1185 | + } |
|
| 1186 | 1186 | } |
| 1187 | 1187 | |
| 1188 | 1188 | |
@@ -1198,11 +1198,11 @@ discard block |
||
| 1198 | 1198 | */ |
| 1199 | 1199 | function PDF_setdash($pdfdoc, float $b, float $w): void |
| 1200 | 1200 | { |
| 1201 | - error_clear_last(); |
|
| 1202 | - $result = \PDF_setdash($pdfdoc, $b, $w); |
|
| 1203 | - if ($result === false) { |
|
| 1204 | - throw PdfException::createFromPhpError(); |
|
| 1205 | - } |
|
| 1201 | + error_clear_last(); |
|
| 1202 | + $result = \PDF_setdash($pdfdoc, $b, $w); |
|
| 1203 | + if ($result === false) { |
|
| 1204 | + throw PdfException::createFromPhpError(); |
|
| 1205 | + } |
|
| 1206 | 1206 | } |
| 1207 | 1207 | |
| 1208 | 1208 | |
@@ -1216,11 +1216,11 @@ discard block |
||
| 1216 | 1216 | */ |
| 1217 | 1217 | function PDF_setdashpattern($pdfdoc, string $optlist): void |
| 1218 | 1218 | { |
| 1219 | - error_clear_last(); |
|
| 1220 | - $result = \PDF_setdashpattern($pdfdoc, $optlist); |
|
| 1221 | - if ($result === false) { |
|
| 1222 | - throw PdfException::createFromPhpError(); |
|
| 1223 | - } |
|
| 1219 | + error_clear_last(); |
|
| 1220 | + $result = \PDF_setdashpattern($pdfdoc, $optlist); |
|
| 1221 | + if ($result === false) { |
|
| 1222 | + throw PdfException::createFromPhpError(); |
|
| 1223 | + } |
|
| 1224 | 1224 | } |
| 1225 | 1225 | |
| 1226 | 1226 | |
@@ -1234,11 +1234,11 @@ discard block |
||
| 1234 | 1234 | */ |
| 1235 | 1235 | function PDF_setflat($pdfdoc, float $flatness): void |
| 1236 | 1236 | { |
| 1237 | - error_clear_last(); |
|
| 1238 | - $result = \PDF_setflat($pdfdoc, $flatness); |
|
| 1239 | - if ($result === false) { |
|
| 1240 | - throw PdfException::createFromPhpError(); |
|
| 1241 | - } |
|
| 1237 | + error_clear_last(); |
|
| 1238 | + $result = \PDF_setflat($pdfdoc, $flatness); |
|
| 1239 | + if ($result === false) { |
|
| 1240 | + throw PdfException::createFromPhpError(); |
|
| 1241 | + } |
|
| 1242 | 1242 | } |
| 1243 | 1243 | |
| 1244 | 1244 | |
@@ -1255,11 +1255,11 @@ discard block |
||
| 1255 | 1255 | */ |
| 1256 | 1256 | function PDF_setfont($pdfdoc, int $font, float $fontsize): void |
| 1257 | 1257 | { |
| 1258 | - error_clear_last(); |
|
| 1259 | - $result = \PDF_setfont($pdfdoc, $font, $fontsize); |
|
| 1260 | - if ($result === false) { |
|
| 1261 | - throw PdfException::createFromPhpError(); |
|
| 1262 | - } |
|
| 1258 | + error_clear_last(); |
|
| 1259 | + $result = \PDF_setfont($pdfdoc, $font, $fontsize); |
|
| 1260 | + if ($result === false) { |
|
| 1261 | + throw PdfException::createFromPhpError(); |
|
| 1262 | + } |
|
| 1263 | 1263 | } |
| 1264 | 1264 | |
| 1265 | 1265 | |
@@ -1277,11 +1277,11 @@ discard block |
||
| 1277 | 1277 | */ |
| 1278 | 1278 | function PDF_setgray_fill($p, float $g): void |
| 1279 | 1279 | { |
| 1280 | - error_clear_last(); |
|
| 1281 | - $result = \PDF_setgray_fill($p, $g); |
|
| 1282 | - if ($result === false) { |
|
| 1283 | - throw PdfException::createFromPhpError(); |
|
| 1284 | - } |
|
| 1280 | + error_clear_last(); |
|
| 1281 | + $result = \PDF_setgray_fill($p, $g); |
|
| 1282 | + if ($result === false) { |
|
| 1283 | + throw PdfException::createFromPhpError(); |
|
| 1284 | + } |
|
| 1285 | 1285 | } |
| 1286 | 1286 | |
| 1287 | 1287 | |
@@ -1299,11 +1299,11 @@ discard block |
||
| 1299 | 1299 | */ |
| 1300 | 1300 | function PDF_setgray_stroke($p, float $g): void |
| 1301 | 1301 | { |
| 1302 | - error_clear_last(); |
|
| 1303 | - $result = \PDF_setgray_stroke($p, $g); |
|
| 1304 | - if ($result === false) { |
|
| 1305 | - throw PdfException::createFromPhpError(); |
|
| 1306 | - } |
|
| 1302 | + error_clear_last(); |
|
| 1303 | + $result = \PDF_setgray_stroke($p, $g); |
|
| 1304 | + if ($result === false) { |
|
| 1305 | + throw PdfException::createFromPhpError(); |
|
| 1306 | + } |
|
| 1307 | 1307 | } |
| 1308 | 1308 | |
| 1309 | 1309 | |
@@ -1320,11 +1320,11 @@ discard block |
||
| 1320 | 1320 | */ |
| 1321 | 1321 | function PDF_setgray($p, float $g): void |
| 1322 | 1322 | { |
| 1323 | - error_clear_last(); |
|
| 1324 | - $result = \PDF_setgray($p, $g); |
|
| 1325 | - if ($result === false) { |
|
| 1326 | - throw PdfException::createFromPhpError(); |
|
| 1327 | - } |
|
| 1323 | + error_clear_last(); |
|
| 1324 | + $result = \PDF_setgray($p, $g); |
|
| 1325 | + if ($result === false) { |
|
| 1326 | + throw PdfException::createFromPhpError(); |
|
| 1327 | + } |
|
| 1328 | 1328 | } |
| 1329 | 1329 | |
| 1330 | 1330 | |
@@ -1339,11 +1339,11 @@ discard block |
||
| 1339 | 1339 | */ |
| 1340 | 1340 | function PDF_setlinejoin($p, int $value): void |
| 1341 | 1341 | { |
| 1342 | - error_clear_last(); |
|
| 1343 | - $result = \PDF_setlinejoin($p, $value); |
|
| 1344 | - if ($result === false) { |
|
| 1345 | - throw PdfException::createFromPhpError(); |
|
| 1346 | - } |
|
| 1342 | + error_clear_last(); |
|
| 1343 | + $result = \PDF_setlinejoin($p, $value); |
|
| 1344 | + if ($result === false) { |
|
| 1345 | + throw PdfException::createFromPhpError(); |
|
| 1346 | + } |
|
| 1347 | 1347 | } |
| 1348 | 1348 | |
| 1349 | 1349 | |
@@ -1357,11 +1357,11 @@ discard block |
||
| 1357 | 1357 | */ |
| 1358 | 1358 | function PDF_setlinewidth($p, float $width): void |
| 1359 | 1359 | { |
| 1360 | - error_clear_last(); |
|
| 1361 | - $result = \PDF_setlinewidth($p, $width); |
|
| 1362 | - if ($result === false) { |
|
| 1363 | - throw PdfException::createFromPhpError(); |
|
| 1364 | - } |
|
| 1360 | + error_clear_last(); |
|
| 1361 | + $result = \PDF_setlinewidth($p, $width); |
|
| 1362 | + if ($result === false) { |
|
| 1363 | + throw PdfException::createFromPhpError(); |
|
| 1364 | + } |
|
| 1365 | 1365 | } |
| 1366 | 1366 | |
| 1367 | 1367 | |
@@ -1380,11 +1380,11 @@ discard block |
||
| 1380 | 1380 | */ |
| 1381 | 1381 | function PDF_setmatrix($p, float $a, float $b, float $c, float $d, float $e, float $f): void |
| 1382 | 1382 | { |
| 1383 | - error_clear_last(); |
|
| 1384 | - $result = \PDF_setmatrix($p, $a, $b, $c, $d, $e, $f); |
|
| 1385 | - if ($result === false) { |
|
| 1386 | - throw PdfException::createFromPhpError(); |
|
| 1387 | - } |
|
| 1383 | + error_clear_last(); |
|
| 1384 | + $result = \PDF_setmatrix($p, $a, $b, $c, $d, $e, $f); |
|
| 1385 | + if ($result === false) { |
|
| 1386 | + throw PdfException::createFromPhpError(); |
|
| 1387 | + } |
|
| 1388 | 1388 | } |
| 1389 | 1389 | |
| 1390 | 1390 | |
@@ -1398,11 +1398,11 @@ discard block |
||
| 1398 | 1398 | */ |
| 1399 | 1399 | function PDF_setmiterlimit($pdfdoc, float $miter): void |
| 1400 | 1400 | { |
| 1401 | - error_clear_last(); |
|
| 1402 | - $result = \PDF_setmiterlimit($pdfdoc, $miter); |
|
| 1403 | - if ($result === false) { |
|
| 1404 | - throw PdfException::createFromPhpError(); |
|
| 1405 | - } |
|
| 1401 | + error_clear_last(); |
|
| 1402 | + $result = \PDF_setmiterlimit($pdfdoc, $miter); |
|
| 1403 | + if ($result === false) { |
|
| 1404 | + throw PdfException::createFromPhpError(); |
|
| 1405 | + } |
|
| 1406 | 1406 | } |
| 1407 | 1407 | |
| 1408 | 1408 | |
@@ -1421,11 +1421,11 @@ discard block |
||
| 1421 | 1421 | */ |
| 1422 | 1422 | function PDF_setrgbcolor_fill($p, float $red, float $green, float $blue): void |
| 1423 | 1423 | { |
| 1424 | - error_clear_last(); |
|
| 1425 | - $result = \PDF_setrgbcolor_fill($p, $red, $green, $blue); |
|
| 1426 | - if ($result === false) { |
|
| 1427 | - throw PdfException::createFromPhpError(); |
|
| 1428 | - } |
|
| 1424 | + error_clear_last(); |
|
| 1425 | + $result = \PDF_setrgbcolor_fill($p, $red, $green, $blue); |
|
| 1426 | + if ($result === false) { |
|
| 1427 | + throw PdfException::createFromPhpError(); |
|
| 1428 | + } |
|
| 1429 | 1429 | } |
| 1430 | 1430 | |
| 1431 | 1431 | |
@@ -1444,11 +1444,11 @@ discard block |
||
| 1444 | 1444 | */ |
| 1445 | 1445 | function PDF_setrgbcolor_stroke($p, float $red, float $green, float $blue): void |
| 1446 | 1446 | { |
| 1447 | - error_clear_last(); |
|
| 1448 | - $result = \PDF_setrgbcolor_stroke($p, $red, $green, $blue); |
|
| 1449 | - if ($result === false) { |
|
| 1450 | - throw PdfException::createFromPhpError(); |
|
| 1451 | - } |
|
| 1447 | + error_clear_last(); |
|
| 1448 | + $result = \PDF_setrgbcolor_stroke($p, $red, $green, $blue); |
|
| 1449 | + if ($result === false) { |
|
| 1450 | + throw PdfException::createFromPhpError(); |
|
| 1451 | + } |
|
| 1452 | 1452 | } |
| 1453 | 1453 | |
| 1454 | 1454 | |
@@ -1468,11 +1468,11 @@ discard block |
||
| 1468 | 1468 | */ |
| 1469 | 1469 | function PDF_setrgbcolor($p, float $red, float $green, float $blue): void |
| 1470 | 1470 | { |
| 1471 | - error_clear_last(); |
|
| 1472 | - $result = \PDF_setrgbcolor($p, $red, $green, $blue); |
|
| 1473 | - if ($result === false) { |
|
| 1474 | - throw PdfException::createFromPhpError(); |
|
| 1475 | - } |
|
| 1471 | + error_clear_last(); |
|
| 1472 | + $result = \PDF_setrgbcolor($p, $red, $green, $blue); |
|
| 1473 | + if ($result === false) { |
|
| 1474 | + throw PdfException::createFromPhpError(); |
|
| 1475 | + } |
|
| 1476 | 1476 | } |
| 1477 | 1477 | |
| 1478 | 1478 | |
@@ -1488,11 +1488,11 @@ discard block |
||
| 1488 | 1488 | */ |
| 1489 | 1489 | function PDF_show_xy($p, string $text, float $x, float $y): void |
| 1490 | 1490 | { |
| 1491 | - error_clear_last(); |
|
| 1492 | - $result = \PDF_show_xy($p, $text, $x, $y); |
|
| 1493 | - if ($result === false) { |
|
| 1494 | - throw PdfException::createFromPhpError(); |
|
| 1495 | - } |
|
| 1491 | + error_clear_last(); |
|
| 1492 | + $result = \PDF_show_xy($p, $text, $x, $y); |
|
| 1493 | + if ($result === false) { |
|
| 1494 | + throw PdfException::createFromPhpError(); |
|
| 1495 | + } |
|
| 1496 | 1496 | } |
| 1497 | 1497 | |
| 1498 | 1498 | |
@@ -1507,11 +1507,11 @@ discard block |
||
| 1507 | 1507 | */ |
| 1508 | 1508 | function PDF_show($pdfdoc, string $text): void |
| 1509 | 1509 | { |
| 1510 | - error_clear_last(); |
|
| 1511 | - $result = \PDF_show($pdfdoc, $text); |
|
| 1512 | - if ($result === false) { |
|
| 1513 | - throw PdfException::createFromPhpError(); |
|
| 1514 | - } |
|
| 1510 | + error_clear_last(); |
|
| 1511 | + $result = \PDF_show($pdfdoc, $text); |
|
| 1512 | + if ($result === false) { |
|
| 1513 | + throw PdfException::createFromPhpError(); |
|
| 1514 | + } |
|
| 1515 | 1515 | } |
| 1516 | 1516 | |
| 1517 | 1517 | |
@@ -1527,11 +1527,11 @@ discard block |
||
| 1527 | 1527 | */ |
| 1528 | 1528 | function PDF_skew($p, float $alpha, float $beta): void |
| 1529 | 1529 | { |
| 1530 | - error_clear_last(); |
|
| 1531 | - $result = \PDF_skew($p, $alpha, $beta); |
|
| 1532 | - if ($result === false) { |
|
| 1533 | - throw PdfException::createFromPhpError(); |
|
| 1534 | - } |
|
| 1530 | + error_clear_last(); |
|
| 1531 | + $result = \PDF_skew($p, $alpha, $beta); |
|
| 1532 | + if ($result === false) { |
|
| 1533 | + throw PdfException::createFromPhpError(); |
|
| 1534 | + } |
|
| 1535 | 1535 | } |
| 1536 | 1536 | |
| 1537 | 1537 | |
@@ -1545,9 +1545,9 @@ discard block |
||
| 1545 | 1545 | */ |
| 1546 | 1546 | function PDF_stroke($p): void |
| 1547 | 1547 | { |
| 1548 | - error_clear_last(); |
|
| 1549 | - $result = \PDF_stroke($p); |
|
| 1550 | - if ($result === false) { |
|
| 1551 | - throw PdfException::createFromPhpError(); |
|
| 1552 | - } |
|
| 1548 | + error_clear_last(); |
|
| 1549 | + $result = \PDF_stroke($p); |
|
| 1550 | + if ($result === false) { |
|
| 1551 | + throw PdfException::createFromPhpError(); |
|
| 1552 | + } |
|
| 1553 | 1553 | } |
@@ -18,11 +18,11 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): void |
| 20 | 20 | { |
| 21 | - error_clear_last(); |
|
| 22 | - $result = \xdiff_file_bdiff($old_file, $new_file, $dest); |
|
| 23 | - if ($result === false) { |
|
| 24 | - throw XdiffException::createFromPhpError(); |
|
| 25 | - } |
|
| 21 | + error_clear_last(); |
|
| 22 | + $result = \xdiff_file_bdiff($old_file, $new_file, $dest); |
|
| 23 | + if ($result === false) { |
|
| 24 | + throw XdiffException::createFromPhpError(); |
|
| 25 | + } |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | |
@@ -40,11 +40,11 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | function xdiff_file_bpatch(string $file, string $patch, string $dest): void |
| 42 | 42 | { |
| 43 | - error_clear_last(); |
|
| 44 | - $result = \xdiff_file_bpatch($file, $patch, $dest); |
|
| 45 | - if ($result === false) { |
|
| 46 | - throw XdiffException::createFromPhpError(); |
|
| 47 | - } |
|
| 43 | + error_clear_last(); |
|
| 44 | + $result = \xdiff_file_bpatch($file, $patch, $dest); |
|
| 45 | + if ($result === false) { |
|
| 46 | + throw XdiffException::createFromPhpError(); |
|
| 47 | + } |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | |
@@ -64,11 +64,11 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest): void |
| 66 | 66 | { |
| 67 | - error_clear_last(); |
|
| 68 | - $result = \xdiff_file_diff_binary($old_file, $new_file, $dest); |
|
| 69 | - if ($result === false) { |
|
| 70 | - throw XdiffException::createFromPhpError(); |
|
| 71 | - } |
|
| 67 | + error_clear_last(); |
|
| 68 | + $result = \xdiff_file_diff_binary($old_file, $new_file, $dest); |
|
| 69 | + if ($result === false) { |
|
| 70 | + throw XdiffException::createFromPhpError(); |
|
| 71 | + } |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | |
@@ -92,11 +92,11 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | function xdiff_file_diff(string $old_file, string $new_file, string $dest, int $context = 3, bool $minimal = false): void |
| 94 | 94 | { |
| 95 | - error_clear_last(); |
|
| 96 | - $result = \xdiff_file_diff($old_file, $new_file, $dest, $context, $minimal); |
|
| 97 | - if ($result === false) { |
|
| 98 | - throw XdiffException::createFromPhpError(); |
|
| 99 | - } |
|
| 95 | + error_clear_last(); |
|
| 96 | + $result = \xdiff_file_diff($old_file, $new_file, $dest, $context, $minimal); |
|
| 97 | + if ($result === false) { |
|
| 98 | + throw XdiffException::createFromPhpError(); |
|
| 99 | + } |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | |
@@ -116,11 +116,11 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | function xdiff_file_patch_binary(string $file, string $patch, string $dest): void |
| 118 | 118 | { |
| 119 | - error_clear_last(); |
|
| 120 | - $result = \xdiff_file_patch_binary($file, $patch, $dest); |
|
| 121 | - if ($result === false) { |
|
| 122 | - throw XdiffException::createFromPhpError(); |
|
| 123 | - } |
|
| 119 | + error_clear_last(); |
|
| 120 | + $result = \xdiff_file_patch_binary($file, $patch, $dest); |
|
| 121 | + if ($result === false) { |
|
| 122 | + throw XdiffException::createFromPhpError(); |
|
| 123 | + } |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | |
@@ -143,11 +143,11 @@ discard block |
||
| 143 | 143 | */ |
| 144 | 144 | function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): void |
| 145 | 145 | { |
| 146 | - error_clear_last(); |
|
| 147 | - $result = \xdiff_file_rabdiff($old_file, $new_file, $dest); |
|
| 148 | - if ($result === false) { |
|
| 149 | - throw XdiffException::createFromPhpError(); |
|
| 150 | - } |
|
| 146 | + error_clear_last(); |
|
| 147 | + $result = \xdiff_file_rabdiff($old_file, $new_file, $dest); |
|
| 148 | + if ($result === false) { |
|
| 149 | + throw XdiffException::createFromPhpError(); |
|
| 150 | + } |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | |
@@ -164,12 +164,12 @@ discard block |
||
| 164 | 164 | */ |
| 165 | 165 | function xdiff_string_bpatch(string $str, string $patch): string |
| 166 | 166 | { |
| 167 | - error_clear_last(); |
|
| 168 | - $result = \xdiff_string_bpatch($str, $patch); |
|
| 169 | - if ($result === false) { |
|
| 170 | - throw XdiffException::createFromPhpError(); |
|
| 171 | - } |
|
| 172 | - return $result; |
|
| 167 | + error_clear_last(); |
|
| 168 | + $result = \xdiff_string_bpatch($str, $patch); |
|
| 169 | + if ($result === false) { |
|
| 170 | + throw XdiffException::createFromPhpError(); |
|
| 171 | + } |
|
| 172 | + return $result; |
|
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | |
@@ -188,12 +188,12 @@ discard block |
||
| 188 | 188 | */ |
| 189 | 189 | function xdiff_string_patch_binary(string $str, string $patch): string |
| 190 | 190 | { |
| 191 | - error_clear_last(); |
|
| 192 | - $result = \xdiff_string_patch_binary($str, $patch); |
|
| 193 | - if ($result === false) { |
|
| 194 | - throw XdiffException::createFromPhpError(); |
|
| 195 | - } |
|
| 196 | - return $result; |
|
| 191 | + error_clear_last(); |
|
| 192 | + $result = \xdiff_string_patch_binary($str, $patch); |
|
| 193 | + if ($result === false) { |
|
| 194 | + throw XdiffException::createFromPhpError(); |
|
| 195 | + } |
|
| 196 | + return $result; |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | |
@@ -221,16 +221,16 @@ discard block |
||
| 221 | 221 | */ |
| 222 | 222 | function xdiff_string_patch(string $str, string $patch, int $flags = null, ?string &$error = null): string |
| 223 | 223 | { |
| 224 | - error_clear_last(); |
|
| 225 | - if ($error !== null) { |
|
| 226 | - $result = \xdiff_string_patch($str, $patch, $flags, $error); |
|
| 227 | - } elseif ($flags !== null) { |
|
| 228 | - $result = \xdiff_string_patch($str, $patch, $flags); |
|
| 229 | - } else { |
|
| 230 | - $result = \xdiff_string_patch($str, $patch); |
|
| 231 | - } |
|
| 232 | - if ($result === false) { |
|
| 233 | - throw XdiffException::createFromPhpError(); |
|
| 234 | - } |
|
| 235 | - return $result; |
|
| 224 | + error_clear_last(); |
|
| 225 | + if ($error !== null) { |
|
| 226 | + $result = \xdiff_string_patch($str, $patch, $flags, $error); |
|
| 227 | + } elseif ($flags !== null) { |
|
| 228 | + $result = \xdiff_string_patch($str, $patch, $flags); |
|
| 229 | + } else { |
|
| 230 | + $result = \xdiff_string_patch($str, $patch); |
|
| 231 | + } |
|
| 232 | + if ($result === false) { |
|
| 233 | + throw XdiffException::createFromPhpError(); |
|
| 234 | + } |
|
| 235 | + return $result; |
|
| 236 | 236 | } |
@@ -28,16 +28,16 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | function mailparse_msg_extract_part_file($mimemail, $filename, callable $callbackfunc = null): string |
| 30 | 30 | { |
| 31 | - error_clear_last(); |
|
| 32 | - if ($callbackfunc !== null) { |
|
| 33 | - $result = \mailparse_msg_extract_part_file($mimemail, $filename, $callbackfunc); |
|
| 34 | - } else { |
|
| 35 | - $result = \mailparse_msg_extract_part_file($mimemail, $filename); |
|
| 36 | - } |
|
| 37 | - if ($result === false) { |
|
| 38 | - throw MailparseException::createFromPhpError(); |
|
| 39 | - } |
|
| 40 | - return $result; |
|
| 31 | + error_clear_last(); |
|
| 32 | + if ($callbackfunc !== null) { |
|
| 33 | + $result = \mailparse_msg_extract_part_file($mimemail, $filename, $callbackfunc); |
|
| 34 | + } else { |
|
| 35 | + $result = \mailparse_msg_extract_part_file($mimemail, $filename); |
|
| 36 | + } |
|
| 37 | + if ($result === false) { |
|
| 38 | + throw MailparseException::createFromPhpError(); |
|
| 39 | + } |
|
| 40 | + return $result; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | |
@@ -52,11 +52,11 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | function mailparse_msg_free($mimemail): void |
| 54 | 54 | { |
| 55 | - error_clear_last(); |
|
| 56 | - $result = \mailparse_msg_free($mimemail); |
|
| 57 | - if ($result === false) { |
|
| 58 | - throw MailparseException::createFromPhpError(); |
|
| 59 | - } |
|
| 55 | + error_clear_last(); |
|
| 56 | + $result = \mailparse_msg_free($mimemail); |
|
| 57 | + if ($result === false) { |
|
| 58 | + throw MailparseException::createFromPhpError(); |
|
| 59 | + } |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | |
@@ -75,12 +75,12 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | function mailparse_msg_parse_file(string $filename) |
| 77 | 77 | { |
| 78 | - error_clear_last(); |
|
| 79 | - $result = \mailparse_msg_parse_file($filename); |
|
| 80 | - if ($result === false) { |
|
| 81 | - throw MailparseException::createFromPhpError(); |
|
| 82 | - } |
|
| 83 | - return $result; |
|
| 78 | + error_clear_last(); |
|
| 79 | + $result = \mailparse_msg_parse_file($filename); |
|
| 80 | + if ($result === false) { |
|
| 81 | + throw MailparseException::createFromPhpError(); |
|
| 82 | + } |
|
| 83 | + return $result; |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | |
@@ -98,11 +98,11 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | function mailparse_msg_parse($mimemail, string $data): void |
| 100 | 100 | { |
| 101 | - error_clear_last(); |
|
| 102 | - $result = \mailparse_msg_parse($mimemail, $data); |
|
| 103 | - if ($result === false) { |
|
| 104 | - throw MailparseException::createFromPhpError(); |
|
| 105 | - } |
|
| 101 | + error_clear_last(); |
|
| 102 | + $result = \mailparse_msg_parse($mimemail, $data); |
|
| 103 | + if ($result === false) { |
|
| 104 | + throw MailparseException::createFromPhpError(); |
|
| 105 | + } |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | |
@@ -119,9 +119,9 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | function mailparse_stream_encode($sourcefp, $destfp, string $encoding): void |
| 121 | 121 | { |
| 122 | - error_clear_last(); |
|
| 123 | - $result = \mailparse_stream_encode($sourcefp, $destfp, $encoding); |
|
| 124 | - if ($result === false) { |
|
| 125 | - throw MailparseException::createFromPhpError(); |
|
| 126 | - } |
|
| 122 | + error_clear_last(); |
|
| 123 | + $result = \mailparse_stream_encode($sourcefp, $destfp, $encoding); |
|
| 124 | + if ($result === false) { |
|
| 125 | + throw MailparseException::createFromPhpError(); |
|
| 126 | + } |
|
| 127 | 127 | } |