@@ -16,11 +16,11 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | function cubrid_free_result($req_identifier): void |
| 18 | 18 | { |
| 19 | - error_clear_last(); |
|
| 20 | - $result = \cubrid_free_result($req_identifier); |
|
| 21 | - if ($result === false) { |
|
| 22 | - throw CubridException::createFromPhpError(); |
|
| 23 | - } |
|
| 19 | + error_clear_last(); |
|
| 20 | + $result = \cubrid_free_result($req_identifier); |
|
| 21 | + if ($result === false) { |
|
| 22 | + throw CubridException::createFromPhpError(); |
|
| 23 | + } |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | |
@@ -38,12 +38,12 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | function cubrid_get_charset($conn_identifier): string |
| 40 | 40 | { |
| 41 | - error_clear_last(); |
|
| 42 | - $result = \cubrid_get_charset($conn_identifier); |
|
| 43 | - if ($result === false) { |
|
| 44 | - throw CubridException::createFromPhpError(); |
|
| 45 | - } |
|
| 46 | - return $result; |
|
| 41 | + error_clear_last(); |
|
| 42 | + $result = \cubrid_get_charset($conn_identifier); |
|
| 43 | + if ($result === false) { |
|
| 44 | + throw CubridException::createFromPhpError(); |
|
| 45 | + } |
|
| 46 | + return $result; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | |
@@ -58,12 +58,12 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | function cubrid_get_client_info(): string |
| 60 | 60 | { |
| 61 | - error_clear_last(); |
|
| 62 | - $result = \cubrid_get_client_info(); |
|
| 63 | - if ($result === false) { |
|
| 64 | - throw CubridException::createFromPhpError(); |
|
| 65 | - } |
|
| 66 | - return $result; |
|
| 61 | + error_clear_last(); |
|
| 62 | + $result = \cubrid_get_client_info(); |
|
| 63 | + if ($result === false) { |
|
| 64 | + throw CubridException::createFromPhpError(); |
|
| 65 | + } |
|
| 66 | + return $result; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | |
@@ -185,12 +185,12 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | function cubrid_get_db_parameter($conn_identifier): array |
| 187 | 187 | { |
| 188 | - error_clear_last(); |
|
| 189 | - $result = \cubrid_get_db_parameter($conn_identifier); |
|
| 190 | - if ($result === false) { |
|
| 191 | - throw CubridException::createFromPhpError(); |
|
| 192 | - } |
|
| 193 | - return $result; |
|
| 188 | + error_clear_last(); |
|
| 189 | + $result = \cubrid_get_db_parameter($conn_identifier); |
|
| 190 | + if ($result === false) { |
|
| 191 | + throw CubridException::createFromPhpError(); |
|
| 192 | + } |
|
| 193 | + return $result; |
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | |
@@ -206,12 +206,12 @@ discard block |
||
| 206 | 206 | */ |
| 207 | 207 | function cubrid_get_server_info($conn_identifier): string |
| 208 | 208 | { |
| 209 | - error_clear_last(); |
|
| 210 | - $result = \cubrid_get_server_info($conn_identifier); |
|
| 211 | - if ($result === false) { |
|
| 212 | - throw CubridException::createFromPhpError(); |
|
| 213 | - } |
|
| 214 | - return $result; |
|
| 209 | + error_clear_last(); |
|
| 210 | + $result = \cubrid_get_server_info($conn_identifier); |
|
| 211 | + if ($result === false) { |
|
| 212 | + throw CubridException::createFromPhpError(); |
|
| 213 | + } |
|
| 214 | + return $result; |
|
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | |
@@ -234,16 +234,16 @@ discard block |
||
| 234 | 234 | */ |
| 235 | 235 | function cubrid_insert_id($conn_identifier = null): string |
| 236 | 236 | { |
| 237 | - error_clear_last(); |
|
| 238 | - if ($conn_identifier !== null) { |
|
| 239 | - $result = \cubrid_insert_id($conn_identifier); |
|
| 240 | - } else { |
|
| 241 | - $result = \cubrid_insert_id(); |
|
| 242 | - } |
|
| 243 | - if ($result === false) { |
|
| 244 | - throw CubridException::createFromPhpError(); |
|
| 245 | - } |
|
| 246 | - return $result; |
|
| 237 | + error_clear_last(); |
|
| 238 | + if ($conn_identifier !== null) { |
|
| 239 | + $result = \cubrid_insert_id($conn_identifier); |
|
| 240 | + } else { |
|
| 241 | + $result = \cubrid_insert_id(); |
|
| 242 | + } |
|
| 243 | + if ($result === false) { |
|
| 244 | + throw CubridException::createFromPhpError(); |
|
| 245 | + } |
|
| 246 | + return $result; |
|
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 | |
@@ -263,18 +263,18 @@ discard block |
||
| 263 | 263 | */ |
| 264 | 264 | function cubrid_lob2_new($conn_identifier = null, string $type = "BLOB") |
| 265 | 265 | { |
| 266 | - error_clear_last(); |
|
| 267 | - if ($type !== "BLOB") { |
|
| 268 | - $result = \cubrid_lob2_new($conn_identifier, $type); |
|
| 269 | - } elseif ($conn_identifier !== null) { |
|
| 270 | - $result = \cubrid_lob2_new($conn_identifier); |
|
| 271 | - } else { |
|
| 272 | - $result = \cubrid_lob2_new(); |
|
| 273 | - } |
|
| 274 | - if ($result === false) { |
|
| 275 | - throw CubridException::createFromPhpError(); |
|
| 276 | - } |
|
| 277 | - return $result; |
|
| 266 | + error_clear_last(); |
|
| 267 | + if ($type !== "BLOB") { |
|
| 268 | + $result = \cubrid_lob2_new($conn_identifier, $type); |
|
| 269 | + } elseif ($conn_identifier !== null) { |
|
| 270 | + $result = \cubrid_lob2_new($conn_identifier); |
|
| 271 | + } else { |
|
| 272 | + $result = \cubrid_lob2_new(); |
|
| 273 | + } |
|
| 274 | + if ($result === false) { |
|
| 275 | + throw CubridException::createFromPhpError(); |
|
| 276 | + } |
|
| 277 | + return $result; |
|
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | |
@@ -290,12 +290,12 @@ discard block |
||
| 290 | 290 | */ |
| 291 | 291 | function cubrid_lob2_size($lob_identifier): int |
| 292 | 292 | { |
| 293 | - error_clear_last(); |
|
| 294 | - $result = \cubrid_lob2_size($lob_identifier); |
|
| 295 | - if ($result === false) { |
|
| 296 | - throw CubridException::createFromPhpError(); |
|
| 297 | - } |
|
| 298 | - return $result; |
|
| 293 | + error_clear_last(); |
|
| 294 | + $result = \cubrid_lob2_size($lob_identifier); |
|
| 295 | + if ($result === false) { |
|
| 296 | + throw CubridException::createFromPhpError(); |
|
| 297 | + } |
|
| 298 | + return $result; |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | |
@@ -314,12 +314,12 @@ discard block |
||
| 314 | 314 | */ |
| 315 | 315 | function cubrid_lob2_size64($lob_identifier): string |
| 316 | 316 | { |
| 317 | - error_clear_last(); |
|
| 318 | - $result = \cubrid_lob2_size64($lob_identifier); |
|
| 319 | - if ($result === false) { |
|
| 320 | - throw CubridException::createFromPhpError(); |
|
| 321 | - } |
|
| 322 | - return $result; |
|
| 317 | + error_clear_last(); |
|
| 318 | + $result = \cubrid_lob2_size64($lob_identifier); |
|
| 319 | + if ($result === false) { |
|
| 320 | + throw CubridException::createFromPhpError(); |
|
| 321 | + } |
|
| 322 | + return $result; |
|
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | |
@@ -335,12 +335,12 @@ discard block |
||
| 335 | 335 | */ |
| 336 | 336 | function cubrid_lob2_tell($lob_identifier): int |
| 337 | 337 | { |
| 338 | - error_clear_last(); |
|
| 339 | - $result = \cubrid_lob2_tell($lob_identifier); |
|
| 340 | - if ($result === false) { |
|
| 341 | - throw CubridException::createFromPhpError(); |
|
| 342 | - } |
|
| 343 | - return $result; |
|
| 338 | + error_clear_last(); |
|
| 339 | + $result = \cubrid_lob2_tell($lob_identifier); |
|
| 340 | + if ($result === false) { |
|
| 341 | + throw CubridException::createFromPhpError(); |
|
| 342 | + } |
|
| 343 | + return $result; |
|
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | |
@@ -359,12 +359,12 @@ discard block |
||
| 359 | 359 | */ |
| 360 | 360 | function cubrid_lob2_tell64($lob_identifier): string |
| 361 | 361 | { |
| 362 | - error_clear_last(); |
|
| 363 | - $result = \cubrid_lob2_tell64($lob_identifier); |
|
| 364 | - if ($result === false) { |
|
| 365 | - throw CubridException::createFromPhpError(); |
|
| 366 | - } |
|
| 367 | - return $result; |
|
| 362 | + error_clear_last(); |
|
| 363 | + $result = \cubrid_lob2_tell64($lob_identifier); |
|
| 364 | + if ($result === false) { |
|
| 365 | + throw CubridException::createFromPhpError(); |
|
| 366 | + } |
|
| 367 | + return $result; |
|
| 368 | 368 | } |
| 369 | 369 | |
| 370 | 370 | |
@@ -387,9 +387,9 @@ discard block |
||
| 387 | 387 | */ |
| 388 | 388 | function cubrid_set_db_parameter($conn_identifier, int $param_type, int $param_value): void |
| 389 | 389 | { |
| 390 | - error_clear_last(); |
|
| 391 | - $result = \cubrid_set_db_parameter($conn_identifier, $param_type, $param_value); |
|
| 392 | - if ($result === false) { |
|
| 393 | - throw CubridException::createFromPhpError(); |
|
| 394 | - } |
|
| 390 | + error_clear_last(); |
|
| 391 | + $result = \cubrid_set_db_parameter($conn_identifier, $param_type, $param_value); |
|
| 392 | + if ($result === false) { |
|
| 393 | + throw CubridException::createFromPhpError(); |
|
| 394 | + } |
|
| 395 | 395 | } |
@@ -20,12 +20,12 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | function simplexml_import_dom(\DOMNode $node, string $class_name = "SimpleXMLElement"): \SimpleXMLElement |
| 22 | 22 | { |
| 23 | - error_clear_last(); |
|
| 24 | - $result = \simplexml_import_dom($node, $class_name); |
|
| 25 | - if ($result === false) { |
|
| 26 | - throw SimplexmlException::createFromPhpError(); |
|
| 27 | - } |
|
| 28 | - return $result; |
|
| 23 | + error_clear_last(); |
|
| 24 | + $result = \simplexml_import_dom($node, $class_name); |
|
| 25 | + if ($result === false) { |
|
| 26 | + throw SimplexmlException::createFromPhpError(); |
|
| 27 | + } |
|
| 28 | + return $result; |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | |
@@ -56,12 +56,12 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | function simplexml_load_file(string $filename, string $class_name = "SimpleXMLElement", int $options = 0, string $ns = "", bool $is_prefix = false): \SimpleXMLElement |
| 58 | 58 | { |
| 59 | - error_clear_last(); |
|
| 60 | - $result = \simplexml_load_file($filename, $class_name, $options, $ns, $is_prefix); |
|
| 61 | - if ($result === false) { |
|
| 62 | - throw SimplexmlException::createFromPhpError(); |
|
| 63 | - } |
|
| 64 | - return $result; |
|
| 59 | + error_clear_last(); |
|
| 60 | + $result = \simplexml_load_file($filename, $class_name, $options, $ns, $is_prefix); |
|
| 61 | + if ($result === false) { |
|
| 62 | + throw SimplexmlException::createFromPhpError(); |
|
| 63 | + } |
|
| 64 | + return $result; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | |
@@ -85,10 +85,10 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | function simplexml_load_string(string $data, string $class_name = "SimpleXMLElement", int $options = 0, string $ns = "", bool $is_prefix = false): \SimpleXMLElement |
| 87 | 87 | { |
| 88 | - error_clear_last(); |
|
| 89 | - $result = \simplexml_load_string($data, $class_name, $options, $ns, $is_prefix); |
|
| 90 | - if ($result === false) { |
|
| 91 | - throw SimplexmlException::createFromPhpError(); |
|
| 92 | - } |
|
| 93 | - return $result; |
|
| 88 | + error_clear_last(); |
|
| 89 | + $result = \simplexml_load_string($data, $class_name, $options, $ns, $is_prefix); |
|
| 90 | + if ($result === false) { |
|
| 91 | + throw SimplexmlException::createFromPhpError(); |
|
| 92 | + } |
|
| 93 | + return $result; |
|
| 94 | 94 | } |
@@ -14,9 +14,9 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | function xmlrpc_set_type(&$value, string $type): void |
| 16 | 16 | { |
| 17 | - error_clear_last(); |
|
| 18 | - $result = \xmlrpc_set_type($value, $type); |
|
| 19 | - if ($result === false) { |
|
| 20 | - throw XmlrpcException::createFromPhpError(); |
|
| 21 | - } |
|
| 17 | + error_clear_last(); |
|
| 18 | + $result = \xmlrpc_set_type($value, $type); |
|
| 19 | + if ($result === false) { |
|
| 20 | + throw XmlrpcException::createFromPhpError(); |
|
| 21 | + } |
|
| 22 | 22 | } |
@@ -48,16 +48,16 @@ discard block |
||
| 48 | 48 | */ |
| 49 | 49 | function db2_autocommit($connection, int $value = null) |
| 50 | 50 | { |
| 51 | - error_clear_last(); |
|
| 52 | - if ($value !== null) { |
|
| 53 | - $result = \db2_autocommit($connection, $value); |
|
| 54 | - } else { |
|
| 55 | - $result = \db2_autocommit($connection); |
|
| 56 | - } |
|
| 57 | - if ($result === false) { |
|
| 58 | - throw IbmDb2Exception::createFromPhpError(); |
|
| 59 | - } |
|
| 60 | - return $result; |
|
| 51 | + error_clear_last(); |
|
| 52 | + if ($value !== null) { |
|
| 53 | + $result = \db2_autocommit($connection, $value); |
|
| 54 | + } else { |
|
| 55 | + $result = \db2_autocommit($connection); |
|
| 56 | + } |
|
| 57 | + if ($result === false) { |
|
| 58 | + throw IbmDb2Exception::createFromPhpError(); |
|
| 59 | + } |
|
| 60 | + return $result; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | |
@@ -98,21 +98,21 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | function db2_bind_param($stmt, int $parameter_number, string $variable_name, int $parameter_type = null, int $data_type = 0, int $precision = -1, int $scale = 0): void |
| 100 | 100 | { |
| 101 | - error_clear_last(); |
|
| 102 | - if ($scale !== 0) { |
|
| 103 | - $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type, $precision, $scale); |
|
| 104 | - } elseif ($precision !== -1) { |
|
| 105 | - $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type, $precision); |
|
| 106 | - } elseif ($data_type !== 0) { |
|
| 107 | - $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type); |
|
| 108 | - } elseif ($parameter_type !== null) { |
|
| 109 | - $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type); |
|
| 110 | - } else { |
|
| 111 | - $result = \db2_bind_param($stmt, $parameter_number, $variable_name); |
|
| 112 | - } |
|
| 113 | - if ($result === false) { |
|
| 114 | - throw IbmDb2Exception::createFromPhpError(); |
|
| 115 | - } |
|
| 101 | + error_clear_last(); |
|
| 102 | + if ($scale !== 0) { |
|
| 103 | + $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type, $precision, $scale); |
|
| 104 | + } elseif ($precision !== -1) { |
|
| 105 | + $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type, $precision); |
|
| 106 | + } elseif ($data_type !== 0) { |
|
| 107 | + $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type); |
|
| 108 | + } elseif ($parameter_type !== null) { |
|
| 109 | + $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type); |
|
| 110 | + } else { |
|
| 111 | + $result = \db2_bind_param($stmt, $parameter_number, $variable_name); |
|
| 112 | + } |
|
| 113 | + if ($result === false) { |
|
| 114 | + throw IbmDb2Exception::createFromPhpError(); |
|
| 115 | + } |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | |
@@ -227,12 +227,12 @@ discard block |
||
| 227 | 227 | */ |
| 228 | 228 | function db2_client_info($connection): object |
| 229 | 229 | { |
| 230 | - error_clear_last(); |
|
| 231 | - $result = \db2_client_info($connection); |
|
| 232 | - if ($result === false) { |
|
| 233 | - throw IbmDb2Exception::createFromPhpError(); |
|
| 234 | - } |
|
| 235 | - return $result; |
|
| 230 | + error_clear_last(); |
|
| 231 | + $result = \db2_client_info($connection); |
|
| 232 | + if ($result === false) { |
|
| 233 | + throw IbmDb2Exception::createFromPhpError(); |
|
| 234 | + } |
|
| 235 | + return $result; |
|
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | |
@@ -251,11 +251,11 @@ discard block |
||
| 251 | 251 | */ |
| 252 | 252 | function db2_close($connection): void |
| 253 | 253 | { |
| 254 | - error_clear_last(); |
|
| 255 | - $result = \db2_close($connection); |
|
| 256 | - if ($result === false) { |
|
| 257 | - throw IbmDb2Exception::createFromPhpError(); |
|
| 258 | - } |
|
| 254 | + error_clear_last(); |
|
| 255 | + $result = \db2_close($connection); |
|
| 256 | + if ($result === false) { |
|
| 257 | + throw IbmDb2Exception::createFromPhpError(); |
|
| 258 | + } |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | |
@@ -272,11 +272,11 @@ discard block |
||
| 272 | 272 | */ |
| 273 | 273 | function db2_commit($connection): void |
| 274 | 274 | { |
| 275 | - error_clear_last(); |
|
| 276 | - $result = \db2_commit($connection); |
|
| 277 | - if ($result === false) { |
|
| 278 | - throw IbmDb2Exception::createFromPhpError(); |
|
| 279 | - } |
|
| 275 | + error_clear_last(); |
|
| 276 | + $result = \db2_commit($connection); |
|
| 277 | + if ($result === false) { |
|
| 278 | + throw IbmDb2Exception::createFromPhpError(); |
|
| 279 | + } |
|
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | |
@@ -306,15 +306,15 @@ discard block |
||
| 306 | 306 | */ |
| 307 | 307 | function db2_execute($stmt, array $parameters = null): void |
| 308 | 308 | { |
| 309 | - error_clear_last(); |
|
| 310 | - if ($parameters !== null) { |
|
| 311 | - $result = \db2_execute($stmt, $parameters); |
|
| 312 | - } else { |
|
| 313 | - $result = \db2_execute($stmt); |
|
| 314 | - } |
|
| 315 | - if ($result === false) { |
|
| 316 | - throw IbmDb2Exception::createFromPhpError(); |
|
| 317 | - } |
|
| 309 | + error_clear_last(); |
|
| 310 | + if ($parameters !== null) { |
|
| 311 | + $result = \db2_execute($stmt, $parameters); |
|
| 312 | + } else { |
|
| 313 | + $result = \db2_execute($stmt); |
|
| 314 | + } |
|
| 315 | + if ($result === false) { |
|
| 316 | + throw IbmDb2Exception::createFromPhpError(); |
|
| 317 | + } |
|
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | |
@@ -330,11 +330,11 @@ discard block |
||
| 330 | 330 | */ |
| 331 | 331 | function db2_free_result($stmt): void |
| 332 | 332 | { |
| 333 | - error_clear_last(); |
|
| 334 | - $result = \db2_free_result($stmt); |
|
| 335 | - if ($result === false) { |
|
| 336 | - throw IbmDb2Exception::createFromPhpError(); |
|
| 337 | - } |
|
| 333 | + error_clear_last(); |
|
| 334 | + $result = \db2_free_result($stmt); |
|
| 335 | + if ($result === false) { |
|
| 336 | + throw IbmDb2Exception::createFromPhpError(); |
|
| 337 | + } |
|
| 338 | 338 | } |
| 339 | 339 | |
| 340 | 340 | |
@@ -350,11 +350,11 @@ discard block |
||
| 350 | 350 | */ |
| 351 | 351 | function db2_free_stmt($stmt): void |
| 352 | 352 | { |
| 353 | - error_clear_last(); |
|
| 354 | - $result = \db2_free_stmt($stmt); |
|
| 355 | - if ($result === false) { |
|
| 356 | - throw IbmDb2Exception::createFromPhpError(); |
|
| 357 | - } |
|
| 353 | + error_clear_last(); |
|
| 354 | + $result = \db2_free_stmt($stmt); |
|
| 355 | + if ($result === false) { |
|
| 356 | + throw IbmDb2Exception::createFromPhpError(); |
|
| 357 | + } |
|
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | |
@@ -510,12 +510,12 @@ discard block |
||
| 510 | 510 | */ |
| 511 | 511 | function db2_get_option($resource, string $option): string |
| 512 | 512 | { |
| 513 | - error_clear_last(); |
|
| 514 | - $result = \db2_get_option($resource, $option); |
|
| 515 | - if ($result === false) { |
|
| 516 | - throw IbmDb2Exception::createFromPhpError(); |
|
| 517 | - } |
|
| 518 | - return $result; |
|
| 513 | + error_clear_last(); |
|
| 514 | + $result = \db2_get_option($resource, $option); |
|
| 515 | + if ($result === false) { |
|
| 516 | + throw IbmDb2Exception::createFromPhpError(); |
|
| 517 | + } |
|
| 518 | + return $result; |
|
| 519 | 519 | } |
| 520 | 520 | |
| 521 | 521 | |
@@ -543,11 +543,11 @@ discard block |
||
| 543 | 543 | */ |
| 544 | 544 | function db2_pclose($resource): void |
| 545 | 545 | { |
| 546 | - error_clear_last(); |
|
| 547 | - $result = \db2_pclose($resource); |
|
| 548 | - if ($result === false) { |
|
| 549 | - throw IbmDb2Exception::createFromPhpError(); |
|
| 550 | - } |
|
| 546 | + error_clear_last(); |
|
| 547 | + $result = \db2_pclose($resource); |
|
| 548 | + if ($result === false) { |
|
| 549 | + throw IbmDb2Exception::createFromPhpError(); |
|
| 550 | + } |
|
| 551 | 551 | } |
| 552 | 552 | |
| 553 | 553 | |
@@ -564,11 +564,11 @@ discard block |
||
| 564 | 564 | */ |
| 565 | 565 | function db2_rollback($connection): void |
| 566 | 566 | { |
| 567 | - error_clear_last(); |
|
| 568 | - $result = \db2_rollback($connection); |
|
| 569 | - if ($result === false) { |
|
| 570 | - throw IbmDb2Exception::createFromPhpError(); |
|
| 571 | - } |
|
| 567 | + error_clear_last(); |
|
| 568 | + $result = \db2_rollback($connection); |
|
| 569 | + if ($result === false) { |
|
| 570 | + throw IbmDb2Exception::createFromPhpError(); |
|
| 571 | + } |
|
| 572 | 572 | } |
| 573 | 573 | |
| 574 | 574 | |
@@ -825,12 +825,12 @@ discard block |
||
| 825 | 825 | */ |
| 826 | 826 | function db2_server_info($connection): object |
| 827 | 827 | { |
| 828 | - error_clear_last(); |
|
| 829 | - $result = \db2_server_info($connection); |
|
| 830 | - if ($result === false) { |
|
| 831 | - throw IbmDb2Exception::createFromPhpError(); |
|
| 832 | - } |
|
| 833 | - return $result; |
|
| 828 | + error_clear_last(); |
|
| 829 | + $result = \db2_server_info($connection); |
|
| 830 | + if ($result === false) { |
|
| 831 | + throw IbmDb2Exception::createFromPhpError(); |
|
| 832 | + } |
|
| 833 | + return $result; |
|
| 834 | 834 | } |
| 835 | 835 | |
| 836 | 836 | |
@@ -1213,9 +1213,9 @@ discard block |
||
| 1213 | 1213 | */ |
| 1214 | 1214 | function db2_set_option($resource, array $options, int $type): void |
| 1215 | 1215 | { |
| 1216 | - error_clear_last(); |
|
| 1217 | - $result = \db2_set_option($resource, $options, $type); |
|
| 1218 | - if ($result === false) { |
|
| 1219 | - throw IbmDb2Exception::createFromPhpError(); |
|
| 1220 | - } |
|
| 1216 | + error_clear_last(); |
|
| 1217 | + $result = \db2_set_option($resource, $options, $type); |
|
| 1218 | + if ($result === false) { |
|
| 1219 | + throw IbmDb2Exception::createFromPhpError(); |
|
| 1220 | + } |
|
| 1221 | 1221 | } |
@@ -21,12 +21,12 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | function sodium_crypto_pwhash_str(string $password, int $opslimit, int $memlimit): string |
| 23 | 23 | { |
| 24 | - error_clear_last(); |
|
| 25 | - $result = \sodium_crypto_pwhash_str($password, $opslimit, $memlimit); |
|
| 26 | - if ($result === false) { |
|
| 27 | - throw SodiumException::createFromPhpError(); |
|
| 28 | - } |
|
| 29 | - return $result; |
|
| 24 | + error_clear_last(); |
|
| 25 | + $result = \sodium_crypto_pwhash_str($password, $opslimit, $memlimit); |
|
| 26 | + if ($result === false) { |
|
| 27 | + throw SodiumException::createFromPhpError(); |
|
| 28 | + } |
|
| 29 | + return $result; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | |
@@ -45,14 +45,14 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | function sodium_crypto_pwhash(int $length, string $password, string $salt, int $opslimit, int $memlimit, int $alg = null): string |
| 47 | 47 | { |
| 48 | - error_clear_last(); |
|
| 49 | - if ($alg !== null) { |
|
| 50 | - $result = \sodium_crypto_pwhash($length, $password, $salt, $opslimit, $memlimit, $alg); |
|
| 51 | - } else { |
|
| 52 | - $result = \sodium_crypto_pwhash($length, $password, $salt, $opslimit, $memlimit); |
|
| 53 | - } |
|
| 54 | - if ($result === false) { |
|
| 55 | - throw SodiumException::createFromPhpError(); |
|
| 56 | - } |
|
| 57 | - return $result; |
|
| 48 | + error_clear_last(); |
|
| 49 | + if ($alg !== null) { |
|
| 50 | + $result = \sodium_crypto_pwhash($length, $password, $salt, $opslimit, $memlimit, $alg); |
|
| 51 | + } else { |
|
| 52 | + $result = \sodium_crypto_pwhash($length, $password, $salt, $opslimit, $memlimit); |
|
| 53 | + } |
|
| 54 | + if ($result === false) { |
|
| 55 | + throw SodiumException::createFromPhpError(); |
|
| 56 | + } |
|
| 57 | + return $result; |
|
| 58 | 58 | } |
@@ -14,11 +14,11 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | function uopz_extend(string $class, string $parent): void |
| 16 | 16 | { |
| 17 | - error_clear_last(); |
|
| 18 | - $result = \uopz_extend($class, $parent); |
|
| 19 | - if ($result === false) { |
|
| 20 | - throw UopzException::createFromPhpError(); |
|
| 21 | - } |
|
| 17 | + error_clear_last(); |
|
| 18 | + $result = \uopz_extend($class, $parent); |
|
| 19 | + if ($result === false) { |
|
| 20 | + throw UopzException::createFromPhpError(); |
|
| 21 | + } |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | |
@@ -32,9 +32,9 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | function uopz_implement(string $class, string $interface): void |
| 34 | 34 | { |
| 35 | - error_clear_last(); |
|
| 36 | - $result = \uopz_implement($class, $interface); |
|
| 37 | - if ($result === false) { |
|
| 38 | - throw UopzException::createFromPhpError(); |
|
| 39 | - } |
|
| 35 | + error_clear_last(); |
|
| 36 | + $result = \uopz_implement($class, $interface); |
|
| 37 | + if ($result === false) { |
|
| 38 | + throw UopzException::createFromPhpError(); |
|
| 39 | + } |
|
| 40 | 40 | } |
@@ -14,11 +14,11 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | function shmop_delete($shmid): void |
| 16 | 16 | { |
| 17 | - error_clear_last(); |
|
| 18 | - $result = \shmop_delete($shmid); |
|
| 19 | - if ($result === false) { |
|
| 20 | - throw ShmopException::createFromPhpError(); |
|
| 21 | - } |
|
| 17 | + error_clear_last(); |
|
| 18 | + $result = \shmop_delete($shmid); |
|
| 19 | + if ($result === false) { |
|
| 20 | + throw ShmopException::createFromPhpError(); |
|
| 21 | + } |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | |
@@ -36,12 +36,12 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | function shmop_read($shmid, int $start, int $count): string |
| 38 | 38 | { |
| 39 | - error_clear_last(); |
|
| 40 | - $result = \shmop_read($shmid, $start, $count); |
|
| 41 | - if ($result === false) { |
|
| 42 | - throw ShmopException::createFromPhpError(); |
|
| 43 | - } |
|
| 44 | - return $result; |
|
| 39 | + error_clear_last(); |
|
| 40 | + $result = \shmop_read($shmid, $start, $count); |
|
| 41 | + if ($result === false) { |
|
| 42 | + throw ShmopException::createFromPhpError(); |
|
| 43 | + } |
|
| 44 | + return $result; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | |
@@ -59,10 +59,10 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | function shmop_write($shmid, string $data, int $offset): int |
| 61 | 61 | { |
| 62 | - error_clear_last(); |
|
| 63 | - $result = \shmop_write($shmid, $data, $offset); |
|
| 64 | - if ($result === false) { |
|
| 65 | - throw ShmopException::createFromPhpError(); |
|
| 66 | - } |
|
| 67 | - return $result; |
|
| 62 | + error_clear_last(); |
|
| 63 | + $result = \shmop_write($shmid, $data, $offset); |
|
| 64 | + if ($result === false) { |
|
| 65 | + throw ShmopException::createFromPhpError(); |
|
| 66 | + } |
|
| 67 | + return $result; |
|
| 68 | 68 | } |
@@ -14,11 +14,11 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | function pspell_add_to_personal(int $dictionary_link, string $word): void |
| 16 | 16 | { |
| 17 | - error_clear_last(); |
|
| 18 | - $result = \pspell_add_to_personal($dictionary_link, $word); |
|
| 19 | - if ($result === false) { |
|
| 20 | - throw PspellException::createFromPhpError(); |
|
| 21 | - } |
|
| 17 | + error_clear_last(); |
|
| 18 | + $result = \pspell_add_to_personal($dictionary_link, $word); |
|
| 19 | + if ($result === false) { |
|
| 20 | + throw PspellException::createFromPhpError(); |
|
| 21 | + } |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | |
@@ -32,11 +32,11 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | function pspell_add_to_session(int $dictionary_link, string $word): void |
| 34 | 34 | { |
| 35 | - error_clear_last(); |
|
| 36 | - $result = \pspell_add_to_session($dictionary_link, $word); |
|
| 37 | - if ($result === false) { |
|
| 38 | - throw PspellException::createFromPhpError(); |
|
| 39 | - } |
|
| 35 | + error_clear_last(); |
|
| 36 | + $result = \pspell_add_to_session($dictionary_link, $word); |
|
| 37 | + if ($result === false) { |
|
| 38 | + throw PspellException::createFromPhpError(); |
|
| 39 | + } |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | |
@@ -49,11 +49,11 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | function pspell_clear_session(int $dictionary_link): void |
| 51 | 51 | { |
| 52 | - error_clear_last(); |
|
| 53 | - $result = \pspell_clear_session($dictionary_link); |
|
| 54 | - if ($result === false) { |
|
| 55 | - throw PspellException::createFromPhpError(); |
|
| 56 | - } |
|
| 52 | + error_clear_last(); |
|
| 53 | + $result = \pspell_clear_session($dictionary_link); |
|
| 54 | + if ($result === false) { |
|
| 55 | + throw PspellException::createFromPhpError(); |
|
| 56 | + } |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | |
@@ -92,20 +92,20 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | function pspell_config_create(string $language, string $spelling = null, string $jargon = null, string $encoding = null): int |
| 94 | 94 | { |
| 95 | - error_clear_last(); |
|
| 96 | - if ($encoding !== null) { |
|
| 97 | - $result = \pspell_config_create($language, $spelling, $jargon, $encoding); |
|
| 98 | - } elseif ($jargon !== null) { |
|
| 99 | - $result = \pspell_config_create($language, $spelling, $jargon); |
|
| 100 | - } elseif ($spelling !== null) { |
|
| 101 | - $result = \pspell_config_create($language, $spelling); |
|
| 102 | - } else { |
|
| 103 | - $result = \pspell_config_create($language); |
|
| 104 | - } |
|
| 105 | - if ($result === false) { |
|
| 106 | - throw PspellException::createFromPhpError(); |
|
| 107 | - } |
|
| 108 | - return $result; |
|
| 95 | + error_clear_last(); |
|
| 96 | + if ($encoding !== null) { |
|
| 97 | + $result = \pspell_config_create($language, $spelling, $jargon, $encoding); |
|
| 98 | + } elseif ($jargon !== null) { |
|
| 99 | + $result = \pspell_config_create($language, $spelling, $jargon); |
|
| 100 | + } elseif ($spelling !== null) { |
|
| 101 | + $result = \pspell_config_create($language, $spelling); |
|
| 102 | + } else { |
|
| 103 | + $result = \pspell_config_create($language); |
|
| 104 | + } |
|
| 105 | + if ($result === false) { |
|
| 106 | + throw PspellException::createFromPhpError(); |
|
| 107 | + } |
|
| 108 | + return $result; |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | |
@@ -121,11 +121,11 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | function pspell_config_data_dir(int $conf, string $directory): void |
| 123 | 123 | { |
| 124 | - error_clear_last(); |
|
| 125 | - $result = \pspell_config_data_dir($conf, $directory); |
|
| 126 | - if ($result === false) { |
|
| 127 | - throw PspellException::createFromPhpError(); |
|
| 128 | - } |
|
| 124 | + error_clear_last(); |
|
| 125 | + $result = \pspell_config_data_dir($conf, $directory); |
|
| 126 | + if ($result === false) { |
|
| 127 | + throw PspellException::createFromPhpError(); |
|
| 128 | + } |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | |
@@ -141,11 +141,11 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | function pspell_config_dict_dir(int $conf, string $directory): void |
| 143 | 143 | { |
| 144 | - error_clear_last(); |
|
| 145 | - $result = \pspell_config_dict_dir($conf, $directory); |
|
| 146 | - if ($result === false) { |
|
| 147 | - throw PspellException::createFromPhpError(); |
|
| 148 | - } |
|
| 144 | + error_clear_last(); |
|
| 145 | + $result = \pspell_config_dict_dir($conf, $directory); |
|
| 146 | + if ($result === false) { |
|
| 147 | + throw PspellException::createFromPhpError(); |
|
| 148 | + } |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | |
@@ -159,11 +159,11 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | function pspell_config_ignore(int $dictionary_link, int $n): void |
| 161 | 161 | { |
| 162 | - error_clear_last(); |
|
| 163 | - $result = \pspell_config_ignore($dictionary_link, $n); |
|
| 164 | - if ($result === false) { |
|
| 165 | - throw PspellException::createFromPhpError(); |
|
| 166 | - } |
|
| 162 | + error_clear_last(); |
|
| 163 | + $result = \pspell_config_ignore($dictionary_link, $n); |
|
| 164 | + if ($result === false) { |
|
| 165 | + throw PspellException::createFromPhpError(); |
|
| 166 | + } |
|
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | |
@@ -197,11 +197,11 @@ discard block |
||
| 197 | 197 | */ |
| 198 | 198 | function pspell_config_mode(int $dictionary_link, int $mode): void |
| 199 | 199 | { |
| 200 | - error_clear_last(); |
|
| 201 | - $result = \pspell_config_mode($dictionary_link, $mode); |
|
| 202 | - if ($result === false) { |
|
| 203 | - throw PspellException::createFromPhpError(); |
|
| 204 | - } |
|
| 200 | + error_clear_last(); |
|
| 201 | + $result = \pspell_config_mode($dictionary_link, $mode); |
|
| 202 | + if ($result === false) { |
|
| 203 | + throw PspellException::createFromPhpError(); |
|
| 204 | + } |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | |
@@ -222,11 +222,11 @@ discard block |
||
| 222 | 222 | */ |
| 223 | 223 | function pspell_config_personal(int $dictionary_link, string $file): void |
| 224 | 224 | { |
| 225 | - error_clear_last(); |
|
| 226 | - $result = \pspell_config_personal($dictionary_link, $file); |
|
| 227 | - if ($result === false) { |
|
| 228 | - throw PspellException::createFromPhpError(); |
|
| 229 | - } |
|
| 225 | + error_clear_last(); |
|
| 226 | + $result = \pspell_config_personal($dictionary_link, $file); |
|
| 227 | + if ($result === false) { |
|
| 228 | + throw PspellException::createFromPhpError(); |
|
| 229 | + } |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | |
@@ -249,11 +249,11 @@ discard block |
||
| 249 | 249 | */ |
| 250 | 250 | function pspell_config_repl(int $dictionary_link, string $file): void |
| 251 | 251 | { |
| 252 | - error_clear_last(); |
|
| 253 | - $result = \pspell_config_repl($dictionary_link, $file); |
|
| 254 | - if ($result === false) { |
|
| 255 | - throw PspellException::createFromPhpError(); |
|
| 256 | - } |
|
| 252 | + error_clear_last(); |
|
| 253 | + $result = \pspell_config_repl($dictionary_link, $file); |
|
| 254 | + if ($result === false) { |
|
| 255 | + throw PspellException::createFromPhpError(); |
|
| 256 | + } |
|
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | |
@@ -275,11 +275,11 @@ discard block |
||
| 275 | 275 | */ |
| 276 | 276 | function pspell_config_runtogether(int $dictionary_link, bool $flag): void |
| 277 | 277 | { |
| 278 | - error_clear_last(); |
|
| 279 | - $result = \pspell_config_runtogether($dictionary_link, $flag); |
|
| 280 | - if ($result === false) { |
|
| 281 | - throw PspellException::createFromPhpError(); |
|
| 282 | - } |
|
| 278 | + error_clear_last(); |
|
| 279 | + $result = \pspell_config_runtogether($dictionary_link, $flag); |
|
| 280 | + if ($result === false) { |
|
| 281 | + throw PspellException::createFromPhpError(); |
|
| 282 | + } |
|
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | |
@@ -302,11 +302,11 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | function pspell_config_save_repl(int $dictionary_link, bool $flag): void |
| 304 | 304 | { |
| 305 | - error_clear_last(); |
|
| 306 | - $result = \pspell_config_save_repl($dictionary_link, $flag); |
|
| 307 | - if ($result === false) { |
|
| 308 | - throw PspellException::createFromPhpError(); |
|
| 309 | - } |
|
| 305 | + error_clear_last(); |
|
| 306 | + $result = \pspell_config_save_repl($dictionary_link, $flag); |
|
| 307 | + if ($result === false) { |
|
| 308 | + throw PspellException::createFromPhpError(); |
|
| 309 | + } |
|
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | |
@@ -321,12 +321,12 @@ discard block |
||
| 321 | 321 | */ |
| 322 | 322 | function pspell_new_config(int $config): int |
| 323 | 323 | { |
| 324 | - error_clear_last(); |
|
| 325 | - $result = \pspell_new_config($config); |
|
| 326 | - if ($result === false) { |
|
| 327 | - throw PspellException::createFromPhpError(); |
|
| 328 | - } |
|
| 329 | - return $result; |
|
| 324 | + error_clear_last(); |
|
| 325 | + $result = \pspell_new_config($config); |
|
| 326 | + if ($result === false) { |
|
| 327 | + throw PspellException::createFromPhpError(); |
|
| 328 | + } |
|
| 329 | + return $result; |
|
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | |
@@ -394,22 +394,22 @@ discard block |
||
| 394 | 394 | */ |
| 395 | 395 | function pspell_new(string $language, string $spelling = null, string $jargon = null, string $encoding = null, int $mode = 0): int |
| 396 | 396 | { |
| 397 | - error_clear_last(); |
|
| 398 | - if ($mode !== 0) { |
|
| 399 | - $result = \pspell_new($language, $spelling, $jargon, $encoding, $mode); |
|
| 400 | - } elseif ($encoding !== null) { |
|
| 401 | - $result = \pspell_new($language, $spelling, $jargon, $encoding); |
|
| 402 | - } elseif ($jargon !== null) { |
|
| 403 | - $result = \pspell_new($language, $spelling, $jargon); |
|
| 404 | - } elseif ($spelling !== null) { |
|
| 405 | - $result = \pspell_new($language, $spelling); |
|
| 406 | - } else { |
|
| 407 | - $result = \pspell_new($language); |
|
| 408 | - } |
|
| 409 | - if ($result === false) { |
|
| 410 | - throw PspellException::createFromPhpError(); |
|
| 411 | - } |
|
| 412 | - return $result; |
|
| 397 | + error_clear_last(); |
|
| 398 | + if ($mode !== 0) { |
|
| 399 | + $result = \pspell_new($language, $spelling, $jargon, $encoding, $mode); |
|
| 400 | + } elseif ($encoding !== null) { |
|
| 401 | + $result = \pspell_new($language, $spelling, $jargon, $encoding); |
|
| 402 | + } elseif ($jargon !== null) { |
|
| 403 | + $result = \pspell_new($language, $spelling, $jargon); |
|
| 404 | + } elseif ($spelling !== null) { |
|
| 405 | + $result = \pspell_new($language, $spelling); |
|
| 406 | + } else { |
|
| 407 | + $result = \pspell_new($language); |
|
| 408 | + } |
|
| 409 | + if ($result === false) { |
|
| 410 | + throw PspellException::createFromPhpError(); |
|
| 411 | + } |
|
| 412 | + return $result; |
|
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | |
@@ -423,11 +423,11 @@ discard block |
||
| 423 | 423 | */ |
| 424 | 424 | function pspell_save_wordlist(int $dictionary_link): void |
| 425 | 425 | { |
| 426 | - error_clear_last(); |
|
| 427 | - $result = \pspell_save_wordlist($dictionary_link); |
|
| 428 | - if ($result === false) { |
|
| 429 | - throw PspellException::createFromPhpError(); |
|
| 430 | - } |
|
| 426 | + error_clear_last(); |
|
| 427 | + $result = \pspell_save_wordlist($dictionary_link); |
|
| 428 | + if ($result === false) { |
|
| 429 | + throw PspellException::createFromPhpError(); |
|
| 430 | + } |
|
| 431 | 431 | } |
| 432 | 432 | |
| 433 | 433 | |
@@ -443,9 +443,9 @@ discard block |
||
| 443 | 443 | */ |
| 444 | 444 | function pspell_store_replacement(int $dictionary_link, string $misspelled, string $correct): void |
| 445 | 445 | { |
| 446 | - error_clear_last(); |
|
| 447 | - $result = \pspell_store_replacement($dictionary_link, $misspelled, $correct); |
|
| 448 | - if ($result === false) { |
|
| 449 | - throw PspellException::createFromPhpError(); |
|
| 450 | - } |
|
| 446 | + error_clear_last(); |
|
| 447 | + $result = \pspell_store_replacement($dictionary_link, $misspelled, $correct); |
|
| 448 | + if ($result === false) { |
|
| 449 | + throw PspellException::createFromPhpError(); |
|
| 450 | + } |
|
| 451 | 451 | } |
@@ -13,12 +13,12 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | function apache_get_version(): string |
| 15 | 15 | { |
| 16 | - error_clear_last(); |
|
| 17 | - $result = \apache_get_version(); |
|
| 18 | - if ($result === false) { |
|
| 19 | - throw ApacheException::createFromPhpError(); |
|
| 20 | - } |
|
| 21 | - return $result; |
|
| 16 | + error_clear_last(); |
|
| 17 | + $result = \apache_get_version(); |
|
| 18 | + if ($result === false) { |
|
| 19 | + throw ApacheException::createFromPhpError(); |
|
| 20 | + } |
|
| 21 | + return $result; |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | |
@@ -36,12 +36,12 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | function apache_getenv(string $variable, bool $walk_to_top = false): string |
| 38 | 38 | { |
| 39 | - error_clear_last(); |
|
| 40 | - $result = \apache_getenv($variable, $walk_to_top); |
|
| 41 | - if ($result === false) { |
|
| 42 | - throw ApacheException::createFromPhpError(); |
|
| 43 | - } |
|
| 44 | - return $result; |
|
| 39 | + error_clear_last(); |
|
| 40 | + $result = \apache_getenv($variable, $walk_to_top); |
|
| 41 | + if ($result === false) { |
|
| 42 | + throw ApacheException::createFromPhpError(); |
|
| 43 | + } |
|
| 44 | + return $result; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | |
@@ -56,12 +56,12 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | function apache_request_headers(): array |
| 58 | 58 | { |
| 59 | - error_clear_last(); |
|
| 60 | - $result = \apache_request_headers(); |
|
| 61 | - if ($result === false) { |
|
| 62 | - throw ApacheException::createFromPhpError(); |
|
| 63 | - } |
|
| 64 | - return $result; |
|
| 59 | + error_clear_last(); |
|
| 60 | + $result = \apache_request_headers(); |
|
| 61 | + if ($result === false) { |
|
| 62 | + throw ApacheException::createFromPhpError(); |
|
| 63 | + } |
|
| 64 | + return $result; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | |
@@ -79,11 +79,11 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | function apache_reset_timeout(): void |
| 81 | 81 | { |
| 82 | - error_clear_last(); |
|
| 83 | - $result = \apache_reset_timeout(); |
|
| 84 | - if ($result === false) { |
|
| 85 | - throw ApacheException::createFromPhpError(); |
|
| 86 | - } |
|
| 82 | + error_clear_last(); |
|
| 83 | + $result = \apache_reset_timeout(); |
|
| 84 | + if ($result === false) { |
|
| 85 | + throw ApacheException::createFromPhpError(); |
|
| 86 | + } |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | |
@@ -98,12 +98,12 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | function apache_response_headers(): array |
| 100 | 100 | { |
| 101 | - error_clear_last(); |
|
| 102 | - $result = \apache_response_headers(); |
|
| 103 | - if ($result === false) { |
|
| 104 | - throw ApacheException::createFromPhpError(); |
|
| 105 | - } |
|
| 106 | - return $result; |
|
| 101 | + error_clear_last(); |
|
| 102 | + $result = \apache_response_headers(); |
|
| 103 | + if ($result === false) { |
|
| 104 | + throw ApacheException::createFromPhpError(); |
|
| 105 | + } |
|
| 106 | + return $result; |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | |
@@ -120,11 +120,11 @@ discard block |
||
| 120 | 120 | */ |
| 121 | 121 | function apache_setenv(string $variable, string $value, bool $walk_to_top = false): void |
| 122 | 122 | { |
| 123 | - error_clear_last(); |
|
| 124 | - $result = \apache_setenv($variable, $value, $walk_to_top); |
|
| 125 | - if ($result === false) { |
|
| 126 | - throw ApacheException::createFromPhpError(); |
|
| 127 | - } |
|
| 123 | + error_clear_last(); |
|
| 124 | + $result = \apache_setenv($variable, $value, $walk_to_top); |
|
| 125 | + if ($result === false) { |
|
| 126 | + throw ApacheException::createFromPhpError(); |
|
| 127 | + } |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | |
@@ -141,12 +141,12 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | function getallheaders(): array |
| 143 | 143 | { |
| 144 | - error_clear_last(); |
|
| 145 | - $result = \getallheaders(); |
|
| 146 | - if ($result === false) { |
|
| 147 | - throw ApacheException::createFromPhpError(); |
|
| 148 | - } |
|
| 149 | - return $result; |
|
| 144 | + error_clear_last(); |
|
| 145 | + $result = \getallheaders(); |
|
| 146 | + if ($result === false) { |
|
| 147 | + throw ApacheException::createFromPhpError(); |
|
| 148 | + } |
|
| 149 | + return $result; |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | |
@@ -169,9 +169,9 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | function virtual(string $filename): void |
| 171 | 171 | { |
| 172 | - error_clear_last(); |
|
| 173 | - $result = \virtual($filename); |
|
| 174 | - if ($result === false) { |
|
| 175 | - throw ApacheException::createFromPhpError(); |
|
| 176 | - } |
|
| 172 | + error_clear_last(); |
|
| 173 | + $result = \virtual($filename); |
|
| 174 | + if ($result === false) { |
|
| 175 | + throw ApacheException::createFromPhpError(); |
|
| 176 | + } |
|
| 177 | 177 | } |