From b54684fb2a376162ae0c73f3afa895225ae51e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Thu, 4 Aug 2022 14:50:55 +0000 Subject: [PATCH 1/3] Use specific result variable name --- generator/src/WritePhpFunction.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/generator/src/WritePhpFunction.php b/generator/src/WritePhpFunction.php index 64d2e522..b34f6e9d 100644 --- a/generator/src/WritePhpFunction.php +++ b/generator/src/WritePhpFunction.php @@ -48,7 +48,7 @@ private function writePhpFunction(): string $returnType = $returnType ? ': '.$returnType : ''; $returnStatement = ''; if ($this->method->getSignatureReturnType() !== 'void') { - $returnStatement = " return \$result;\n"; + $returnStatement = " return \$safeResult;\n"; } $moduleName = $this->method->getModuleName(); @@ -58,7 +58,7 @@ private function writePhpFunction(): string "; if (!$this->method->isOverloaded()) { - $phpFunction .= ' $result = '.$this->printFunctionCall($this->method); + $phpFunction .= ' $safeResult = '.$this->printFunctionCall($this->method); } else { $method = $this->method; $inElse = false; @@ -76,7 +76,7 @@ private function writePhpFunction(): string $defaultValueToString = $this->defaultValueToString($defaultValue); } $phpFunction .= 'if ($'.$lastParameter->getParameterName().' !== '.$defaultValueToString.') {'."\n"; - $phpFunction .= ' $result = '.$this->printFunctionCall($method)."\n"; + $phpFunction .= ' $safeResult = '.$this->printFunctionCall($method)."\n"; $phpFunction .= ' }'; $inElse = true; $method = $method->cloneAndRemoveAParameter(); @@ -85,7 +85,7 @@ private function writePhpFunction(): string } } while (true); $phpFunction .= ' else {'."\n"; - $phpFunction .= ' $result = '.$this->printFunctionCall($method)."\n"; + $phpFunction .= ' $safeResult = '.$this->printFunctionCall($method)."\n"; $phpFunction .= ' }'; } @@ -117,7 +117,7 @@ private function generateExceptionCode(string $moduleName, Method $method) : str if (\count($params) > 0 && in_array($params[0]->getParameterType(), ['CurlHandle', 'CurlMultiHandle', 'CurlShareHandle'])) { $name = $params[0]->getParameterName(); return " - if (\$result === $errorValue) { + if (\$safeResult === $errorValue) { throw CurlException::createFromPhpError(\$$name); } "; @@ -126,7 +126,7 @@ private function generateExceptionCode(string $moduleName, Method $method) : str $exceptionName = FileCreator::toExceptionName($moduleName); return " - if (\$result === $errorValue) { + if (\$safeResult === $errorValue) { throw {$exceptionName}::createFromPhpError(); } "; From e9a7d816598ee4a6d29bf45c8e3d091dc376b63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Thu, 4 Aug 2022 16:30:33 +0000 Subject: [PATCH 2/3] Regenerate files --- generated/apache.php | 45 ++-- generated/apcu.php | 29 +-- generated/array.php | 11 +- generated/bzip2.php | 23 +- generated/calendar.php | 9 +- generated/classobj.php | 5 +- generated/com.php | 37 +-- generated/cubrid.php | 309 +++++++++++++------------ generated/curl.php | 71 +++--- generated/datetime.php | 131 +++++------ generated/dir.php | 31 +-- generated/eio.php | 305 ++++++++++++------------ generated/errorfunc.php | 9 +- generated/exec.php | 27 +-- generated/fileinfo.php | 19 +- generated/filesystem.php | 275 +++++++++++----------- generated/filter.php | 13 +- generated/fpm.php | 5 +- generated/ftp.php | 121 +++++----- generated/funchand.php | 15 +- generated/gettext.php | 7 +- generated/gmp.php | 5 +- generated/gnupg.php | 39 ++-- generated/hash.php | 13 +- generated/ibase.php | 169 +++++++------- generated/ibmDb2.php | 73 +++--- generated/iconv.php | 17 +- generated/image.php | 489 ++++++++++++++++++++------------------- generated/imap.php | 271 +++++++++++----------- generated/info.php | 105 ++++----- generated/inotify.php | 11 +- generated/json.php | 7 +- generated/ldap.php | 199 ++++++++-------- generated/libxml.php | 11 +- generated/lzf.php | 13 +- generated/mailparse.php | 27 +-- generated/mbstring.php | 137 +++++------ generated/misc.php | 79 +++---- generated/mysql.php | 219 +++++++++--------- generated/network.php | 81 +++---- generated/oci8.php | 203 ++++++++-------- generated/opcache.php | 11 +- generated/openssl.php | 277 +++++++++++----------- generated/outcontrol.php | 35 +-- generated/pcntl.php | 43 ++-- generated/pcre.php | 25 +- generated/pgsql.php | 253 ++++++++++---------- generated/posix.php | 99 ++++---- generated/ps.php | 279 +++++++++++----------- generated/pspell.php | 77 +++--- generated/readline.php | 29 +-- generated/rpminfo.php | 5 +- generated/rrd.php | 49 ++-- generated/sem.php | 77 +++--- generated/session.php | 73 +++--- generated/shmop.php | 11 +- generated/sockets.php | 143 ++++++------ generated/sodium.php | 79 +++---- generated/solr.php | 7 +- generated/spl.php | 33 +-- generated/sqlsrv.php | 85 +++---- generated/ssdeep.php | 19 +- generated/ssh2.php | 141 +++++------ generated/stream.php | 151 ++++++------ generated/strings.php | 25 +- generated/swoole.php | 37 +-- generated/uodbc.php | 211 ++++++++--------- generated/uopz.php | 9 +- generated/url.php | 27 +-- generated/var.php | 5 +- generated/xdiff.php | 47 ++-- generated/xml.php | 45 ++-- generated/xmlrpc.php | 5 +- generated/yaml.php | 25 +- generated/yaz.php | 39 ++-- generated/zip.php | 39 ++-- generated/zlib.php | 141 +++++------ 77 files changed, 3199 insertions(+), 3122 deletions(-) diff --git a/generated/apache.php b/generated/apache.php index 2bb3632a..ca0bc01a 100644 --- a/generated/apache.php +++ b/generated/apache.php @@ -14,11 +14,11 @@ function apache_get_version(): string { error_clear_last(); - $result = \apache_get_version(); - if ($result === false) { + $safeResult = \apache_get_version(); + if ($safeResult === false) { throw ApacheException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -35,11 +35,11 @@ function apache_get_version(): string function apache_getenv(string $variable, bool $walk_to_top = false): string { error_clear_last(); - $result = \apache_getenv($variable, $walk_to_top); - if ($result === false) { + $safeResult = \apache_getenv($variable, $walk_to_top); + if ($safeResult === false) { throw ApacheException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -83,11 +83,11 @@ function apache_getenv(string $variable, bool $walk_to_top = false): string function apache_lookup_uri(string $filename): object { error_clear_last(); - $result = \apache_lookup_uri($filename); - if ($result === false) { + $safeResult = \apache_lookup_uri($filename); + if ($safeResult === false) { throw ApacheException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -102,11 +102,11 @@ function apache_lookup_uri(string $filename): object function apache_request_headers(): array { error_clear_last(); - $result = \apache_request_headers(); - if ($result === false) { + $safeResult = \apache_request_headers(); + if ($safeResult === false) { throw ApacheException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -121,11 +121,11 @@ function apache_request_headers(): array function apache_response_headers(): array { error_clear_last(); - $result = \apache_response_headers(); - if ($result === false) { + $safeResult = \apache_response_headers(); + if ($safeResult === false) { throw ApacheException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -143,8 +143,8 @@ function apache_response_headers(): array function apache_setenv(string $variable, string $value, bool $walk_to_top = false): void { error_clear_last(); - $result = \apache_setenv($variable, $value, $walk_to_top); - if ($result === false) { + $safeResult = \apache_setenv($variable, $value, $walk_to_top); + if ($safeResult === false) { throw ApacheException::createFromPhpError(); } } @@ -164,11 +164,11 @@ function apache_setenv(string $variable, string $value, bool $walk_to_top = fals function getallheaders(): array { error_clear_last(); - $result = \getallheaders(); - if ($result === false) { + $safeResult = \getallheaders(); + if ($safeResult === false) { throw ApacheException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -192,8 +192,9 @@ function getallheaders(): array function virtual(string $uri): void { error_clear_last(); - $result = \virtual($uri); - if ($result === false) { + $safeResult = \virtual($uri); + if ($safeResult === false) { throw ApacheException::createFromPhpError(); } } + diff --git a/generated/apcu.php b/generated/apcu.php index 733b2436..ff774136 100644 --- a/generated/apcu.php +++ b/generated/apcu.php @@ -17,11 +17,11 @@ function apcu_cache_info(bool $limited = false): array { error_clear_last(); - $result = \apcu_cache_info($limited); - if ($result === false) { + $safeResult = \apcu_cache_info($limited); + if ($safeResult === false) { throw ApcuException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -39,8 +39,8 @@ function apcu_cache_info(bool $limited = false): array function apcu_cas(string $key, int $old, int $new): void { error_clear_last(); - $result = \apcu_cas($key, $old, $new); - if ($result === false) { + $safeResult = \apcu_cas($key, $old, $new); + if ($safeResult === false) { throw ApcuException::createFromPhpError(); } } @@ -61,11 +61,11 @@ function apcu_cas(string $key, int $old, int $new): void function apcu_dec(string $key, int $step = 1, ?bool &$success = null, int $ttl = 0): int { error_clear_last(); - $result = \apcu_dec($key, $step, $success, $ttl); - if ($result === false) { + $safeResult = \apcu_dec($key, $step, $success, $ttl); + if ($safeResult === false) { throw ApcuException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -84,11 +84,11 @@ function apcu_dec(string $key, int $step = 1, ?bool &$success = null, int $ttl = function apcu_inc(string $key, int $step = 1, ?bool &$success = null, int $ttl = 0): int { error_clear_last(); - $result = \apcu_inc($key, $step, $success, $ttl); - if ($result === false) { + $safeResult = \apcu_inc($key, $step, $success, $ttl); + if ($safeResult === false) { throw ApcuException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -104,9 +104,10 @@ function apcu_inc(string $key, int $step = 1, ?bool &$success = null, int $ttl = function apcu_sma_info(bool $limited = false): array { error_clear_last(); - $result = \apcu_sma_info($limited); - if ($result === false) { + $safeResult = \apcu_sma_info($limited); + if ($safeResult === false) { throw ApcuException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/array.php b/generated/array.php index 39a77b5e..8386e78e 100644 --- a/generated/array.php +++ b/generated/array.php @@ -30,11 +30,11 @@ function array_walk_recursive(&$array, callable $callback, $arg = null): void { error_clear_last(); if ($arg !== null) { - $result = \array_walk_recursive($array, $callback, $arg); + $safeResult = \array_walk_recursive($array, $callback, $arg); } else { - $result = \array_walk_recursive($array, $callback); + $safeResult = \array_walk_recursive($array, $callback); } - if ($result === false) { + if ($safeResult === false) { throw ArrayException::createFromPhpError(); } } @@ -52,8 +52,9 @@ function array_walk_recursive(&$array, callable $callback, $arg = null): void function shuffle(array &$array): void { error_clear_last(); - $result = \shuffle($array); - if ($result === false) { + $safeResult = \shuffle($array); + if ($safeResult === false) { throw ArrayException::createFromPhpError(); } } + diff --git a/generated/bzip2.php b/generated/bzip2.php index 8087c748..e012b3bb 100644 --- a/generated/bzip2.php +++ b/generated/bzip2.php @@ -15,8 +15,8 @@ function bzclose($bz): void { error_clear_last(); - $result = \bzclose($bz); - if ($result === false) { + $safeResult = \bzclose($bz); + if ($safeResult === false) { throw Bzip2Exception::createFromPhpError(); } } @@ -35,8 +35,8 @@ function bzclose($bz): void function bzflush($bz): void { error_clear_last(); - $result = \bzflush($bz); - if ($result === false) { + $safeResult = \bzflush($bz); + if ($safeResult === false) { throw Bzip2Exception::createFromPhpError(); } } @@ -60,11 +60,11 @@ function bzflush($bz): void function bzread($bz, int $length = 1024): string { error_clear_last(); - $result = \bzread($bz, $length); - if ($result === false) { + $safeResult = \bzread($bz, $length); + if ($safeResult === false) { throw Bzip2Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -86,12 +86,13 @@ function bzwrite($bz, string $data, int $length = null): int { error_clear_last(); if ($length !== null) { - $result = \bzwrite($bz, $data, $length); + $safeResult = \bzwrite($bz, $data, $length); } else { - $result = \bzwrite($bz, $data); + $safeResult = \bzwrite($bz, $data); } - if ($result === false) { + if ($safeResult === false) { throw Bzip2Exception::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/calendar.php b/generated/calendar.php index a5b03905..26d3b1ca 100644 --- a/generated/calendar.php +++ b/generated/calendar.php @@ -19,12 +19,13 @@ function unixtojd(int $timestamp = null): int { error_clear_last(); if ($timestamp !== null) { - $result = \unixtojd($timestamp); + $safeResult = \unixtojd($timestamp); } else { - $result = \unixtojd(); + $safeResult = \unixtojd(); } - if ($result === false) { + if ($safeResult === false) { throw CalendarException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/classobj.php b/generated/classobj.php index dd2535ae..5ba3c507 100644 --- a/generated/classobj.php +++ b/generated/classobj.php @@ -18,8 +18,9 @@ function class_alias(string $class, string $alias, bool $autoload = true): void { error_clear_last(); - $result = \class_alias($class, $alias, $autoload); - if ($result === false) { + $safeResult = \class_alias($class, $alias, $autoload); + if ($safeResult === false) { throw ClassobjException::createFromPhpError(); } } + diff --git a/generated/com.php b/generated/com.php index 68e058f2..0272b6a8 100644 --- a/generated/com.php +++ b/generated/com.php @@ -17,11 +17,11 @@ function com_create_guid(): string { error_clear_last(); - $result = \com_create_guid(); - if ($result === false) { + $safeResult = \com_create_guid(); + if ($safeResult === false) { throw ComException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -51,11 +51,11 @@ function com_event_sink(object $variant, object $sink_object, $sink_interface = { error_clear_last(); if ($sink_interface !== null) { - $result = \com_event_sink($variant, $sink_object, $sink_interface); + $safeResult = \com_event_sink($variant, $sink_object, $sink_interface); } else { - $result = \com_event_sink($variant, $sink_object); + $safeResult = \com_event_sink($variant, $sink_object); } - if ($result === false) { + if ($safeResult === false) { throw ComException::createFromPhpError(); } } @@ -116,8 +116,8 @@ function com_event_sink(object $variant, object $sink_object, $sink_interface = function com_load_typelib(string $typelib, bool $case_insensitive = true): void { error_clear_last(); - $result = \com_load_typelib($typelib, $case_insensitive); - if ($result === false) { + $safeResult = \com_load_typelib($typelib, $case_insensitive); + if ($safeResult === false) { throw ComException::createFromPhpError(); } } @@ -142,13 +142,13 @@ function com_print_typeinfo(object $variant, string $dispatch_interface = null, { error_clear_last(); if ($display_sink !== false) { - $result = \com_print_typeinfo($variant, $dispatch_interface, $display_sink); + $safeResult = \com_print_typeinfo($variant, $dispatch_interface, $display_sink); } elseif ($dispatch_interface !== null) { - $result = \com_print_typeinfo($variant, $dispatch_interface); + $safeResult = \com_print_typeinfo($variant, $dispatch_interface); } else { - $result = \com_print_typeinfo($variant); + $safeResult = \com_print_typeinfo($variant); } - if ($result === false) { + if ($safeResult === false) { throw ComException::createFromPhpError(); } } @@ -167,11 +167,11 @@ function com_print_typeinfo(object $variant, string $dispatch_interface = null, function variant_date_to_timestamp(object $variant): int { error_clear_last(); - $result = \variant_date_to_timestamp($variant); - if ($result === null) { + $safeResult = \variant_date_to_timestamp($variant); + if ($safeResult === null) { throw ComException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -188,9 +188,10 @@ function variant_date_to_timestamp(object $variant): int function variant_round($value, int $decimals) { error_clear_last(); - $result = \variant_round($value, $decimals); - if ($result === null) { + $safeResult = \variant_round($value, $decimals); + if ($safeResult === null) { throw ComException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/cubrid.php b/generated/cubrid.php index 559bc973..af1b289e 100644 --- a/generated/cubrid.php +++ b/generated/cubrid.php @@ -128,11 +128,11 @@ function cubrid_bind($req_identifier, int $bind_index, $bind_value, string $bind { error_clear_last(); if ($bind_value_type !== null) { - $result = \cubrid_bind($req_identifier, $bind_index, $bind_value, $bind_value_type); + $safeResult = \cubrid_bind($req_identifier, $bind_index, $bind_value, $bind_value_type); } else { - $result = \cubrid_bind($req_identifier, $bind_index, $bind_value); + $safeResult = \cubrid_bind($req_identifier, $bind_index, $bind_value); } - if ($result === false) { + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -153,11 +153,11 @@ function cubrid_bind($req_identifier, int $bind_index, $bind_value, string $bind function cubrid_col_size($conn_identifier, string $oid, string $attr_name): int { error_clear_last(); - $result = \cubrid_col_size($conn_identifier, $oid, $attr_name); - if ($result === false) { + $safeResult = \cubrid_col_size($conn_identifier, $oid, $attr_name); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -173,11 +173,11 @@ function cubrid_col_size($conn_identifier, string $oid, string $attr_name): int function cubrid_column_names($req_identifier): array { error_clear_last(); - $result = \cubrid_column_names($req_identifier); - if ($result === false) { + $safeResult = \cubrid_column_names($req_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -193,11 +193,11 @@ function cubrid_column_names($req_identifier): array function cubrid_column_types($req_identifier): array { error_clear_last(); - $result = \cubrid_column_types($req_identifier); - if ($result === false) { + $safeResult = \cubrid_column_types($req_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -220,8 +220,8 @@ function cubrid_column_types($req_identifier): array function cubrid_commit($conn_identifier): void { error_clear_last(); - $result = \cubrid_commit($conn_identifier); - if ($result === false) { + $safeResult = \cubrid_commit($conn_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -307,18 +307,18 @@ function cubrid_connect_with_url(string $conn_url, string $userid = null, string { error_clear_last(); if ($new_link !== false) { - $result = \cubrid_connect_with_url($conn_url, $userid, $passwd, $new_link); + $safeResult = \cubrid_connect_with_url($conn_url, $userid, $passwd, $new_link); } elseif ($passwd !== null) { - $result = \cubrid_connect_with_url($conn_url, $userid, $passwd); + $safeResult = \cubrid_connect_with_url($conn_url, $userid, $passwd); } elseif ($userid !== null) { - $result = \cubrid_connect_with_url($conn_url, $userid); + $safeResult = \cubrid_connect_with_url($conn_url, $userid); } else { - $result = \cubrid_connect_with_url($conn_url); + $safeResult = \cubrid_connect_with_url($conn_url); } - if ($result === false) { + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -351,18 +351,18 @@ function cubrid_connect(string $host, int $port, string $dbname, string $userid { error_clear_last(); if ($new_link !== false) { - $result = \cubrid_connect($host, $port, $dbname, $userid, $passwd, $new_link); + $safeResult = \cubrid_connect($host, $port, $dbname, $userid, $passwd, $new_link); } elseif ($passwd !== null) { - $result = \cubrid_connect($host, $port, $dbname, $userid, $passwd); + $safeResult = \cubrid_connect($host, $port, $dbname, $userid, $passwd); } elseif ($userid !== null) { - $result = \cubrid_connect($host, $port, $dbname, $userid); + $safeResult = \cubrid_connect($host, $port, $dbname, $userid); } else { - $result = \cubrid_connect($host, $port, $dbname); + $safeResult = \cubrid_connect($host, $port, $dbname); } - if ($result === false) { + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -381,11 +381,11 @@ function cubrid_connect(string $host, int $port, string $dbname, string $userid function cubrid_current_oid($req_identifier): string { error_clear_last(); - $result = \cubrid_current_oid($req_identifier); - if ($result === false) { + $safeResult = \cubrid_current_oid($req_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -402,11 +402,11 @@ function cubrid_disconnect($conn_identifier = null): void { error_clear_last(); if ($conn_identifier !== null) { - $result = \cubrid_disconnect($conn_identifier); + $safeResult = \cubrid_disconnect($conn_identifier); } else { - $result = \cubrid_disconnect(); + $safeResult = \cubrid_disconnect(); } - if ($result === false) { + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -424,8 +424,8 @@ function cubrid_disconnect($conn_identifier = null): void function cubrid_drop($conn_identifier, string $oid): void { error_clear_last(); - $result = \cubrid_drop($conn_identifier, $oid); - if ($result === false) { + $safeResult = \cubrid_drop($conn_identifier, $oid); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -444,8 +444,8 @@ function cubrid_drop($conn_identifier, string $oid): void function cubrid_free_result($req_identifier): void { error_clear_last(); - $result = \cubrid_free_result($req_identifier); - if ($result === false) { + $safeResult = \cubrid_free_result($req_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -464,11 +464,11 @@ function cubrid_free_result($req_identifier): void function cubrid_get_charset($conn_identifier): string { error_clear_last(); - $result = \cubrid_get_charset($conn_identifier); - if ($result === false) { + $safeResult = \cubrid_get_charset($conn_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -486,11 +486,11 @@ function cubrid_get_charset($conn_identifier): string function cubrid_get_class_name($conn_identifier, string $oid): string { error_clear_last(); - $result = \cubrid_get_class_name($conn_identifier, $oid); - if ($result === false) { + $safeResult = \cubrid_get_class_name($conn_identifier, $oid); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -504,11 +504,11 @@ function cubrid_get_class_name($conn_identifier, string $oid): string function cubrid_get_client_info(): string { error_clear_last(); - $result = \cubrid_get_client_info(); - if ($result === false) { + $safeResult = \cubrid_get_client_info(); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -628,11 +628,11 @@ function cubrid_get_client_info(): string function cubrid_get_db_parameter($conn_identifier): array { error_clear_last(); - $result = \cubrid_get_db_parameter($conn_identifier); - if ($result === false) { + $safeResult = \cubrid_get_db_parameter($conn_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -648,11 +648,11 @@ function cubrid_get_db_parameter($conn_identifier): array function cubrid_get_query_timeout($req_identifier): int { error_clear_last(); - $result = \cubrid_get_query_timeout($req_identifier); - if ($result === false) { + $safeResult = \cubrid_get_query_timeout($req_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -667,11 +667,11 @@ function cubrid_get_query_timeout($req_identifier): int function cubrid_get_server_info($conn_identifier): string { error_clear_last(); - $result = \cubrid_get_server_info($conn_identifier); - if ($result === false) { + $safeResult = \cubrid_get_server_info($conn_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -696,14 +696,14 @@ function cubrid_insert_id($conn_identifier = null): string { error_clear_last(); if ($conn_identifier !== null) { - $result = \cubrid_insert_id($conn_identifier); + $safeResult = \cubrid_insert_id($conn_identifier); } else { - $result = \cubrid_insert_id(); + $safeResult = \cubrid_insert_id(); } - if ($result === false) { + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -718,8 +718,8 @@ function cubrid_insert_id($conn_identifier = null): string function cubrid_lob_close(array $lob_identifier_array): void { error_clear_last(); - $result = \cubrid_lob_close($lob_identifier_array); - if ($result === false) { + $safeResult = \cubrid_lob_close($lob_identifier_array); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -738,8 +738,8 @@ function cubrid_lob_close(array $lob_identifier_array): void function cubrid_lob_export($conn_identifier, $lob_identifier, string $path_name): void { error_clear_last(); - $result = \cubrid_lob_export($conn_identifier, $lob_identifier, $path_name); - if ($result === false) { + $safeResult = \cubrid_lob_export($conn_identifier, $lob_identifier, $path_name); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -761,11 +761,11 @@ function cubrid_lob_export($conn_identifier, $lob_identifier, string $path_name) function cubrid_lob_get($conn_identifier, string $sql): array { error_clear_last(); - $result = \cubrid_lob_get($conn_identifier, $sql); - if ($result === false) { + $safeResult = \cubrid_lob_get($conn_identifier, $sql); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -781,8 +781,8 @@ function cubrid_lob_get($conn_identifier, string $sql): array function cubrid_lob_send($conn_identifier, $lob_identifier): void { error_clear_last(); - $result = \cubrid_lob_send($conn_identifier, $lob_identifier); - if ($result === false) { + $safeResult = \cubrid_lob_send($conn_identifier, $lob_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -799,11 +799,11 @@ function cubrid_lob_send($conn_identifier, $lob_identifier): void function cubrid_lob_size($lob_identifier): string { error_clear_last(); - $result = \cubrid_lob_size($lob_identifier); - if ($result === false) { + $safeResult = \cubrid_lob_size($lob_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -826,11 +826,11 @@ function cubrid_lob2_bind($req_identifier, int $bind_index, $bind_value, string { error_clear_last(); if ($bind_value_type !== null) { - $result = \cubrid_lob2_bind($req_identifier, $bind_index, $bind_value, $bind_value_type); + $safeResult = \cubrid_lob2_bind($req_identifier, $bind_index, $bind_value, $bind_value_type); } else { - $result = \cubrid_lob2_bind($req_identifier, $bind_index, $bind_value); + $safeResult = \cubrid_lob2_bind($req_identifier, $bind_index, $bind_value); } - if ($result === false) { + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -847,8 +847,8 @@ function cubrid_lob2_bind($req_identifier, int $bind_index, $bind_value, string function cubrid_lob2_close($lob_identifier): void { error_clear_last(); - $result = \cubrid_lob2_close($lob_identifier); - if ($result === false) { + $safeResult = \cubrid_lob2_close($lob_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -870,8 +870,8 @@ function cubrid_lob2_close($lob_identifier): void function cubrid_lob2_export($lob_identifier, string $file_name): void { error_clear_last(); - $result = \cubrid_lob2_export($lob_identifier, $file_name); - if ($result === false) { + $safeResult = \cubrid_lob2_export($lob_identifier, $file_name); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -893,8 +893,8 @@ function cubrid_lob2_export($lob_identifier, string $file_name): void function cubrid_lob2_import($lob_identifier, string $file_name): void { error_clear_last(); - $result = \cubrid_lob2_import($lob_identifier, $file_name); - if ($result === false) { + $safeResult = \cubrid_lob2_import($lob_identifier, $file_name); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -916,16 +916,16 @@ function cubrid_lob2_new($conn_identifier = null, string $type = "BLOB") { error_clear_last(); if ($type !== "BLOB") { - $result = \cubrid_lob2_new($conn_identifier, $type); + $safeResult = \cubrid_lob2_new($conn_identifier, $type); } elseif ($conn_identifier !== null) { - $result = \cubrid_lob2_new($conn_identifier); + $safeResult = \cubrid_lob2_new($conn_identifier); } else { - $result = \cubrid_lob2_new(); + $safeResult = \cubrid_lob2_new(); } - if ($result === false) { + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -942,11 +942,11 @@ function cubrid_lob2_new($conn_identifier = null, string $type = "BLOB") function cubrid_lob2_read($lob_identifier, int $len): string { error_clear_last(); - $result = \cubrid_lob2_read($lob_identifier, $len); - if ($result === null) { + $safeResult = \cubrid_lob2_read($lob_identifier, $len); + if ($safeResult === null) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -981,8 +981,8 @@ function cubrid_lob2_read($lob_identifier, int $len): string function cubrid_lob2_seek($lob_identifier, int $offset, int $origin = CUBRID_CURSOR_CURRENT): void { error_clear_last(); - $result = \cubrid_lob2_seek($lob_identifier, $offset, $origin); - if ($result === false) { + $safeResult = \cubrid_lob2_seek($lob_identifier, $offset, $origin); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -1020,8 +1020,8 @@ function cubrid_lob2_seek($lob_identifier, int $offset, int $origin = CUBRID_CUR function cubrid_lob2_seek64($lob_identifier, string $offset, int $origin = CUBRID_CURSOR_CURRENT): void { error_clear_last(); - $result = \cubrid_lob2_seek64($lob_identifier, $offset, $origin); - if ($result === false) { + $safeResult = \cubrid_lob2_seek64($lob_identifier, $offset, $origin); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -1038,11 +1038,11 @@ function cubrid_lob2_seek64($lob_identifier, string $offset, int $origin = CUBRI function cubrid_lob2_size($lob_identifier): int { error_clear_last(); - $result = \cubrid_lob2_size($lob_identifier); - if ($result === false) { + $safeResult = \cubrid_lob2_size($lob_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1060,11 +1060,11 @@ function cubrid_lob2_size($lob_identifier): int function cubrid_lob2_size64($lob_identifier): string { error_clear_last(); - $result = \cubrid_lob2_size64($lob_identifier); - if ($result === false) { + $safeResult = \cubrid_lob2_size64($lob_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1079,11 +1079,11 @@ function cubrid_lob2_size64($lob_identifier): string function cubrid_lob2_tell($lob_identifier): int { error_clear_last(); - $result = \cubrid_lob2_tell($lob_identifier); - if ($result === false) { + $safeResult = \cubrid_lob2_tell($lob_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1101,11 +1101,11 @@ function cubrid_lob2_tell($lob_identifier): int function cubrid_lob2_tell64($lob_identifier): string { error_clear_last(); - $result = \cubrid_lob2_tell64($lob_identifier); - if ($result === false) { + $safeResult = \cubrid_lob2_tell64($lob_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1122,8 +1122,8 @@ function cubrid_lob2_tell64($lob_identifier): string function cubrid_lob2_write($lob_identifier, string $buf): void { error_clear_last(); - $result = \cubrid_lob2_write($lob_identifier, $buf); - if ($result === false) { + $safeResult = \cubrid_lob2_write($lob_identifier, $buf); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -1141,8 +1141,8 @@ function cubrid_lob2_write($lob_identifier, string $buf): void function cubrid_lock_read($conn_identifier, string $oid): void { error_clear_last(); - $result = \cubrid_lock_read($conn_identifier, $oid); - if ($result === false) { + $safeResult = \cubrid_lock_read($conn_identifier, $oid); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -1160,8 +1160,8 @@ function cubrid_lock_read($conn_identifier, string $oid): void function cubrid_lock_write($conn_identifier, string $oid): void { error_clear_last(); - $result = \cubrid_lock_write($conn_identifier, $oid); - if ($result === false) { + $safeResult = \cubrid_lock_write($conn_identifier, $oid); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -1194,11 +1194,11 @@ function cubrid_lock_write($conn_identifier, string $oid): void function cubrid_move_cursor($req_identifier, int $offset, int $origin = CUBRID_CURSOR_CURRENT): int { error_clear_last(); - $result = \cubrid_move_cursor($req_identifier, $offset, $origin); - if ($result === false) { + $safeResult = \cubrid_move_cursor($req_identifier, $offset, $origin); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1215,8 +1215,8 @@ function cubrid_move_cursor($req_identifier, int $offset, int $origin = CUBRID_C function cubrid_next_result($result): void { error_clear_last(); - $result = \cubrid_next_result($result); - if ($result === false) { + $safeResult = \cubrid_next_result($result); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -1304,16 +1304,16 @@ function cubrid_pconnect_with_url(string $conn_url, string $userid = null, strin { error_clear_last(); if ($passwd !== null) { - $result = \cubrid_pconnect_with_url($conn_url, $userid, $passwd); + $safeResult = \cubrid_pconnect_with_url($conn_url, $userid, $passwd); } elseif ($userid !== null) { - $result = \cubrid_pconnect_with_url($conn_url, $userid); + $safeResult = \cubrid_pconnect_with_url($conn_url, $userid); } else { - $result = \cubrid_pconnect_with_url($conn_url); + $safeResult = \cubrid_pconnect_with_url($conn_url); } - if ($result === false) { + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1349,16 +1349,16 @@ function cubrid_pconnect(string $host, int $port, string $dbname, string $userid { error_clear_last(); if ($passwd !== null) { - $result = \cubrid_pconnect($host, $port, $dbname, $userid, $passwd); + $safeResult = \cubrid_pconnect($host, $port, $dbname, $userid, $passwd); } elseif ($userid !== null) { - $result = \cubrid_pconnect($host, $port, $dbname, $userid); + $safeResult = \cubrid_pconnect($host, $port, $dbname, $userid); } else { - $result = \cubrid_pconnect($host, $port, $dbname); + $safeResult = \cubrid_pconnect($host, $port, $dbname); } - if ($result === false) { + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1383,11 +1383,11 @@ function cubrid_pconnect(string $host, int $port, string $dbname, string $userid function cubrid_prepare($conn_identifier, string $prepare_stmt, int $option = 0) { error_clear_last(); - $result = \cubrid_prepare($conn_identifier, $prepare_stmt, $option); - if ($result === false) { + $safeResult = \cubrid_prepare($conn_identifier, $prepare_stmt, $option); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1413,13 +1413,13 @@ function cubrid_put($conn_identifier, string $oid, string $attr = null, $value = { error_clear_last(); if ($value !== null) { - $result = \cubrid_put($conn_identifier, $oid, $attr, $value); + $safeResult = \cubrid_put($conn_identifier, $oid, $attr, $value); } elseif ($attr !== null) { - $result = \cubrid_put($conn_identifier, $oid, $attr); + $safeResult = \cubrid_put($conn_identifier, $oid, $attr); } else { - $result = \cubrid_put($conn_identifier, $oid); + $safeResult = \cubrid_put($conn_identifier, $oid); } - if ($result === false) { + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -1441,8 +1441,8 @@ function cubrid_put($conn_identifier, string $oid, string $attr = null, $value = function cubrid_rollback($conn_identifier): void { error_clear_last(); - $result = \cubrid_rollback($conn_identifier); - if ($result === false) { + $safeResult = \cubrid_rollback($conn_identifier); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -1841,16 +1841,16 @@ function cubrid_schema($conn_identifier, int $schema_type, string $class_name = { error_clear_last(); if ($attr_name !== null) { - $result = \cubrid_schema($conn_identifier, $schema_type, $class_name, $attr_name); + $safeResult = \cubrid_schema($conn_identifier, $schema_type, $class_name, $attr_name); } elseif ($class_name !== null) { - $result = \cubrid_schema($conn_identifier, $schema_type, $class_name); + $safeResult = \cubrid_schema($conn_identifier, $schema_type, $class_name); } else { - $result = \cubrid_schema($conn_identifier, $schema_type); + $safeResult = \cubrid_schema($conn_identifier, $schema_type); } - if ($result === false) { + if ($safeResult === false) { throw CubridException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1869,8 +1869,8 @@ function cubrid_schema($conn_identifier, int $schema_type, string $class_name = function cubrid_seq_drop($conn_identifier, string $oid, string $attr_name, int $index): void { error_clear_last(); - $result = \cubrid_seq_drop($conn_identifier, $oid, $attr_name, $index); - if ($result === false) { + $safeResult = \cubrid_seq_drop($conn_identifier, $oid, $attr_name, $index); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -1891,8 +1891,8 @@ function cubrid_seq_drop($conn_identifier, string $oid, string $attr_name, int $ function cubrid_seq_insert($conn_identifier, string $oid, string $attr_name, int $index, string $seq_element): void { error_clear_last(); - $result = \cubrid_seq_insert($conn_identifier, $oid, $attr_name, $index, $seq_element); - if ($result === false) { + $safeResult = \cubrid_seq_insert($conn_identifier, $oid, $attr_name, $index, $seq_element); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -1913,8 +1913,8 @@ function cubrid_seq_insert($conn_identifier, string $oid, string $attr_name, int function cubrid_seq_put($conn_identifier, string $oid, string $attr_name, int $index, string $seq_element): void { error_clear_last(); - $result = \cubrid_seq_put($conn_identifier, $oid, $attr_name, $index, $seq_element); - if ($result === false) { + $safeResult = \cubrid_seq_put($conn_identifier, $oid, $attr_name, $index, $seq_element); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -1935,8 +1935,8 @@ function cubrid_seq_put($conn_identifier, string $oid, string $attr_name, int $i function cubrid_set_add($conn_identifier, string $oid, string $attr_name, string $set_element): void { error_clear_last(); - $result = \cubrid_set_add($conn_identifier, $oid, $attr_name, $set_element); - if ($result === false) { + $safeResult = \cubrid_set_add($conn_identifier, $oid, $attr_name, $set_element); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -1963,8 +1963,8 @@ function cubrid_set_add($conn_identifier, string $oid, string $attr_name, string function cubrid_set_autocommit($conn_identifier, bool $mode): void { error_clear_last(); - $result = \cubrid_set_autocommit($conn_identifier, $mode); - if ($result === false) { + $safeResult = \cubrid_set_autocommit($conn_identifier, $mode); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -1990,8 +1990,8 @@ function cubrid_set_autocommit($conn_identifier, bool $mode): void function cubrid_set_db_parameter($conn_identifier, int $param_type, int $param_value): void { error_clear_last(); - $result = \cubrid_set_db_parameter($conn_identifier, $param_type, $param_value); - if ($result === false) { + $safeResult = \cubrid_set_db_parameter($conn_identifier, $param_type, $param_value); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -2012,8 +2012,8 @@ function cubrid_set_db_parameter($conn_identifier, int $param_type, int $param_v function cubrid_set_drop($conn_identifier, string $oid, string $attr_name, string $set_element): void { error_clear_last(); - $result = \cubrid_set_drop($conn_identifier, $oid, $attr_name, $set_element); - if ($result === false) { + $safeResult = \cubrid_set_drop($conn_identifier, $oid, $attr_name, $set_element); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } @@ -2031,8 +2031,9 @@ function cubrid_set_drop($conn_identifier, string $oid, string $attr_name, strin function cubrid_set_query_timeout($req_identifier, int $timeout): void { error_clear_last(); - $result = \cubrid_set_query_timeout($req_identifier, $timeout); - if ($result === false) { + $safeResult = \cubrid_set_query_timeout($req_identifier, $timeout); + if ($safeResult === false) { throw CubridException::createFromPhpError(); } } + diff --git a/generated/curl.php b/generated/curl.php index 469f81df..9ec327b0 100644 --- a/generated/curl.php +++ b/generated/curl.php @@ -16,11 +16,11 @@ function curl_copy_handle(\CurlHandle $handle): \CurlHandle { error_clear_last(); - $result = \curl_copy_handle($handle); - if ($result === false) { + $safeResult = \curl_copy_handle($handle); + if ($safeResult === false) { throw CurlException::createFromPhpError($handle); } - return $result; + return $safeResult; } @@ -37,11 +37,11 @@ function curl_copy_handle(\CurlHandle $handle): \CurlHandle function curl_escape(\CurlHandle $handle, string $string): string { error_clear_last(); - $result = \curl_escape($handle, $string); - if ($result === false) { + $safeResult = \curl_escape($handle, $string); + if ($safeResult === false) { throw CurlException::createFromPhpError($handle); } - return $result; + return $safeResult; } @@ -62,11 +62,11 @@ function curl_escape(\CurlHandle $handle, string $string): string function curl_exec(\CurlHandle $handle) { error_clear_last(); - $result = \curl_exec($handle); - if ($result === false) { + $safeResult = \curl_exec($handle); + if ($safeResult === false) { throw CurlException::createFromPhpError($handle); } - return $result; + return $safeResult; } @@ -536,14 +536,14 @@ function curl_getinfo(\CurlHandle $handle, int $option = null) { error_clear_last(); if ($option !== null) { - $result = \curl_getinfo($handle, $option); + $safeResult = \curl_getinfo($handle, $option); } else { - $result = \curl_getinfo($handle); + $safeResult = \curl_getinfo($handle); } - if ($result === false) { + if ($safeResult === false) { throw CurlException::createFromPhpError($handle); } - return $result; + return $safeResult; } @@ -566,14 +566,14 @@ function curl_init(string $url = null): \CurlHandle { error_clear_last(); if ($url !== null) { - $result = \curl_init($url); + $safeResult = \curl_init($url); } else { - $result = \curl_init(); + $safeResult = \curl_init(); } - if ($result === false) { + if ($safeResult === false) { throw CurlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -625,11 +625,11 @@ function curl_init(string $url = null): \CurlHandle function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_messages = null): array { error_clear_last(); - $result = \curl_multi_info_read($multi_handle, $queued_messages); - if ($result === false) { + $safeResult = \curl_multi_info_read($multi_handle, $queued_messages); + if ($safeResult === false) { throw CurlException::createFromPhpError($multi_handle); } - return $result; + return $safeResult; } @@ -643,11 +643,11 @@ function curl_multi_info_read(\CurlMultiHandle $multi_handle, ?int &$queued_mess function curl_multi_init(): \CurlMultiHandle { error_clear_last(); - $result = \curl_multi_init(); - if ($result === false) { + $safeResult = \curl_multi_init(); + if ($safeResult === false) { throw CurlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -789,8 +789,8 @@ function curl_multi_init(): \CurlMultiHandle function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value): void { error_clear_last(); - $result = \curl_multi_setopt($multi_handle, $option, $value); - if ($result === false) { + $safeResult = \curl_multi_setopt($multi_handle, $option, $value); + if ($safeResult === false) { throw CurlException::createFromPhpError($multi_handle); } } @@ -3153,8 +3153,8 @@ function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value): function curl_setopt(\CurlHandle $handle, int $option, $value): void { error_clear_last(); - $result = \curl_setopt($handle, $option, $value); - if ($result === false) { + $safeResult = \curl_setopt($handle, $option, $value); + if ($safeResult === false) { throw CurlException::createFromPhpError($handle); } } @@ -3172,11 +3172,11 @@ function curl_setopt(\CurlHandle $handle, int $option, $value): void function curl_share_errno(\CurlShareHandle $share_handle): int { error_clear_last(); - $result = \curl_share_errno($share_handle); - if ($result === false) { + $safeResult = \curl_share_errno($share_handle); + if ($safeResult === false) { throw CurlException::createFromPhpError($share_handle); } - return $result; + return $safeResult; } @@ -3249,8 +3249,8 @@ function curl_share_errno(\CurlShareHandle $share_handle): int function curl_share_setopt(\CurlShareHandle $share_handle, int $option, $value): void { error_clear_last(); - $result = \curl_share_setopt($share_handle, $option, $value); - if ($result === false) { + $safeResult = \curl_share_setopt($share_handle, $option, $value); + if ($safeResult === false) { throw CurlException::createFromPhpError($share_handle); } } @@ -3269,9 +3269,10 @@ function curl_share_setopt(\CurlShareHandle $share_handle, int $option, $value): function curl_unescape(\CurlHandle $handle, string $string): string { error_clear_last(); - $result = \curl_unescape($handle, $string); - if ($result === false) { + $safeResult = \curl_unescape($handle, $string); + if ($safeResult === false) { throw CurlException::createFromPhpError($handle); } - return $result; + return $safeResult; } + diff --git a/generated/datetime.php b/generated/datetime.php index 9840ef5c..2ad55a07 100644 --- a/generated/datetime.php +++ b/generated/datetime.php @@ -16,11 +16,11 @@ function date_parse_from_format(string $format, string $datetime): ?array { error_clear_last(); - $result = \date_parse_from_format($format, $datetime); - if ($result === false) { + $safeResult = \date_parse_from_format($format, $datetime); + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -51,11 +51,11 @@ function date_parse_from_format(string $format, string $datetime): ?array function date_parse(string $datetime): ?array { error_clear_last(); - $result = \date_parse($datetime); - if ($result === false) { + $safeResult = \date_parse($datetime); + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -157,11 +157,11 @@ function date_parse(string $datetime): ?array function date_sun_info(int $timestamp, float $latitude, float $longitude): array { error_clear_last(); - $result = \date_sun_info($timestamp, $latitude, $longitude); - if ($result === false) { + $safeResult = \date_sun_info($timestamp, $latitude, $longitude); + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -251,20 +251,20 @@ function date_sunrise(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, f { error_clear_last(); if ($utcOffset !== null) { - $result = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset); + $safeResult = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset); } elseif ($zenith !== null) { - $result = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith); + $safeResult = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude, $zenith); } elseif ($longitude !== null) { - $result = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude); + $safeResult = \date_sunrise($timestamp, $returnFormat, $latitude, $longitude); } elseif ($latitude !== null) { - $result = \date_sunrise($timestamp, $returnFormat, $latitude); + $safeResult = \date_sunrise($timestamp, $returnFormat, $latitude); } else { - $result = \date_sunrise($timestamp, $returnFormat); + $safeResult = \date_sunrise($timestamp, $returnFormat); } - if ($result === false) { + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -354,20 +354,20 @@ function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, fl { error_clear_last(); if ($utcOffset !== null) { - $result = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset); + $safeResult = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith, $utcOffset); } elseif ($zenith !== null) { - $result = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith); + $safeResult = \date_sunset($timestamp, $returnFormat, $latitude, $longitude, $zenith); } elseif ($longitude !== null) { - $result = \date_sunset($timestamp, $returnFormat, $latitude, $longitude); + $safeResult = \date_sunset($timestamp, $returnFormat, $latitude, $longitude); } elseif ($latitude !== null) { - $result = \date_sunset($timestamp, $returnFormat, $latitude); + $safeResult = \date_sunset($timestamp, $returnFormat, $latitude); } else { - $result = \date_sunset($timestamp, $returnFormat); + $safeResult = \date_sunset($timestamp, $returnFormat); } - if ($result === false) { + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -397,14 +397,14 @@ function date(string $format, int $timestamp = null): string { error_clear_last(); if ($timestamp !== null) { - $result = \date($format, $timestamp); + $safeResult = \date($format, $timestamp); } else { - $result = \date($format); + $safeResult = \date($format); } - if ($result === false) { + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -444,22 +444,22 @@ function gmmktime(int $hour, int $minute = null, int $second = null, int $month { error_clear_last(); if ($year !== null) { - $result = \gmmktime($hour, $minute, $second, $month, $day, $year); + $safeResult = \gmmktime($hour, $minute, $second, $month, $day, $year); } elseif ($day !== null) { - $result = \gmmktime($hour, $minute, $second, $month, $day); + $safeResult = \gmmktime($hour, $minute, $second, $month, $day); } elseif ($month !== null) { - $result = \gmmktime($hour, $minute, $second, $month); + $safeResult = \gmmktime($hour, $minute, $second, $month); } elseif ($second !== null) { - $result = \gmmktime($hour, $minute, $second); + $safeResult = \gmmktime($hour, $minute, $second); } elseif ($minute !== null) { - $result = \gmmktime($hour, $minute); + $safeResult = \gmmktime($hour, $minute); } else { - $result = \gmmktime($hour); + $safeResult = \gmmktime($hour); } - if ($result === false) { + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -488,14 +488,14 @@ function gmstrftime(string $format, int $timestamp = null): string { error_clear_last(); if ($timestamp !== null) { - $result = \gmstrftime($format, $timestamp); + $safeResult = \gmstrftime($format, $timestamp); } else { - $result = \gmstrftime($format); + $safeResult = \gmstrftime($format); } - if ($result === false) { + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -619,14 +619,14 @@ function idate(string $format, int $timestamp = null): int { error_clear_last(); if ($timestamp !== null) { - $result = \idate($format, $timestamp); + $safeResult = \idate($format, $timestamp); } else { - $result = \idate($format); + $safeResult = \idate($format); } - if ($result === false) { + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -673,22 +673,22 @@ function mktime(int $hour, int $minute = null, int $second = null, int $month = { error_clear_last(); if ($year !== null) { - $result = \mktime($hour, $minute, $second, $month, $day, $year); + $safeResult = \mktime($hour, $minute, $second, $month, $day, $year); } elseif ($day !== null) { - $result = \mktime($hour, $minute, $second, $month, $day); + $safeResult = \mktime($hour, $minute, $second, $month, $day); } elseif ($month !== null) { - $result = \mktime($hour, $minute, $second, $month); + $safeResult = \mktime($hour, $minute, $second, $month); } elseif ($second !== null) { - $result = \mktime($hour, $minute, $second); + $safeResult = \mktime($hour, $minute, $second); } elseif ($minute !== null) { - $result = \mktime($hour, $minute); + $safeResult = \mktime($hour, $minute); } else { - $result = \mktime($hour); + $safeResult = \mktime($hour); } - if ($result === false) { + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1009,14 +1009,14 @@ function strftime(string $format, int $timestamp = null): string { error_clear_last(); if ($timestamp !== null) { - $result = \strftime($format, $timestamp); + $safeResult = \strftime($format, $timestamp); } else { - $result = \strftime($format); + $safeResult = \strftime($format); } - if ($result === false) { + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1095,11 +1095,11 @@ function strftime(string $format, int $timestamp = null): string function strptime(string $timestamp, string $format): array { error_clear_last(); - $result = \strptime($timestamp, $format); - if ($result === false) { + $safeResult = \strptime($timestamp, $format); + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1121,14 +1121,14 @@ function strtotime(string $datetime, int $baseTimestamp = null): int { error_clear_last(); if ($baseTimestamp !== null) { - $result = \strtotime($datetime, $baseTimestamp); + $safeResult = \strtotime($datetime, $baseTimestamp); } else { - $result = \strtotime($datetime); + $safeResult = \strtotime($datetime); } - if ($result === false) { + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1156,9 +1156,10 @@ function strtotime(string $datetime, int $baseTimestamp = null): int function timezone_name_from_abbr(string $abbr, int $utcOffset = -1, int $isDST = -1): string { error_clear_last(); - $result = \timezone_name_from_abbr($abbr, $utcOffset, $isDST); - if ($result === false) { + $safeResult = \timezone_name_from_abbr($abbr, $utcOffset, $isDST); + if ($safeResult === false) { throw DatetimeException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/dir.php b/generated/dir.php index fe4ea5af..a1fb53da 100644 --- a/generated/dir.php +++ b/generated/dir.php @@ -15,8 +15,8 @@ function chdir(string $directory): void { error_clear_last(); - $result = \chdir($directory); - if ($result === false) { + $safeResult = \chdir($directory); + if ($safeResult === false) { throw DirException::createFromPhpError(); } } @@ -41,8 +41,8 @@ function chdir(string $directory): void function chroot(string $directory): void { error_clear_last(); - $result = \chroot($directory); - if ($result === false) { + $safeResult = \chroot($directory); + if ($safeResult === false) { throw DirException::createFromPhpError(); } } @@ -64,11 +64,11 @@ function chroot(string $directory): void function getcwd(): string { error_clear_last(); - $result = \getcwd(); - if ($result === false) { + $safeResult = \getcwd(); + if ($safeResult === false) { throw DirException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -89,14 +89,14 @@ function opendir(string $directory, $context = null) { error_clear_last(); if ($context !== null) { - $result = \opendir($directory, $context); + $safeResult = \opendir($directory, $context); } else { - $result = \opendir($directory); + $safeResult = \opendir($directory); } - if ($result === false) { + if ($safeResult === false) { throw DirException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -123,12 +123,13 @@ function scandir(string $directory, int $sorting_order = SCANDIR_SORT_ASCENDING, { error_clear_last(); if ($context !== null) { - $result = \scandir($directory, $sorting_order, $context); + $safeResult = \scandir($directory, $sorting_order, $context); } else { - $result = \scandir($directory, $sorting_order); + $safeResult = \scandir($directory, $sorting_order); } - if ($result === false) { + if ($safeResult === false) { throw DirException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/eio.php b/generated/eio.php index 1fffa900..eeb84afb 100644 --- a/generated/eio.php +++ b/generated/eio.php @@ -19,14 +19,14 @@ * @throws EioException * */ -function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_busy($delay, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_busy($delay, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -71,14 +71,14 @@ function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, callable $callback = n * @throws EioException * */ -function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_chmod($path, $mode, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_chmod($path, $mode, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -123,14 +123,14 @@ function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable * @throws EioException * */ -function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_chown($path, $uid, $gid, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_chown($path, $uid, $gid, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -172,14 +172,14 @@ function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEF * @throws EioException * */ -function eio_close($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_close($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_close($fd, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_close($fd, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -231,14 +231,14 @@ function eio_close($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $ * @throws EioException * */ -function eio_custom(callable $execute, int $pri, callable $callback, $data = null) +function eio_custom(callable $execute, int $pri, callable $callback, $data = NULL) { error_clear_last(); - $result = \eio_custom($execute, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_custom($execute, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -280,14 +280,14 @@ function eio_custom(callable $execute, int $pri, callable $callback, $data = nul * @throws EioException * */ -function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_dup2($fd, $fd2, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_dup2($fd, $fd2, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -300,8 +300,8 @@ function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, callable $callback = nu function eio_event_loop(): void { error_clear_last(); - $result = \eio_event_loop(); - if ($result === false) { + $safeResult = \eio_event_loop(); + if ($safeResult === false) { throw EioException::createFromPhpError(); } } @@ -352,14 +352,14 @@ function eio_event_loop(): void * @throws EioException * */ -function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_fallocate($fd, $mode, $offset, $length, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_fallocate($fd, $mode, $offset, $length, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -402,14 +402,14 @@ function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_ * @throws EioException * */ -function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_fchmod($fd, $mode, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_fchmod($fd, $mode, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -453,14 +453,14 @@ function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callba * @throws EioException * */ -function eio_fchown($fd, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_fchown($fd, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_fchown($fd, $uid, $gid, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_fchown($fd, $uid, $gid, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -501,14 +501,14 @@ function eio_fchown($fd, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, ca * @throws EioException * */ -function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_fdatasync($fd, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_fdatasync($fd, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -554,14 +554,14 @@ function eio_fstat($fd, int $pri, callable $callback, $data = null) { error_clear_last(); if ($data !== null) { - $result = \eio_fstat($fd, $pri, $callback, $data); + $safeResult = \eio_fstat($fd, $pri, $callback, $data); } else { - $result = \eio_fstat($fd, $pri, $callback); + $safeResult = \eio_fstat($fd, $pri, $callback); } - if ($result === false) { + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -607,14 +607,14 @@ function eio_fstatvfs($fd, int $pri, callable $callback, $data = null) { error_clear_last(); if ($data !== null) { - $result = \eio_fstatvfs($fd, $pri, $callback, $data); + $safeResult = \eio_fstatvfs($fd, $pri, $callback, $data); } else { - $result = \eio_fstatvfs($fd, $pri, $callback); + $safeResult = \eio_fstatvfs($fd, $pri, $callback); } - if ($result === false) { + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -655,14 +655,14 @@ function eio_fstatvfs($fd, int $pri, callable $callback, $data = null) * @throws EioException * */ -function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_fsync($fd, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_fsync($fd, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -706,14 +706,14 @@ function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $ * @throws EioException * */ -function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_ftruncate($fd, $offset, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_ftruncate($fd, $offset, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -757,14 +757,14 @@ function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callabl * @throws EioException * */ -function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_futime($fd, $atime, $mtime, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_futime($fd, $atime, $mtime, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -801,14 +801,14 @@ function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, * @throws EioException * */ -function eio_grp(callable $callback, string $data = null) +function eio_grp(callable $callback, string $data = NULL) { error_clear_last(); - $result = \eio_grp($callback, $data); - if ($result === false) { + $safeResult = \eio_grp($callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -850,14 +850,14 @@ function eio_grp(callable $callback, string $data = null) * @throws EioException * */ -function eio_lstat(string $path, int $pri, callable $callback, $data = null) +function eio_lstat(string $path, int $pri, callable $callback, $data = NULL) { error_clear_last(); - $result = \eio_lstat($path, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_lstat($path, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -900,14 +900,14 @@ function eio_lstat(string $path, int $pri, callable $callback, $data = null) * @throws EioException * */ -function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_mkdir($path, $mode, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_mkdir($path, $mode, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -965,14 +965,14 @@ function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable * @throws EioException * */ -function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_mknod($path, $mode, $dev, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_mknod($path, $mode, $dev, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1013,14 +1013,14 @@ function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT * @throws EioException * */ -function eio_nop(int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_nop(int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_nop($pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_nop($pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1064,14 +1064,14 @@ function eio_nop(int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = * @throws EioException * */ -function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_readahead($fd, $offset, $length, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_readahead($fd, $offset, $length, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1368,14 +1368,14 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT * @throws EioException * */ -function eio_readdir(string $path, int $flags, int $pri, callable $callback, string $data = null) +function eio_readdir(string $path, int $flags, int $pri, callable $callback, string $data = NULL) { error_clear_last(); - $result = \eio_readdir($path, $flags, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_readdir($path, $flags, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1416,14 +1416,14 @@ function eio_readdir(string $path, int $flags, int $pri, callable $callback, str * @throws EioException * */ -function eio_readlink(string $path, int $pri, callable $callback, string $data = null) +function eio_readlink(string $path, int $pri, callable $callback, string $data = NULL) { error_clear_last(); - $result = \eio_readlink($path, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_readlink($path, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1465,14 +1465,14 @@ function eio_readlink(string $path, int $pri, callable $callback, string $data = * @throws EioException * */ -function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_rename($path, $new_path, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_rename($path, $new_path, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1513,14 +1513,14 @@ function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, * @throws EioException * */ -function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_rmdir($path, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_rmdir($path, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1569,14 +1569,14 @@ function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback * @throws EioException * */ -function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_seek($fd, $offset, $whence, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_seek($fd, $offset, $whence, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1625,18 +1625,18 @@ function eio_sendfile($out_fd, $in_fd, int $offset, int $length, int $pri = null { error_clear_last(); if ($data !== null) { - $result = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri, $callback, $data); + $safeResult = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri, $callback, $data); } elseif ($callback !== null) { - $result = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri, $callback); + $safeResult = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri, $callback); } elseif ($pri !== null) { - $result = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri); + $safeResult = \eio_sendfile($out_fd, $in_fd, $offset, $length, $pri); } else { - $result = \eio_sendfile($out_fd, $in_fd, $offset, $length); + $safeResult = \eio_sendfile($out_fd, $in_fd, $offset, $length); } - if ($result === false) { + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1679,14 +1679,14 @@ function eio_sendfile($out_fd, $in_fd, int $offset, int $length, int $pri = null * @throws EioException * */ -function eio_stat(string $path, int $pri, callable $callback, $data = null) +function eio_stat(string $path, int $pri, callable $callback, $data = NULL) { error_clear_last(); - $result = \eio_stat($path, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_stat($path, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1734,14 +1734,14 @@ function eio_statvfs(string $path, int $pri, callable $callback, $data = null) { error_clear_last(); if ($data !== null) { - $result = \eio_statvfs($path, $pri, $callback, $data); + $safeResult = \eio_statvfs($path, $pri, $callback, $data); } else { - $result = \eio_statvfs($path, $pri, $callback); + $safeResult = \eio_statvfs($path, $pri, $callback); } - if ($result === false) { + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1784,14 +1784,14 @@ function eio_statvfs(string $path, int $pri, callable $callback, $data = null) * @throws EioException * */ -function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_symlink($path, $new_path, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_symlink($path, $new_path, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1843,14 +1843,14 @@ function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, * @throws EioException * */ -function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_sync_file_range($fd, $offset, $nbytes, $flags, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_sync_file_range($fd, $offset, $nbytes, $flags, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1864,14 +1864,14 @@ function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri * @throws EioException * */ -function eio_sync(int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_sync(int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_sync($pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_sync($pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1912,14 +1912,14 @@ function eio_sync(int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = * @throws EioException * */ -function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_syncfs($fd, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_syncfs($fd, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1962,14 +1962,14 @@ function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, * @throws EioException * */ -function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_truncate($path, $offset, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_truncate($path, $offset, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2010,14 +2010,14 @@ function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, * @throws EioException * */ -function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_unlink($path, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_unlink($path, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2060,14 +2060,14 @@ function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback * @throws EioException * */ -function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_utime($path, $atime, $mtime, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_utime($path, $atime, $mtime, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2113,12 +2113,13 @@ function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_ * @throws EioException * */ -function eio_write($fd, string $str, int $length = 0, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) +function eio_write($fd, string $str, int $length = 0, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) { error_clear_last(); - $result = \eio_write($fd, $str, $length, $offset, $pri, $callback, $data); - if ($result === false) { + $safeResult = \eio_write($fd, $str, $length, $offset, $pri, $callback, $data); + if ($safeResult === false) { throw EioException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/errorfunc.php b/generated/errorfunc.php index 9d3e98b2..97365ccc 100644 --- a/generated/errorfunc.php +++ b/generated/errorfunc.php @@ -70,13 +70,14 @@ function error_log(string $message, int $message_type = 0, string $destination = { error_clear_last(); if ($additional_headers !== null) { - $result = \error_log($message, $message_type, $destination, $additional_headers); + $safeResult = \error_log($message, $message_type, $destination, $additional_headers); } elseif ($destination !== null) { - $result = \error_log($message, $message_type, $destination); + $safeResult = \error_log($message, $message_type, $destination); } else { - $result = \error_log($message, $message_type); + $safeResult = \error_log($message, $message_type); } - if ($result === false) { + if ($safeResult === false) { throw ErrorfuncException::createFromPhpError(); } } + diff --git a/generated/exec.php b/generated/exec.php index 126438d4..bc3a5af6 100644 --- a/generated/exec.php +++ b/generated/exec.php @@ -35,11 +35,11 @@ function exec(string $command, ?array &$output = null, ?int &$result_code = null): string { error_clear_last(); - $result = \exec($command, $output, $result_code); - if ($result === false) { + $safeResult = \exec($command, $output, $result_code); + if ($safeResult === false) { throw ExecException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -65,8 +65,8 @@ function exec(string $command, ?array &$output = null, ?int &$result_code = null function passthru(string $command, ?int &$result_code = null): void { error_clear_last(); - $result = \passthru($command, $result_code); - if ($result === false) { + $safeResult = \passthru($command, $result_code); + if ($safeResult === false) { throw ExecException::createFromPhpError(); } } @@ -95,8 +95,8 @@ function passthru(string $command, ?int &$result_code = null): void function proc_nice(int $priority): void { error_clear_last(); - $result = \proc_nice($priority); - if ($result === false) { + $safeResult = \proc_nice($priority); + if ($safeResult === false) { throw ExecException::createFromPhpError(); } } @@ -114,11 +114,11 @@ function proc_nice(int $priority): void function shell_exec(string $command): string { error_clear_last(); - $result = \shell_exec($command); - if ($result === null) { + $safeResult = \shell_exec($command); + if ($safeResult === null) { throw ExecException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -146,9 +146,10 @@ function shell_exec(string $command): string function system(string $command, ?int &$result_code = null): string { error_clear_last(); - $result = \system($command, $result_code); - if ($result === false) { + $safeResult = \system($command, $result_code); + if ($safeResult === false) { throw ExecException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/fileinfo.php b/generated/fileinfo.php index 8bbfd3c4..2532395c 100644 --- a/generated/fileinfo.php +++ b/generated/fileinfo.php @@ -14,8 +14,8 @@ function finfo_close($finfo): void { error_clear_last(); - $result = \finfo_close($finfo); - if ($result === false) { + $safeResult = \finfo_close($finfo); + if ($safeResult === false) { throw FileinfoException::createFromPhpError(); } } @@ -47,14 +47,14 @@ function finfo_open(int $flags = FILEINFO_NONE, string $magic_database = null) { error_clear_last(); if ($magic_database !== null) { - $result = \finfo_open($flags, $magic_database); + $safeResult = \finfo_open($flags, $magic_database); } else { - $result = \finfo_open($flags); + $safeResult = \finfo_open($flags); } - if ($result === false) { + if ($safeResult === false) { throw FileinfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -71,9 +71,10 @@ function finfo_open(int $flags = FILEINFO_NONE, string $magic_database = null) function mime_content_type($filename): string { error_clear_last(); - $result = \mime_content_type($filename); - if ($result === false) { + $safeResult = \mime_content_type($filename); + if ($safeResult === false) { throw FileinfoException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/filesystem.php b/generated/filesystem.php index f3e5a208..a923d615 100644 --- a/generated/filesystem.php +++ b/generated/filesystem.php @@ -19,8 +19,8 @@ function chgrp(string $filename, $group): void { error_clear_last(); - $result = \chgrp($filename, $group); - if ($result === false) { + $safeResult = \chgrp($filename, $group); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -61,8 +61,8 @@ function chgrp(string $filename, $group): void function chmod(string $filename, int $permissions): void { error_clear_last(); - $result = \chmod($filename, $permissions); - if ($result === false) { + $safeResult = \chmod($filename, $permissions); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -81,8 +81,8 @@ function chmod(string $filename, int $permissions): void function chown(string $filename, $user): void { error_clear_last(); - $result = \chown($filename, $user); - if ($result === false) { + $safeResult = \chown($filename, $user); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -109,11 +109,11 @@ function copy(string $from, string $to, $context = null): void { error_clear_last(); if ($context !== null) { - $result = \copy($from, $to, $context); + $safeResult = \copy($from, $to, $context); } else { - $result = \copy($from, $to); + $safeResult = \copy($from, $to); } - if ($result === false) { + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -136,11 +136,11 @@ function copy(string $from, string $to, $context = null): void function disk_free_space(string $directory): float { error_clear_last(); - $result = \disk_free_space($directory); - if ($result === false) { + $safeResult = \disk_free_space($directory); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -156,11 +156,11 @@ function disk_free_space(string $directory): float function disk_total_space(string $directory): float { error_clear_last(); - $result = \disk_total_space($directory); - if ($result === false) { + $safeResult = \disk_total_space($directory); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -175,8 +175,8 @@ function disk_total_space(string $directory): float function fclose($stream): void { error_clear_last(); - $result = \fclose($stream); - if ($result === false) { + $safeResult = \fclose($stream); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -198,8 +198,8 @@ function fclose($stream): void function fdatasync($stream): void { error_clear_last(); - $result = \fdatasync($stream); - if ($result === false) { + $safeResult = \fdatasync($stream); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -219,8 +219,8 @@ function fdatasync($stream): void function fflush($stream): void { error_clear_last(); - $result = \fflush($stream); - if ($result === false) { + $safeResult = \fflush($stream); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -255,20 +255,20 @@ function fgetcsv($stream, int $length = null, string $separator = ",", string $e { error_clear_last(); if ($escape !== "\\") { - $result = \fgetcsv($stream, $length, $separator, $enclosure, $escape); + $safeResult = \fgetcsv($stream, $length, $separator, $enclosure, $escape); } elseif ($enclosure !== "\"") { - $result = \fgetcsv($stream, $length, $separator, $enclosure); + $safeResult = \fgetcsv($stream, $length, $separator, $enclosure); } elseif ($separator !== ",") { - $result = \fgetcsv($stream, $length, $separator); + $safeResult = \fgetcsv($stream, $length, $separator); } elseif ($length !== null) { - $result = \fgetcsv($stream, $length); + $safeResult = \fgetcsv($stream, $length); } else { - $result = \fgetcsv($stream); + $safeResult = \fgetcsv($stream); } - if ($result === false) { + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -310,18 +310,18 @@ function file_get_contents(string $filename, bool $use_include_path = false, $co { error_clear_last(); if ($length !== null) { - $result = \file_get_contents($filename, $use_include_path, $context, $offset, $length); + $safeResult = \file_get_contents($filename, $use_include_path, $context, $offset, $length); } elseif ($offset !== 0) { - $result = \file_get_contents($filename, $use_include_path, $context, $offset); + $safeResult = \file_get_contents($filename, $use_include_path, $context, $offset); } elseif ($context !== null) { - $result = \file_get_contents($filename, $use_include_path, $context); + $safeResult = \file_get_contents($filename, $use_include_path, $context); } else { - $result = \file_get_contents($filename, $use_include_path); + $safeResult = \file_get_contents($filename, $use_include_path); } - if ($result === false) { + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -403,14 +403,14 @@ function file_put_contents(string $filename, $data, int $flags = 0, $context = n { error_clear_last(); if ($context !== null) { - $result = \file_put_contents($filename, $data, $flags, $context); + $safeResult = \file_put_contents($filename, $data, $flags, $context); } else { - $result = \file_put_contents($filename, $data, $flags); + $safeResult = \file_put_contents($filename, $data, $flags); } - if ($result === false) { + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -463,14 +463,14 @@ function file(string $filename, int $flags = 0, $context = null): array { error_clear_last(); if ($context !== null) { - $result = \file($filename, $flags, $context); + $safeResult = \file($filename, $flags, $context); } else { - $result = \file($filename, $flags); + $safeResult = \file($filename, $flags); } - if ($result === false) { + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -486,11 +486,11 @@ function file(string $filename, int $flags = 0, $context = null): array function fileatime(string $filename): int { error_clear_last(); - $result = \fileatime($filename); - if ($result === false) { + $safeResult = \fileatime($filename); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -506,11 +506,11 @@ function fileatime(string $filename): int function filectime(string $filename): int { error_clear_last(); - $result = \filectime($filename); - if ($result === false) { + $safeResult = \filectime($filename); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -525,11 +525,11 @@ function filectime(string $filename): int function fileinode(string $filename): int { error_clear_last(); - $result = \fileinode($filename); - if ($result === false) { + $safeResult = \fileinode($filename); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -547,11 +547,11 @@ function fileinode(string $filename): int function filemtime(string $filename): int { error_clear_last(); - $result = \filemtime($filename); - if ($result === false) { + $safeResult = \filemtime($filename); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -568,11 +568,11 @@ function filemtime(string $filename): int function fileowner(string $filename): int { error_clear_last(); - $result = \fileowner($filename); - if ($result === false) { + $safeResult = \fileowner($filename); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -601,11 +601,11 @@ function fileowner(string $filename): int function fileperms(string $filename): int { error_clear_last(); - $result = \fileperms($filename); - if ($result === false) { + $safeResult = \fileperms($filename); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -621,11 +621,11 @@ function fileperms(string $filename): int function filesize(string $filename): int { error_clear_last(); - $result = \filesize($filename); - if ($result === false) { + $safeResult = \filesize($filename); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -674,8 +674,8 @@ function filesize(string $filename): int function flock($stream, int $operation, ?int &$would_block = null): void { error_clear_last(); - $result = \flock($stream, $operation, $would_block); - if ($result === false) { + $safeResult = \flock($stream, $operation, $would_block); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -884,14 +884,14 @@ function fopen(string $filename, string $mode, bool $use_include_path = false, $ { error_clear_last(); if ($context !== null) { - $result = \fopen($filename, $mode, $use_include_path, $context); + $safeResult = \fopen($filename, $mode, $use_include_path, $context); } else { - $result = \fopen($filename, $mode, $use_include_path); + $safeResult = \fopen($filename, $mode, $use_include_path); } - if ($result === false) { + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -937,11 +937,11 @@ function fopen(string $filename, string $mode, bool $use_include_path = false, $ function fread($stream, int $length): string { error_clear_last(); - $result = \fread($stream, $length); - if ($result === false) { + $safeResult = \fread($stream, $length); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -962,11 +962,11 @@ function fread($stream, int $length): string function fstat($stream): array { error_clear_last(); - $result = \fstat($stream); - if ($result === false) { + $safeResult = \fstat($stream); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -984,8 +984,8 @@ function fstat($stream): array function fsync($stream): void { error_clear_last(); - $result = \fsync($stream); - if ($result === false) { + $safeResult = \fsync($stream); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -1011,8 +1011,8 @@ function fsync($stream): void function ftruncate($stream, int $size): void { error_clear_last(); - $result = \ftruncate($stream, $size); - if ($result === false) { + $safeResult = \ftruncate($stream, $size); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -1035,14 +1035,14 @@ function fwrite($stream, string $data, int $length = null): int { error_clear_last(); if ($length !== null) { - $result = \fwrite($stream, $data, $length); + $safeResult = \fwrite($stream, $data, $length); } else { - $result = \fwrite($stream, $data); + $safeResult = \fwrite($stream, $data); } - if ($result === false) { + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1139,11 +1139,11 @@ function fwrite($stream, string $data, int $length = null): int function glob(string $pattern, int $flags = 0): array { error_clear_last(); - $result = \glob($pattern, $flags); - if ($result === false) { + $safeResult = \glob($pattern, $flags); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1163,8 +1163,8 @@ function glob(string $pattern, int $flags = 0): array function lchgrp(string $filename, $group): void { error_clear_last(); - $result = \lchgrp($filename, $group); - if ($result === false) { + $safeResult = \lchgrp($filename, $group); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -1184,8 +1184,8 @@ function lchgrp(string $filename, $group): void function lchown(string $filename, $user): void { error_clear_last(); - $result = \lchown($filename, $user); - if ($result === false) { + $safeResult = \lchown($filename, $user); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -1202,8 +1202,8 @@ function lchown(string $filename, $user): void function link(string $target, string $link): void { error_clear_last(); - $result = \link($target, $link); - if ($result === false) { + $safeResult = \link($target, $link); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -1228,11 +1228,11 @@ function link(string $target, string $link): void function lstat(string $filename): array { error_clear_last(); - $result = \lstat($filename); - if ($result === false) { + $safeResult = \lstat($filename); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1268,11 +1268,11 @@ function mkdir(string $directory, int $permissions = 0777, bool $recursive = fal { error_clear_last(); if ($context !== null) { - $result = \mkdir($directory, $permissions, $recursive, $context); + $safeResult = \mkdir($directory, $permissions, $recursive, $context); } else { - $result = \mkdir($directory, $permissions, $recursive); + $safeResult = \mkdir($directory, $permissions, $recursive); } - if ($result === false) { + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -1310,11 +1310,11 @@ function mkdir(string $directory, int $permissions = 0777, bool $recursive = fal function parse_ini_file(string $filename, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array { error_clear_last(); - $result = \parse_ini_file($filename, $process_sections, $scanner_mode); - if ($result === false) { + $safeResult = \parse_ini_file($filename, $process_sections, $scanner_mode); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1347,11 +1347,11 @@ function parse_ini_file(string $filename, bool $process_sections = false, int $s function parse_ini_string(string $ini_string, bool $process_sections = false, int $scanner_mode = INI_SCANNER_NORMAL): array { error_clear_last(); - $result = \parse_ini_string($ini_string, $process_sections, $scanner_mode); - if ($result === false) { + $safeResult = \parse_ini_string($ini_string, $process_sections, $scanner_mode); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1371,14 +1371,14 @@ function readfile(string $filename, bool $use_include_path = false, $context = n { error_clear_last(); if ($context !== null) { - $result = \readfile($filename, $use_include_path, $context); + $safeResult = \readfile($filename, $use_include_path, $context); } else { - $result = \readfile($filename, $use_include_path); + $safeResult = \readfile($filename, $use_include_path); } - if ($result === false) { + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1393,11 +1393,11 @@ function readfile(string $filename, bool $use_include_path = false, $context = n function readlink(string $path): string { error_clear_last(); - $result = \readlink($path); - if ($result === false) { + $safeResult = \readlink($path); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1429,11 +1429,11 @@ function readlink(string $path): string function realpath(string $path): string { error_clear_last(); - $result = \realpath($path); - if ($result === false) { + $safeResult = \realpath($path); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1466,11 +1466,11 @@ function rename(string $from, string $to, $context = null): void { error_clear_last(); if ($context !== null) { - $result = \rename($from, $to, $context); + $safeResult = \rename($from, $to, $context); } else { - $result = \rename($from, $to); + $safeResult = \rename($from, $to); } - if ($result === false) { + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -1488,8 +1488,8 @@ function rename(string $from, string $to, $context = null): void function rewind($stream): void { error_clear_last(); - $result = \rewind($stream); - if ($result === false) { + $safeResult = \rewind($stream); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -1510,11 +1510,11 @@ function rmdir(string $directory, $context = null): void { error_clear_last(); if ($context !== null) { - $result = \rmdir($directory, $context); + $safeResult = \rmdir($directory, $context); } else { - $result = \rmdir($directory); + $safeResult = \rmdir($directory); } - if ($result === false) { + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -1533,8 +1533,8 @@ function rmdir(string $directory, $context = null): void function symlink(string $target, string $link): void { error_clear_last(); - $result = \symlink($target, $link); - if ($result === false) { + $safeResult = \symlink($target, $link); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -1555,11 +1555,11 @@ function symlink(string $target, string $link): void function tempnam(string $directory, string $prefix): string { error_clear_last(); - $result = \tempnam($directory, $prefix); - if ($result === false) { + $safeResult = \tempnam($directory, $prefix); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1580,11 +1580,11 @@ function tempnam(string $directory, string $prefix): string function tmpfile() { error_clear_last(); - $result = \tmpfile(); - if ($result === false) { + $safeResult = \tmpfile(); + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1611,13 +1611,13 @@ function touch(string $filename, int $mtime = null, int $atime = null): void { error_clear_last(); if ($atime !== null) { - $result = \touch($filename, $mtime, $atime); + $safeResult = \touch($filename, $mtime, $atime); } elseif ($mtime !== null) { - $result = \touch($filename, $mtime); + $safeResult = \touch($filename, $mtime); } else { - $result = \touch($filename); + $safeResult = \touch($filename); } - if ($result === false) { + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } @@ -1641,11 +1641,12 @@ function unlink(string $filename, $context = null): void { error_clear_last(); if ($context !== null) { - $result = \unlink($filename, $context); + $safeResult = \unlink($filename, $context); } else { - $result = \unlink($filename); + $safeResult = \unlink($filename); } - if ($result === false) { + if ($safeResult === false) { throw FilesystemException::createFromPhpError(); } } + diff --git a/generated/filter.php b/generated/filter.php index aba02b4d..647ef513 100644 --- a/generated/filter.php +++ b/generated/filter.php @@ -39,11 +39,11 @@ function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empty = true): ?array { error_clear_last(); - $result = \filter_input_array($type, $options, $add_empty); - if ($result === false) { + $safeResult = \filter_input_array($type, $options, $add_empty); + if ($safeResult === false) { throw FilterException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -73,9 +73,10 @@ function filter_input_array(int $type, $options = FILTER_DEFAULT, bool $add_empt function filter_var_array(array $array, $options = FILTER_DEFAULT, bool $add_empty = true): ?array { error_clear_last(); - $result = \filter_var_array($array, $options, $add_empty); - if ($result === false) { + $safeResult = \filter_var_array($array, $options, $add_empty); + if ($safeResult === false) { throw FilterException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/fpm.php b/generated/fpm.php index 08b39410..d0522306 100644 --- a/generated/fpm.php +++ b/generated/fpm.php @@ -15,8 +15,9 @@ function fastcgi_finish_request(): void { error_clear_last(); - $result = \fastcgi_finish_request(); - if ($result === false) { + $safeResult = \fastcgi_finish_request(); + if ($safeResult === false) { throw FpmException::createFromPhpError(); } } + diff --git a/generated/ftp.php b/generated/ftp.php index 23846bf1..ca877207 100644 --- a/generated/ftp.php +++ b/generated/ftp.php @@ -18,8 +18,8 @@ function ftp_alloc($ftp, int $size, ?string &$response = null): void { error_clear_last(); - $result = \ftp_alloc($ftp, $size, $response); - if ($result === false) { + $safeResult = \ftp_alloc($ftp, $size, $response); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -38,8 +38,8 @@ function ftp_alloc($ftp, int $size, ?string &$response = null): void function ftp_append($ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY): void { error_clear_last(); - $result = \ftp_append($ftp, $remote_filename, $local_filename, $mode); - if ($result === false) { + $safeResult = \ftp_append($ftp, $remote_filename, $local_filename, $mode); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -55,8 +55,8 @@ function ftp_append($ftp, string $remote_filename, string $local_filename, int $ function ftp_cdup($ftp): void { error_clear_last(); - $result = \ftp_cdup($ftp); - if ($result === false) { + $safeResult = \ftp_cdup($ftp); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -73,8 +73,8 @@ function ftp_cdup($ftp): void function ftp_chdir($ftp, string $directory): void { error_clear_last(); - $result = \ftp_chdir($ftp, $directory); - if ($result === false) { + $safeResult = \ftp_chdir($ftp, $directory); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -94,11 +94,11 @@ function ftp_chdir($ftp, string $directory): void function ftp_chmod($ftp, int $permissions, string $filename): int { error_clear_last(); - $result = \ftp_chmod($ftp, $permissions, $filename); - if ($result === false) { + $safeResult = \ftp_chmod($ftp, $permissions, $filename); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -113,8 +113,8 @@ function ftp_chmod($ftp, int $permissions, string $filename): int function ftp_close($ftp): void { error_clear_last(); - $result = \ftp_close($ftp); - if ($result === false) { + $safeResult = \ftp_close($ftp); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -139,11 +139,11 @@ function ftp_close($ftp): void function ftp_connect(string $hostname, int $port = 21, int $timeout = 90) { error_clear_last(); - $result = \ftp_connect($hostname, $port, $timeout); - if ($result === false) { + $safeResult = \ftp_connect($hostname, $port, $timeout); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -159,8 +159,8 @@ function ftp_connect(string $hostname, int $port = 21, int $timeout = 90) function ftp_delete($ftp, string $filename): void { error_clear_last(); - $result = \ftp_delete($ftp, $filename); - if ($result === false) { + $safeResult = \ftp_delete($ftp, $filename); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -182,8 +182,8 @@ function ftp_delete($ftp, string $filename): void function ftp_fget($ftp, $stream, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): void { error_clear_last(); - $result = \ftp_fget($ftp, $stream, $remote_filename, $mode, $offset); - if ($result === false) { + $safeResult = \ftp_fget($ftp, $stream, $remote_filename, $mode, $offset); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -205,8 +205,8 @@ function ftp_fget($ftp, $stream, string $remote_filename, int $mode = FTP_BINARY function ftp_fput($ftp, string $remote_filename, $stream, int $mode = FTP_BINARY, int $offset = 0): void { error_clear_last(); - $result = \ftp_fput($ftp, $remote_filename, $stream, $mode, $offset); - if ($result === false) { + $safeResult = \ftp_fput($ftp, $remote_filename, $stream, $mode, $offset); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -228,8 +228,8 @@ function ftp_fput($ftp, string $remote_filename, $stream, int $mode = FTP_BINARY function ftp_get($ftp, string $local_filename, string $remote_filename, int $mode = FTP_BINARY, int $offset = 0): void { error_clear_last(); - $result = \ftp_get($ftp, $local_filename, $remote_filename, $mode, $offset); - if ($result === false) { + $safeResult = \ftp_get($ftp, $local_filename, $remote_filename, $mode, $offset); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -247,8 +247,8 @@ function ftp_get($ftp, string $local_filename, string $remote_filename, int $mod function ftp_login($ftp, string $username, string $password): void { error_clear_last(); - $result = \ftp_login($ftp, $username, $password); - if ($result === false) { + $safeResult = \ftp_login($ftp, $username, $password); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -266,11 +266,11 @@ function ftp_login($ftp, string $username, string $password): void function ftp_mkdir($ftp, string $directory): string { error_clear_last(); - $result = \ftp_mkdir($ftp, $directory); - if ($result === false) { + $safeResult = \ftp_mkdir($ftp, $directory); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -286,11 +286,11 @@ function ftp_mkdir($ftp, string $directory): string function ftp_mlsd($ftp, string $directory): array { error_clear_last(); - $result = \ftp_mlsd($ftp, $directory); - if ($result === false) { + $safeResult = \ftp_mlsd($ftp, $directory); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -315,11 +315,11 @@ function ftp_mlsd($ftp, string $directory): array function ftp_nb_put($ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): int { error_clear_last(); - $result = \ftp_nb_put($ftp, $remote_filename, $local_filename, $mode, $offset); - if ($result === false) { + $safeResult = \ftp_nb_put($ftp, $remote_filename, $local_filename, $mode, $offset); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -338,11 +338,11 @@ function ftp_nb_put($ftp, string $remote_filename, string $local_filename, int $ function ftp_nlist($ftp, string $directory): array { error_clear_last(); - $result = \ftp_nlist($ftp, $directory); - if ($result === false) { + $safeResult = \ftp_nlist($ftp, $directory); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -363,8 +363,8 @@ function ftp_nlist($ftp, string $directory): array function ftp_pasv($ftp, bool $enable): void { error_clear_last(); - $result = \ftp_pasv($ftp, $enable); - if ($result === false) { + $safeResult = \ftp_pasv($ftp, $enable); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -385,8 +385,8 @@ function ftp_pasv($ftp, bool $enable): void function ftp_put($ftp, string $remote_filename, string $local_filename, int $mode = FTP_BINARY, int $offset = 0): void { error_clear_last(); - $result = \ftp_put($ftp, $remote_filename, $local_filename, $mode, $offset); - if ($result === false) { + $safeResult = \ftp_put($ftp, $remote_filename, $local_filename, $mode, $offset); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -403,11 +403,11 @@ function ftp_put($ftp, string $remote_filename, string $local_filename, int $mod function ftp_pwd($ftp): string { error_clear_last(); - $result = \ftp_pwd($ftp); - if ($result === false) { + $safeResult = \ftp_pwd($ftp); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -425,11 +425,11 @@ function ftp_pwd($ftp): string function ftp_raw($ftp, string $command): array { error_clear_last(); - $result = \ftp_raw($ftp, $command); - if ($result === null) { + $safeResult = \ftp_raw($ftp, $command); + if ($safeResult === null) { throw FtpException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -446,8 +446,8 @@ function ftp_raw($ftp, string $command): array function ftp_rename($ftp, string $from, string $to): void { error_clear_last(); - $result = \ftp_rename($ftp, $from, $to); - if ($result === false) { + $safeResult = \ftp_rename($ftp, $from, $to); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -465,8 +465,8 @@ function ftp_rename($ftp, string $from, string $to): void function ftp_rmdir($ftp, string $directory): void { error_clear_last(); - $result = \ftp_rmdir($ftp, $directory); - if ($result === false) { + $safeResult = \ftp_rmdir($ftp, $directory); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -489,8 +489,8 @@ function ftp_rmdir($ftp, string $directory): void function ftp_site($ftp, string $command): void { error_clear_last(); - $result = \ftp_site($ftp, $command); - if ($result === false) { + $safeResult = \ftp_site($ftp, $command); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } } @@ -520,11 +520,11 @@ function ftp_site($ftp, string $command): void function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90) { error_clear_last(); - $result = \ftp_ssl_connect($hostname, $port, $timeout); - if ($result === false) { + $safeResult = \ftp_ssl_connect($hostname, $port, $timeout); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -539,9 +539,10 @@ function ftp_ssl_connect(string $hostname, int $port = 21, int $timeout = 90) function ftp_systype($ftp): string { error_clear_last(); - $result = \ftp_systype($ftp); - if ($result === false) { + $safeResult = \ftp_systype($ftp); + if ($safeResult === false) { throw FtpException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/funchand.php b/generated/funchand.php index 4b2a7b8f..83744fdf 100644 --- a/generated/funchand.php +++ b/generated/funchand.php @@ -19,11 +19,11 @@ function create_function(string $args, string $code): string { error_clear_last(); - $result = \create_function($args, $code); - if ($result === false) { + $safeResult = \create_function($args, $code); + if ($safeResult === false) { throw FunchandException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -35,15 +35,16 @@ function create_function(string $args, string $code): string * @throws FunchandException * */ -function register_tick_function(callable $callback, ...$args): void +function register_tick_function(callable $callback, ...$args): void { error_clear_last(); if ($args !== []) { - $result = \register_tick_function($callback, ...$args); + $safeResult = \register_tick_function($callback, ...$args); } else { - $result = \register_tick_function($callback); + $safeResult = \register_tick_function($callback); } - if ($result === false) { + if ($safeResult === false) { throw FunchandException::createFromPhpError(); } } + diff --git a/generated/gettext.php b/generated/gettext.php index f7816e38..2a0095b7 100644 --- a/generated/gettext.php +++ b/generated/gettext.php @@ -19,9 +19,10 @@ function bindtextdomain(string $domain, string $directory): string { error_clear_last(); - $result = \bindtextdomain($domain, $directory); - if ($result === false) { + $safeResult = \bindtextdomain($domain, $directory); + if ($safeResult === false) { throw GettextException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/gmp.php b/generated/gmp.php index b2b88f6e..4803c9d8 100644 --- a/generated/gmp.php +++ b/generated/gmp.php @@ -18,8 +18,9 @@ function gmp_random_seed($seed): void { error_clear_last(); - $result = \gmp_random_seed($seed); - if ($result === false) { + $safeResult = \gmp_random_seed($seed); + if ($safeResult === false) { throw GmpException::createFromPhpError(); } } + diff --git a/generated/gnupg.php b/generated/gnupg.php index 0ecb886b..0e33fe25 100644 --- a/generated/gnupg.php +++ b/generated/gnupg.php @@ -17,8 +17,8 @@ function gnupg_adddecryptkey($identifier, string $fingerprint, string $passphrase): void { error_clear_last(); - $result = \gnupg_adddecryptkey($identifier, $fingerprint, $passphrase); - if ($result === false) { + $safeResult = \gnupg_adddecryptkey($identifier, $fingerprint, $passphrase); + if ($safeResult === false) { throw GnupgException::createFromPhpError(); } } @@ -36,8 +36,8 @@ function gnupg_adddecryptkey($identifier, string $fingerprint, string $passphras function gnupg_addencryptkey($identifier, string $fingerprint): void { error_clear_last(); - $result = \gnupg_addencryptkey($identifier, $fingerprint); - if ($result === false) { + $safeResult = \gnupg_addencryptkey($identifier, $fingerprint); + if ($safeResult === false) { throw GnupgException::createFromPhpError(); } } @@ -57,11 +57,11 @@ function gnupg_addsignkey($identifier, string $fingerprint, string $passphrase = { error_clear_last(); if ($passphrase !== null) { - $result = \gnupg_addsignkey($identifier, $fingerprint, $passphrase); + $safeResult = \gnupg_addsignkey($identifier, $fingerprint, $passphrase); } else { - $result = \gnupg_addsignkey($identifier, $fingerprint); + $safeResult = \gnupg_addsignkey($identifier, $fingerprint); } - if ($result === false) { + if ($safeResult === false) { throw GnupgException::createFromPhpError(); } } @@ -78,8 +78,8 @@ function gnupg_addsignkey($identifier, string $fingerprint, string $passphrase = function gnupg_cleardecryptkeys($identifier): void { error_clear_last(); - $result = \gnupg_cleardecryptkeys($identifier); - if ($result === false) { + $safeResult = \gnupg_cleardecryptkeys($identifier); + if ($safeResult === false) { throw GnupgException::createFromPhpError(); } } @@ -96,8 +96,8 @@ function gnupg_cleardecryptkeys($identifier): void function gnupg_clearencryptkeys($identifier): void { error_clear_last(); - $result = \gnupg_clearencryptkeys($identifier); - if ($result === false) { + $safeResult = \gnupg_clearencryptkeys($identifier); + if ($safeResult === false) { throw GnupgException::createFromPhpError(); } } @@ -114,8 +114,8 @@ function gnupg_clearencryptkeys($identifier): void function gnupg_clearsignkeys($identifier): void { error_clear_last(); - $result = \gnupg_clearsignkeys($identifier); - if ($result === false) { + $safeResult = \gnupg_clearsignkeys($identifier); + if ($safeResult === false) { throw GnupgException::createFromPhpError(); } } @@ -134,8 +134,8 @@ function gnupg_clearsignkeys($identifier): void function gnupg_deletekey($identifier, string $key, bool $allow_secret): void { error_clear_last(); - $result = \gnupg_deletekey($identifier, $key, $allow_secret); - if ($result === false) { + $safeResult = \gnupg_deletekey($identifier, $key, $allow_secret); + if ($safeResult === false) { throw GnupgException::createFromPhpError(); } } @@ -155,8 +155,8 @@ function gnupg_deletekey($identifier, string $key, bool $allow_secret): void function gnupg_setarmor($identifier, int $armor): void { error_clear_last(); - $result = \gnupg_setarmor($identifier, $armor); - if ($result === false) { + $safeResult = \gnupg_setarmor($identifier, $armor); + if ($safeResult === false) { throw GnupgException::createFromPhpError(); } } @@ -181,8 +181,9 @@ function gnupg_setarmor($identifier, int $armor): void function gnupg_setsignmode($identifier, int $signmode): void { error_clear_last(); - $result = \gnupg_setsignmode($identifier, $signmode); - if ($result === false) { + $safeResult = \gnupg_setsignmode($identifier, $signmode); + if ($safeResult === false) { throw GnupgException::createFromPhpError(); } } + diff --git a/generated/hash.php b/generated/hash.php index 5acbc267..8a3d544f 100644 --- a/generated/hash.php +++ b/generated/hash.php @@ -34,11 +34,11 @@ function hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = ""): string { error_clear_last(); - $result = \hash_hkdf($algo, $key, $length, $info, $salt); - if ($result === false) { + $safeResult = \hash_hkdf($algo, $key, $length, $info, $salt); + if ($safeResult === false) { throw HashException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -55,11 +55,12 @@ function hash_update_file(\HashContext $context, string $filename, ?\HashContext { error_clear_last(); if ($stream_context !== null) { - $result = \hash_update_file($context, $filename, $stream_context); + $safeResult = \hash_update_file($context, $filename, $stream_context); } else { - $result = \hash_update_file($context, $filename); + $safeResult = \hash_update_file($context, $filename); } - if ($result === false) { + if ($safeResult === false) { throw HashException::createFromPhpError(); } } + diff --git a/generated/ibase.php b/generated/ibase.php index 7a619912..113d9cc8 100644 --- a/generated/ibase.php +++ b/generated/ibase.php @@ -15,8 +15,8 @@ function fbird_blob_cancel($blob_handle): void { error_clear_last(); - $result = \fbird_blob_cancel($blob_handle); - if ($result === false) { + $safeResult = \fbird_blob_cancel($blob_handle); + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -38,15 +38,15 @@ function ibase_add_user($service_handle, string $user_name, string $password, st { error_clear_last(); if ($last_name !== null) { - $result = \ibase_add_user($service_handle, $user_name, $password, $first_name, $middle_name, $last_name); + $safeResult = \ibase_add_user($service_handle, $user_name, $password, $first_name, $middle_name, $last_name); } elseif ($middle_name !== null) { - $result = \ibase_add_user($service_handle, $user_name, $password, $first_name, $middle_name); + $safeResult = \ibase_add_user($service_handle, $user_name, $password, $first_name, $middle_name); } elseif ($first_name !== null) { - $result = \ibase_add_user($service_handle, $user_name, $password, $first_name); + $safeResult = \ibase_add_user($service_handle, $user_name, $password, $first_name); } else { - $result = \ibase_add_user($service_handle, $user_name, $password); + $safeResult = \ibase_add_user($service_handle, $user_name, $password); } - if ($result === false) { + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -82,11 +82,11 @@ function ibase_add_user($service_handle, string $user_name, string $password, st function ibase_backup($service_handle, string $source_db, string $dest_file, int $options = 0, bool $verbose = false) { error_clear_last(); - $result = \ibase_backup($service_handle, $source_db, $dest_file, $options, $verbose); - if ($result === false) { + $safeResult = \ibase_backup($service_handle, $source_db, $dest_file, $options, $verbose); + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -101,8 +101,8 @@ function ibase_backup($service_handle, string $source_db, string $dest_file, int function ibase_blob_cancel($blob_handle): void { error_clear_last(); - $result = \ibase_blob_cancel($blob_handle); - if ($result === false) { + $safeResult = \ibase_blob_cancel($blob_handle); + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -123,14 +123,14 @@ function ibase_blob_create($link_identifier = null) { error_clear_last(); if ($link_identifier !== null) { - $result = \ibase_blob_create($link_identifier); + $safeResult = \ibase_blob_create($link_identifier); } else { - $result = \ibase_blob_create(); + $safeResult = \ibase_blob_create(); } - if ($result === false) { + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -147,11 +147,11 @@ function ibase_blob_create($link_identifier = null) function ibase_blob_get($blob_handle, int $len): string { error_clear_last(); - $result = \ibase_blob_get($blob_handle, $len); - if ($result === false) { + $safeResult = \ibase_blob_get($blob_handle, $len); + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -171,11 +171,11 @@ function ibase_close($connection_id = null): void { error_clear_last(); if ($connection_id !== null) { - $result = \ibase_close($connection_id); + $safeResult = \ibase_close($connection_id); } else { - $result = \ibase_close(); + $safeResult = \ibase_close(); } - if ($result === false) { + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -198,11 +198,11 @@ function ibase_commit_ret($link_or_trans_identifier = null): void { error_clear_last(); if ($link_or_trans_identifier !== null) { - $result = \ibase_commit_ret($link_or_trans_identifier); + $safeResult = \ibase_commit_ret($link_or_trans_identifier); } else { - $result = \ibase_commit_ret(); + $safeResult = \ibase_commit_ret(); } - if ($result === false) { + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -223,11 +223,11 @@ function ibase_commit($link_or_trans_identifier = null): void { error_clear_last(); if ($link_or_trans_identifier !== null) { - $result = \ibase_commit($link_or_trans_identifier); + $safeResult = \ibase_commit($link_or_trans_identifier); } else { - $result = \ibase_commit(); + $safeResult = \ibase_commit(); } - if ($result === false) { + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -270,28 +270,28 @@ function ibase_connect(string $database = null, string $username = null, string { error_clear_last(); if ($sync !== null) { - $result = \ibase_connect($database, $username, $password, $charset, $buffers, $dialect, $role, $sync); + $safeResult = \ibase_connect($database, $username, $password, $charset, $buffers, $dialect, $role, $sync); } elseif ($role !== null) { - $result = \ibase_connect($database, $username, $password, $charset, $buffers, $dialect, $role); + $safeResult = \ibase_connect($database, $username, $password, $charset, $buffers, $dialect, $role); } elseif ($dialect !== null) { - $result = \ibase_connect($database, $username, $password, $charset, $buffers, $dialect); + $safeResult = \ibase_connect($database, $username, $password, $charset, $buffers, $dialect); } elseif ($buffers !== null) { - $result = \ibase_connect($database, $username, $password, $charset, $buffers); + $safeResult = \ibase_connect($database, $username, $password, $charset, $buffers); } elseif ($charset !== null) { - $result = \ibase_connect($database, $username, $password, $charset); + $safeResult = \ibase_connect($database, $username, $password, $charset); } elseif ($password !== null) { - $result = \ibase_connect($database, $username, $password); + $safeResult = \ibase_connect($database, $username, $password); } elseif ($username !== null) { - $result = \ibase_connect($database, $username); + $safeResult = \ibase_connect($database, $username); } elseif ($database !== null) { - $result = \ibase_connect($database); + $safeResult = \ibase_connect($database); } else { - $result = \ibase_connect(); + $safeResult = \ibase_connect(); } - if ($result === false) { + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -306,8 +306,8 @@ function ibase_connect(string $database = null, string $username = null, string function ibase_delete_user($service_handle, string $user_name): void { error_clear_last(); - $result = \ibase_delete_user($service_handle, $user_name); - if ($result === false) { + $safeResult = \ibase_delete_user($service_handle, $user_name); + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -326,11 +326,11 @@ function ibase_drop_db($connection = null): void { error_clear_last(); if ($connection !== null) { - $result = \ibase_drop_db($connection); + $safeResult = \ibase_drop_db($connection); } else { - $result = \ibase_drop_db(); + $safeResult = \ibase_drop_db(); } - if ($result === false) { + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -349,8 +349,8 @@ function ibase_drop_db($connection = null): void function ibase_free_event_handler($event): void { error_clear_last(); - $result = \ibase_free_event_handler($event); - if ($result === false) { + $safeResult = \ibase_free_event_handler($event); + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -366,8 +366,8 @@ function ibase_free_event_handler($event): void function ibase_free_query($query): void { error_clear_last(); - $result = \ibase_free_query($query); - if ($result === false) { + $safeResult = \ibase_free_query($query); + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -384,8 +384,8 @@ function ibase_free_query($query): void function ibase_free_result($result_identifier): void { error_clear_last(); - $result = \ibase_free_result($result_identifier); - if ($result === false) { + $safeResult = \ibase_free_result($result_identifier); + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -404,8 +404,8 @@ function ibase_free_result($result_identifier): void function ibase_maintain_db($service_handle, string $db, int $action, int $argument = 0): void { error_clear_last(); - $result = \ibase_maintain_db($service_handle, $db, $action, $argument); - if ($result === false) { + $safeResult = \ibase_maintain_db($service_handle, $db, $action, $argument); + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -427,15 +427,15 @@ function ibase_modify_user($service_handle, string $user_name, string $password, { error_clear_last(); if ($last_name !== null) { - $result = \ibase_modify_user($service_handle, $user_name, $password, $first_name, $middle_name, $last_name); + $safeResult = \ibase_modify_user($service_handle, $user_name, $password, $first_name, $middle_name, $last_name); } elseif ($middle_name !== null) { - $result = \ibase_modify_user($service_handle, $user_name, $password, $first_name, $middle_name); + $safeResult = \ibase_modify_user($service_handle, $user_name, $password, $first_name, $middle_name); } elseif ($first_name !== null) { - $result = \ibase_modify_user($service_handle, $user_name, $password, $first_name); + $safeResult = \ibase_modify_user($service_handle, $user_name, $password, $first_name); } else { - $result = \ibase_modify_user($service_handle, $user_name, $password); + $safeResult = \ibase_modify_user($service_handle, $user_name, $password); } - if ($result === false) { + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -453,8 +453,8 @@ function ibase_modify_user($service_handle, string $user_name, string $password, function ibase_name_result($result, string $name): void { error_clear_last(); - $result = \ibase_name_result($result, $name); - if ($result === false) { + $safeResult = \ibase_name_result($result, $name); + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -504,28 +504,28 @@ function ibase_pconnect(string $database = null, string $username = null, string { error_clear_last(); if ($sync !== null) { - $result = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect, $role, $sync); + $safeResult = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect, $role, $sync); } elseif ($role !== null) { - $result = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect, $role); + $safeResult = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect, $role); } elseif ($dialect !== null) { - $result = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect); + $safeResult = \ibase_pconnect($database, $username, $password, $charset, $buffers, $dialect); } elseif ($buffers !== null) { - $result = \ibase_pconnect($database, $username, $password, $charset, $buffers); + $safeResult = \ibase_pconnect($database, $username, $password, $charset, $buffers); } elseif ($charset !== null) { - $result = \ibase_pconnect($database, $username, $password, $charset); + $safeResult = \ibase_pconnect($database, $username, $password, $charset); } elseif ($password !== null) { - $result = \ibase_pconnect($database, $username, $password); + $safeResult = \ibase_pconnect($database, $username, $password); } elseif ($username !== null) { - $result = \ibase_pconnect($database, $username); + $safeResult = \ibase_pconnect($database, $username); } elseif ($database !== null) { - $result = \ibase_pconnect($database); + $safeResult = \ibase_pconnect($database); } else { - $result = \ibase_pconnect(); + $safeResult = \ibase_pconnect(); } - if ($result === false) { + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -562,11 +562,11 @@ function ibase_pconnect(string $database = null, string $username = null, string function ibase_restore($service_handle, string $source_file, string $dest_db, int $options = 0, bool $verbose = false) { error_clear_last(); - $result = \ibase_restore($service_handle, $source_file, $dest_db, $options, $verbose); - if ($result === false) { + $safeResult = \ibase_restore($service_handle, $source_file, $dest_db, $options, $verbose); + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -587,11 +587,11 @@ function ibase_rollback_ret($link_or_trans_identifier = null): void { error_clear_last(); if ($link_or_trans_identifier !== null) { - $result = \ibase_rollback_ret($link_or_trans_identifier); + $safeResult = \ibase_rollback_ret($link_or_trans_identifier); } else { - $result = \ibase_rollback_ret(); + $safeResult = \ibase_rollback_ret(); } - if ($result === false) { + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -612,11 +612,11 @@ function ibase_rollback($link_or_trans_identifier = null): void { error_clear_last(); if ($link_or_trans_identifier !== null) { - $result = \ibase_rollback($link_or_trans_identifier); + $safeResult = \ibase_rollback($link_or_trans_identifier); } else { - $result = \ibase_rollback(); + $safeResult = \ibase_rollback(); } - if ($result === false) { + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } @@ -636,11 +636,11 @@ function ibase_rollback($link_or_trans_identifier = null): void function ibase_service_attach(string $host, string $dba_username, string $dba_password) { error_clear_last(); - $result = \ibase_service_attach($host, $dba_username, $dba_password); - if ($result === false) { + $safeResult = \ibase_service_attach($host, $dba_username, $dba_password); + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -654,8 +654,9 @@ function ibase_service_attach(string $host, string $dba_username, string $dba_pa function ibase_service_detach($service_handle): void { error_clear_last(); - $result = \ibase_service_detach($service_handle); - if ($result === false) { + $safeResult = \ibase_service_detach($service_handle); + if ($safeResult === false) { throw IbaseException::createFromPhpError(); } } + diff --git a/generated/ibmDb2.php b/generated/ibmDb2.php index f97e7b08..02154d6c 100644 --- a/generated/ibmDb2.php +++ b/generated/ibmDb2.php @@ -50,14 +50,14 @@ function db2_autocommit($connection, int $value = null) { error_clear_last(); if ($value !== null) { - $result = \db2_autocommit($connection, $value); + $safeResult = \db2_autocommit($connection, $value); } else { - $result = \db2_autocommit($connection); + $safeResult = \db2_autocommit($connection); } - if ($result === false) { + if ($safeResult === false) { throw IbmDb2Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -100,17 +100,17 @@ function db2_bind_param($stmt, int $parameter_number, string $variable_name, int { error_clear_last(); if ($scale !== 0) { - $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type, $precision, $scale); + $safeResult = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type, $precision, $scale); } elseif ($precision !== -1) { - $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type, $precision); + $safeResult = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type, $precision); } elseif ($data_type !== 0) { - $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type); + $safeResult = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type, $data_type); } elseif ($parameter_type !== null) { - $result = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type); + $safeResult = \db2_bind_param($stmt, $parameter_number, $variable_name, $parameter_type); } else { - $result = \db2_bind_param($stmt, $parameter_number, $variable_name); + $safeResult = \db2_bind_param($stmt, $parameter_number, $variable_name); } - if ($result === false) { + if ($safeResult === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -228,11 +228,11 @@ function db2_bind_param($stmt, int $parameter_number, string $variable_name, int function db2_client_info($connection): object { error_clear_last(); - $result = \db2_client_info($connection); - if ($result === false) { + $safeResult = \db2_client_info($connection); + if ($safeResult === false) { throw IbmDb2Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -252,8 +252,8 @@ function db2_client_info($connection): object function db2_close($connection): void { error_clear_last(); - $result = \db2_close($connection); - if ($result === false) { + $safeResult = \db2_close($connection); + if ($safeResult === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -273,8 +273,8 @@ function db2_close($connection): void function db2_commit($connection): void { error_clear_last(); - $result = \db2_commit($connection); - if ($result === false) { + $safeResult = \db2_commit($connection); + if ($safeResult === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -308,11 +308,11 @@ function db2_execute($stmt, array $parameters = null): void { error_clear_last(); if ($parameters !== null) { - $result = \db2_execute($stmt, $parameters); + $safeResult = \db2_execute($stmt, $parameters); } else { - $result = \db2_execute($stmt); + $safeResult = \db2_execute($stmt); } - if ($result === false) { + if ($safeResult === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -331,8 +331,8 @@ function db2_execute($stmt, array $parameters = null): void function db2_free_result($stmt): void { error_clear_last(); - $result = \db2_free_result($stmt); - if ($result === false) { + $safeResult = \db2_free_result($stmt); + if ($safeResult === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -351,8 +351,8 @@ function db2_free_result($stmt): void function db2_free_stmt($stmt): void { error_clear_last(); - $result = \db2_free_stmt($stmt); - if ($result === false) { + $safeResult = \db2_free_stmt($stmt); + if ($safeResult === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -511,11 +511,11 @@ function db2_free_stmt($stmt): void function db2_get_option($resource, string $option): string { error_clear_last(); - $result = \db2_get_option($resource, $option); - if ($result === false) { + $safeResult = \db2_get_option($resource, $option); + if ($safeResult === false) { throw IbmDb2Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -544,8 +544,8 @@ function db2_get_option($resource, string $option): string function db2_pclose($resource): void { error_clear_last(); - $result = \db2_pclose($resource); - if ($result === false) { + $safeResult = \db2_pclose($resource); + if ($safeResult === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -565,8 +565,8 @@ function db2_pclose($resource): void function db2_rollback($connection): void { error_clear_last(); - $result = \db2_rollback($connection); - if ($result === false) { + $safeResult = \db2_rollback($connection); + if ($safeResult === false) { throw IbmDb2Exception::createFromPhpError(); } } @@ -826,11 +826,11 @@ function db2_rollback($connection): void function db2_server_info($connection): object { error_clear_last(); - $result = \db2_server_info($connection); - if ($result === false) { + $safeResult = \db2_server_info($connection); + if ($safeResult === false) { throw IbmDb2Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1214,8 +1214,9 @@ function db2_server_info($connection): object function db2_set_option($resource, array $options, int $type): void { error_clear_last(); - $result = \db2_set_option($resource, $options, $type); - if ($result === false) { + $safeResult = \db2_set_option($resource, $options, $type); + if ($safeResult === false) { throw IbmDb2Exception::createFromPhpError(); } } + diff --git a/generated/iconv.php b/generated/iconv.php index 7b28b496..f89c67c3 100644 --- a/generated/iconv.php +++ b/generated/iconv.php @@ -26,11 +26,11 @@ function iconv_get_encoding(string $type = "all") { error_clear_last(); - $result = \iconv_get_encoding($type); - if ($result === false) { + $safeResult = \iconv_get_encoding($type); + if ($safeResult === false) { throw IconvException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -51,8 +51,8 @@ function iconv_get_encoding(string $type = "all") function iconv_set_encoding(string $type, string $encoding): void { error_clear_last(); - $result = \iconv_set_encoding($type, $encoding); - if ($result === false) { + $safeResult = \iconv_set_encoding($type, $encoding); + if ($safeResult === false) { throw IconvException::createFromPhpError(); } } @@ -87,9 +87,10 @@ function iconv_set_encoding(string $type, string $encoding): void function iconv(string $from_encoding, string $to_encoding, string $string): string { error_clear_last(); - $result = \iconv($from_encoding, $to_encoding, $string); - if ($result === false) { + $safeResult = \iconv($from_encoding, $to_encoding, $string); + if ($safeResult === false) { throw IconvException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/image.php b/generated/image.php index 639cf16c..9c032f62 100644 --- a/generated/image.php +++ b/generated/image.php @@ -69,11 +69,11 @@ function getimagesize(string $filename, ?array &$image_info = null): array { error_clear_last(); - $result = \getimagesize($filename, $image_info); - if ($result === false) { + $safeResult = \getimagesize($filename, $image_info); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -90,11 +90,11 @@ function getimagesize(string $filename, ?array &$image_info = null): array function image_type_to_extension(int $image_type, bool $include_dot = true): string { error_clear_last(); - $result = \image_type_to_extension($image_type, $include_dot); - if ($result === false) { + $safeResult = \image_type_to_extension($image_type, $include_dot); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -116,13 +116,13 @@ function image2wbmp($image, ?string $filename = null, int $foreground = null): v { error_clear_last(); if ($foreground !== null) { - $result = \image2wbmp($image, $filename, $foreground); + $safeResult = \image2wbmp($image, $filename, $foreground); } elseif ($filename !== null) { - $result = \image2wbmp($image, $filename); + $safeResult = \image2wbmp($image, $filename); } else { - $result = \image2wbmp($image); + $safeResult = \image2wbmp($image); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -143,14 +143,14 @@ function imageaffine($image, array $affine, array $clip = null) { error_clear_last(); if ($clip !== null) { - $result = \imageaffine($image, $affine, $clip); + $safeResult = \imageaffine($image, $affine, $clip); } else { - $result = \imageaffine($image, $affine); + $safeResult = \imageaffine($image, $affine); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -171,11 +171,11 @@ function imageaffine($image, array $affine, array $clip = null) function imageaffinematrixconcat(array $matrix1, array $matrix2): array { error_clear_last(); - $result = \imageaffinematrixconcat($matrix1, $matrix2); - if ($result === false) { + $safeResult = \imageaffinematrixconcat($matrix1, $matrix2); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -199,11 +199,11 @@ function imageaffinematrixconcat(array $matrix1, array $matrix2): array function imageaffinematrixget(int $type, $options): array { error_clear_last(); - $result = \imageaffinematrixget($type, $options); - if ($result === false) { + $safeResult = \imageaffinematrixget($type, $options); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -229,8 +229,8 @@ function imageaffinematrixget(int $type, $options): array function imagealphablending($image, bool $enable): void { error_clear_last(); - $result = \imagealphablending($image, $enable); - if ($result === false) { + $safeResult = \imagealphablending($image, $enable); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -257,8 +257,8 @@ function imagealphablending($image, bool $enable): void function imageantialias($image, bool $enable): void { error_clear_last(); - $result = \imageantialias($image, $enable); - if ($result === false) { + $safeResult = \imageantialias($image, $enable); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -285,8 +285,8 @@ function imageantialias($image, bool $enable): void function imagearc($image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color): void { error_clear_last(); - $result = \imagearc($image, $center_x, $center_y, $width, $height, $start_angle, $end_angle, $color); - if ($result === false) { + $safeResult = \imagearc($image, $center_x, $center_y, $width, $height, $start_angle, $end_angle, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -311,15 +311,15 @@ function imageavif(\GdImage $image, $file = null, int $quality = -1, int $speed { error_clear_last(); if ($speed !== -1) { - $result = \imageavif($image, $file, $quality, $speed); + $safeResult = \imageavif($image, $file, $quality, $speed); } elseif ($quality !== -1) { - $result = \imageavif($image, $file, $quality); + $safeResult = \imageavif($image, $file, $quality); } elseif ($file !== null) { - $result = \imageavif($image, $file); + $safeResult = \imageavif($image, $file); } else { - $result = \imageavif($image); + $safeResult = \imageavif($image); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -342,13 +342,13 @@ function imagebmp($image, $file = null, bool $compressed = true): void { error_clear_last(); if ($compressed !== true) { - $result = \imagebmp($image, $file, $compressed); + $safeResult = \imagebmp($image, $file, $compressed); } elseif ($file !== null) { - $result = \imagebmp($image, $file); + $safeResult = \imagebmp($image, $file); } else { - $result = \imagebmp($image); + $safeResult = \imagebmp($image); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -376,8 +376,8 @@ function imagebmp($image, $file = null, bool $compressed = true): void function imagechar($image, int $font, int $x, int $y, string $char, int $color): void { error_clear_last(); - $result = \imagechar($image, $font, $x, $y, $char, $color); - if ($result === false) { + $safeResult = \imagechar($image, $font, $x, $y, $char, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -402,8 +402,8 @@ function imagechar($image, int $font, int $x, int $y, string $char, int $color): function imagecharup($image, int $font, int $x, int $y, string $char, int $color): void { error_clear_last(); - $result = \imagecharup($image, $font, $x, $y, $char, $color); - if ($result === false) { + $safeResult = \imagecharup($image, $font, $x, $y, $char, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -429,11 +429,11 @@ function imagecharup($image, int $font, int $x, int $y, string $char, int $color function imagecolorat($image, int $x, int $y): int { error_clear_last(); - $result = \imagecolorat($image, $x, $y); - if ($result === false) { + $safeResult = \imagecolorat($image, $x, $y); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -451,8 +451,8 @@ function imagecolorat($image, int $x, int $y): int function imagecolordeallocate($image, int $color): void { error_clear_last(); - $result = \imagecolordeallocate($image, $color); - if ($result === false) { + $safeResult = \imagecolordeallocate($image, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -470,8 +470,8 @@ function imagecolordeallocate($image, int $color): void function imagecolormatch($image1, $image2): void { error_clear_last(); - $result = \imagecolormatch($image1, $image2); - if ($result === false) { + $safeResult = \imagecolormatch($image1, $image2); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -496,8 +496,8 @@ function imagecolormatch($image1, $image2): void function imagecolorset($image, int $color, int $red, int $green, int $blue, int $alpha = 0): void { error_clear_last(); - $result = \imagecolorset($image, $color, $red, $green, $blue, $alpha); - if ($result === false) { + $safeResult = \imagecolorset($image, $color, $red, $green, $blue, $alpha); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -518,8 +518,8 @@ function imagecolorset($image, int $color, int $red, int $green, int $blue, int function imageconvolution($image, array $matrix, float $divisor, float $offset): void { error_clear_last(); - $result = \imageconvolution($image, $matrix, $divisor, $offset); - if ($result === false) { + $safeResult = \imageconvolution($image, $matrix, $divisor, $offset); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -548,8 +548,8 @@ function imageconvolution($image, array $matrix, float $divisor, float $offset): function imagecopy($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height): void { error_clear_last(); - $result = \imagecopy($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $src_width, $src_height); - if ($result === false) { + $safeResult = \imagecopy($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $src_width, $src_height); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -584,8 +584,8 @@ function imagecopy($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, i function imagecopymerge($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): void { error_clear_last(); - $result = \imagecopymerge($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $src_width, $src_height, $pct); - if ($result === false) { + $safeResult = \imagecopymerge($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $src_width, $src_height, $pct); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -624,8 +624,8 @@ function imagecopymerge($dst_image, $src_image, int $dst_x, int $dst_y, int $src function imagecopymergegray($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct): void { error_clear_last(); - $result = \imagecopymergegray($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $src_width, $src_height, $pct); - if ($result === false) { + $safeResult = \imagecopymergegray($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $src_width, $src_height, $pct); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -669,8 +669,8 @@ function imagecopymergegray($dst_image, $src_image, int $dst_x, int $dst_y, int function imagecopyresampled($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): void { error_clear_last(); - $result = \imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_width, $dst_height, $src_width, $src_height); - if ($result === false) { + $safeResult = \imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_width, $dst_height, $src_width, $src_height); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -714,8 +714,8 @@ function imagecopyresampled($dst_image, $src_image, int $dst_x, int $dst_y, int function imagecopyresized($dst_image, $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height): void { error_clear_last(); - $result = \imagecopyresized($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_width, $dst_height, $src_width, $src_height); - if ($result === false) { + $safeResult = \imagecopyresized($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_width, $dst_height, $src_width, $src_height); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -742,11 +742,11 @@ function imagecopyresized($dst_image, $src_image, int $dst_x, int $dst_y, int $s function imagecreate(int $width, int $height) { error_clear_last(); - $result = \imagecreate($width, $height); - if ($result === false) { + $safeResult = \imagecreate($width, $height); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -762,11 +762,11 @@ function imagecreate(int $width, int $height) function imagecreatefromavif(string $filename) { error_clear_last(); - $result = \imagecreatefromavif($filename); - if ($result === false) { + $safeResult = \imagecreatefromavif($filename); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -782,11 +782,11 @@ function imagecreatefromavif(string $filename) function imagecreatefrombmp(string $filename) { error_clear_last(); - $result = \imagecreatefrombmp($filename); - if ($result === false) { + $safeResult = \imagecreatefrombmp($filename); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -801,11 +801,11 @@ function imagecreatefrombmp(string $filename) function imagecreatefromgd(string $filename) { error_clear_last(); - $result = \imagecreatefromgd($filename); - if ($result === false) { + $safeResult = \imagecreatefromgd($filename); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -820,11 +820,11 @@ function imagecreatefromgd(string $filename) function imagecreatefromgd2(string $filename) { error_clear_last(); - $result = \imagecreatefromgd2($filename); - if ($result === false) { + $safeResult = \imagecreatefromgd2($filename); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -843,11 +843,11 @@ function imagecreatefromgd2(string $filename) function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, int $height) { error_clear_last(); - $result = \imagecreatefromgd2part($filename, $x, $y, $width, $height); - if ($result === false) { + $safeResult = \imagecreatefromgd2part($filename, $x, $y, $width, $height); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -863,11 +863,11 @@ function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, in function imagecreatefromgif(string $filename) { error_clear_last(); - $result = \imagecreatefromgif($filename); - if ($result === false) { + $safeResult = \imagecreatefromgif($filename); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -883,11 +883,11 @@ function imagecreatefromgif(string $filename) function imagecreatefromjpeg(string $filename) { error_clear_last(); - $result = \imagecreatefromjpeg($filename); - if ($result === false) { + $safeResult = \imagecreatefromjpeg($filename); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -903,11 +903,11 @@ function imagecreatefromjpeg(string $filename) function imagecreatefrompng(string $filename) { error_clear_last(); - $result = \imagecreatefrompng($filename); - if ($result === false) { + $safeResult = \imagecreatefrompng($filename); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -927,11 +927,11 @@ function imagecreatefrompng(string $filename) function imagecreatefromstring(string $data) { error_clear_last(); - $result = \imagecreatefromstring($data); - if ($result === false) { + $safeResult = \imagecreatefromstring($data); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -947,11 +947,11 @@ function imagecreatefromstring(string $data) function imagecreatefromtga(string $filename) { error_clear_last(); - $result = \imagecreatefromtga($filename); - if ($result === false) { + $safeResult = \imagecreatefromtga($filename); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -967,11 +967,11 @@ function imagecreatefromtga(string $filename) function imagecreatefromwbmp(string $filename) { error_clear_last(); - $result = \imagecreatefromwbmp($filename); - if ($result === false) { + $safeResult = \imagecreatefromwbmp($filename); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -988,11 +988,11 @@ function imagecreatefromwbmp(string $filename) function imagecreatefromwebp(string $filename) { error_clear_last(); - $result = \imagecreatefromwebp($filename); - if ($result === false) { + $safeResult = \imagecreatefromwebp($filename); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1008,11 +1008,11 @@ function imagecreatefromwebp(string $filename) function imagecreatefromxbm(string $filename) { error_clear_last(); - $result = \imagecreatefromxbm($filename); - if ($result === false) { + $safeResult = \imagecreatefromxbm($filename); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1028,11 +1028,11 @@ function imagecreatefromxbm(string $filename) function imagecreatefromxpm(string $filename) { error_clear_last(); - $result = \imagecreatefromxpm($filename); - if ($result === false) { + $safeResult = \imagecreatefromxpm($filename); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1049,11 +1049,11 @@ function imagecreatefromxpm(string $filename) function imagecreatetruecolor(int $width, int $height) { error_clear_last(); - $result = \imagecreatetruecolor($width, $height); - if ($result === false) { + $safeResult = \imagecreatetruecolor($width, $height); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1073,11 +1073,11 @@ function imagecreatetruecolor(int $width, int $height) function imagecrop($image, array $rectangle) { error_clear_last(); - $result = \imagecrop($image, $rectangle); - if ($result === false) { + $safeResult = \imagecrop($image, $rectangle); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1098,11 +1098,11 @@ function imagecrop($image, array $rectangle) function imagecropauto($image, int $mode = IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1) { error_clear_last(); - $result = \imagecropauto($image, $mode, $threshold, $color); - if ($result === false) { + $safeResult = \imagecropauto($image, $mode, $threshold, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1124,8 +1124,8 @@ function imagecropauto($image, int $mode = IMG_CROP_DEFAULT, float $threshold = function imagedashedline($image, int $x1, int $y1, int $x2, int $y2, int $color): void { error_clear_last(); - $result = \imagedashedline($image, $x1, $y1, $x2, $y2, $color); - if ($result === false) { + $safeResult = \imagedashedline($image, $x1, $y1, $x2, $y2, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1143,8 +1143,8 @@ function imagedashedline($image, int $x1, int $y1, int $x2, int $y2, int $color) function imagedestroy($image): void { error_clear_last(); - $result = \imagedestroy($image); - if ($result === false) { + $safeResult = \imagedestroy($image); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1166,8 +1166,8 @@ function imagedestroy($image): void function imageellipse($image, int $center_x, int $center_y, int $width, int $height, int $color): void { error_clear_last(); - $result = \imageellipse($image, $center_x, $center_y, $width, $height, $color); - if ($result === false) { + $safeResult = \imageellipse($image, $center_x, $center_y, $width, $height, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1189,8 +1189,8 @@ function imageellipse($image, int $center_x, int $center_y, int $width, int $hei function imagefill($image, int $x, int $y, int $color): void { error_clear_last(); - $result = \imagefill($image, $x, $y, $color); - if ($result === false) { + $safeResult = \imagefill($image, $x, $y, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1233,8 +1233,8 @@ function imagefill($image, int $x, int $y, int $color): void function imagefilledarc($image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color, int $style): void { error_clear_last(); - $result = \imagefilledarc($image, $center_x, $center_y, $width, $height, $start_angle, $end_angle, $color, $style); - if ($result === false) { + $safeResult = \imagefilledarc($image, $center_x, $center_y, $width, $height, $start_angle, $end_angle, $color, $style); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1257,8 +1257,8 @@ function imagefilledarc($image, int $center_x, int $center_y, int $width, int $h function imagefilledellipse($image, int $center_x, int $center_y, int $width, int $height, int $color): void { error_clear_last(); - $result = \imagefilledellipse($image, $center_x, $center_y, $width, $height, $color); - if ($result === false) { + $safeResult = \imagefilledellipse($image, $center_x, $center_y, $width, $height, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1282,8 +1282,8 @@ function imagefilledellipse($image, int $center_x, int $center_y, int $width, in function imagefilledrectangle($image, int $x1, int $y1, int $x2, int $y2, int $color): void { error_clear_last(); - $result = \imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color); - if ($result === false) { + $safeResult = \imagefilledrectangle($image, $x1, $y1, $x2, $y2, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1308,8 +1308,8 @@ function imagefilledrectangle($image, int $x1, int $y1, int $x2, int $y2, int $c function imagefilltoborder($image, int $x, int $y, int $border_color, int $color): void { error_clear_last(); - $result = \imagefilltoborder($image, $x, $y, $border_color, $color); - if ($result === false) { + $safeResult = \imagefilltoborder($image, $x, $y, $border_color, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1455,11 +1455,11 @@ function imagefilter($image, int $filter, int ...$args): void { error_clear_last(); if ($args !== []) { - $result = \imagefilter($image, $filter, ...$args); + $safeResult = \imagefilter($image, $filter, ...$args); } else { - $result = \imagefilter($image, $filter); + $safeResult = \imagefilter($image, $filter); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1509,8 +1509,8 @@ function imagefilter($image, int $filter, int ...$args): void function imageflip($image, int $mode): void { error_clear_last(); - $result = \imageflip($image, $mode); - if ($result === false) { + $safeResult = \imageflip($image, $mode); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1600,11 +1600,11 @@ function imageflip($image, int $mode): void function imageftbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array { error_clear_last(); - $result = \imageftbbox($size, $angle, $font_filename, $string, $options); - if ($result === false) { + $safeResult = \imageftbbox($size, $angle, $font_filename, $string, $options); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1709,11 +1709,11 @@ function imageftbbox(float $size, float $angle, string $font_filename, string $s function imagefttext($image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array { error_clear_last(); - $result = \imagefttext($image, $size, $angle, $x, $y, $color, $font_filename, $text, $options); - if ($result === false) { + $safeResult = \imagefttext($image, $size, $angle, $x, $y, $color, $font_filename, $text, $options); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1731,8 +1731,8 @@ function imagefttext($image, float $size, float $angle, int $x, int $y, int $col function imagegammacorrect($image, float $input_gamma, float $output_gamma): void { error_clear_last(); - $result = \imagegammacorrect($image, $input_gamma, $output_gamma); - if ($result === false) { + $safeResult = \imagegammacorrect($image, $input_gamma, $output_gamma); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1751,11 +1751,11 @@ function imagegd($image, $file = null): void { error_clear_last(); if ($file !== null) { - $result = \imagegd($image, $file); + $safeResult = \imagegd($image, $file); } else { - $result = \imagegd($image); + $safeResult = \imagegd($image); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1778,15 +1778,15 @@ function imagegd2($image, $file = null, int $chunk_size = 128, int $mode = IMG_G { error_clear_last(); if ($mode !== IMG_GD2_RAW) { - $result = \imagegd2($image, $file, $chunk_size, $mode); + $safeResult = \imagegd2($image, $file, $chunk_size, $mode); } elseif ($chunk_size !== 128) { - $result = \imagegd2($image, $file, $chunk_size); + $safeResult = \imagegd2($image, $file, $chunk_size); } elseif ($file !== null) { - $result = \imagegd2($image, $file); + $safeResult = \imagegd2($image, $file); } else { - $result = \imagegd2($image); + $safeResult = \imagegd2($image); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1814,11 +1814,11 @@ function imagegif($image, $file = null): void { error_clear_last(); if ($file !== null) { - $result = \imagegif($image, $file); + $safeResult = \imagegif($image, $file); } else { - $result = \imagegif($image); + $safeResult = \imagegif($image); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1834,11 +1834,11 @@ function imagegif($image, $file = null): void function imagegrabscreen() { error_clear_last(); - $result = \imagegrabscreen(); - if ($result === false) { + $safeResult = \imagegrabscreen(); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1854,11 +1854,11 @@ function imagegrabscreen() function imagegrabwindow(int $handle, bool $client_area = false): \GdImage { error_clear_last(); - $result = \imagegrabwindow($handle, $client_area); - if ($result === false) { + $safeResult = \imagegrabwindow($handle, $client_area); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1879,13 +1879,13 @@ function imagejpeg($image, $file = null, int $quality = -1): void { error_clear_last(); if ($quality !== -1) { - $result = \imagejpeg($image, $file, $quality); + $safeResult = \imagejpeg($image, $file, $quality); } elseif ($file !== null) { - $result = \imagejpeg($image, $file); + $safeResult = \imagejpeg($image, $file); } else { - $result = \imagejpeg($image); + $safeResult = \imagejpeg($image); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1949,8 +1949,8 @@ function imagejpeg($image, $file = null, int $quality = -1): void function imagelayereffect($image, int $effect): void { error_clear_last(); - $result = \imagelayereffect($image, $effect); - if ($result === false) { + $safeResult = \imagelayereffect($image, $effect); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -1972,8 +1972,8 @@ function imagelayereffect($image, int $effect): void function imageline($image, int $x1, int $y1, int $x2, int $y2, int $color): void { error_clear_last(); - $result = \imageline($image, $x1, $y1, $x2, $y2, $color); - if ($result === false) { + $safeResult = \imageline($image, $x1, $y1, $x2, $y2, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2038,11 +2038,11 @@ function imageline($image, int $x1, int $y1, int $x2, int $y2, int $color): void function imageloadfont(string $filename): int { error_clear_last(); - $result = \imageloadfont($filename); - if ($result === false) { + $safeResult = \imageloadfont($filename); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2072,15 +2072,15 @@ function imagepng($image, $file = null, int $quality = -1, int $filters = -1): v { error_clear_last(); if ($filters !== -1) { - $result = \imagepng($image, $file, $quality, $filters); + $safeResult = \imagepng($image, $file, $quality, $filters); } elseif ($quality !== -1) { - $result = \imagepng($image, $file, $quality); + $safeResult = \imagepng($image, $file, $quality); } elseif ($file !== null) { - $result = \imagepng($image, $file); + $safeResult = \imagepng($image, $file); } else { - $result = \imagepng($image); + $safeResult = \imagepng($image); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2104,8 +2104,8 @@ function imagepng($image, $file = null, int $quality = -1, int $filters = -1): v function imagerectangle($image, int $x1, int $y1, int $x2, int $y2, int $color): void { error_clear_last(); - $result = \imagerectangle($image, $x1, $y1, $x2, $y2, $color); - if ($result === false) { + $safeResult = \imagerectangle($image, $x1, $y1, $x2, $y2, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2140,16 +2140,16 @@ function imageresolution($image, int $resolution_x = null, int $resolution_y = n { error_clear_last(); if ($resolution_y !== null) { - $result = \imageresolution($image, $resolution_x, $resolution_y); + $safeResult = \imageresolution($image, $resolution_x, $resolution_y); } elseif ($resolution_x !== null) { - $result = \imageresolution($image, $resolution_x); + $safeResult = \imageresolution($image, $resolution_x); } else { - $result = \imageresolution($image); + $safeResult = \imageresolution($image); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2173,11 +2173,11 @@ function imageresolution($image, int $resolution_x = null, int $resolution_y = n function imagerotate($image, float $angle, int $background_color, bool $ignore_transparent = false) { error_clear_last(); - $result = \imagerotate($image, $angle, $background_color, $ignore_transparent); - if ($result === false) { + $safeResult = \imagerotate($image, $angle, $background_color, $ignore_transparent); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2198,8 +2198,8 @@ function imagerotate($image, float $angle, int $background_color, bool $ignore_t function imagesavealpha($image, bool $enable): void { error_clear_last(); - $result = \imagesavealpha($image, $enable); - if ($result === false) { + $safeResult = \imagesavealpha($image, $enable); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2231,11 +2231,11 @@ function imagesavealpha($image, bool $enable): void function imagescale($image, int $width, int $height = -1, int $mode = IMG_BILINEAR_FIXED) { error_clear_last(); - $result = \imagescale($image, $width, $height, $mode); - if ($result === false) { + $safeResult = \imagescale($image, $width, $height, $mode); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2255,8 +2255,8 @@ function imagescale($image, int $width, int $height = -1, int $mode = IMG_BILINE function imagesetbrush($image, $brush): void { error_clear_last(); - $result = \imagesetbrush($image, $brush); - if ($result === false) { + $safeResult = \imagesetbrush($image, $brush); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2278,8 +2278,8 @@ function imagesetbrush($image, $brush): void function imagesetclip($image, int $x1, int $y1, int $x2, int $y2): void { error_clear_last(); - $result = \imagesetclip($image, $x1, $y1, $x2, $y2); - if ($result === false) { + $safeResult = \imagesetclip($image, $x1, $y1, $x2, $y2); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2405,8 +2405,8 @@ function imagesetclip($image, int $x1, int $y1, int $x2, int $y2): void function imagesetinterpolation($image, int $method = IMG_BILINEAR_FIXED): void { error_clear_last(); - $result = \imagesetinterpolation($image, $method); - if ($result === false) { + $safeResult = \imagesetinterpolation($image, $method); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2427,8 +2427,8 @@ function imagesetinterpolation($image, int $method = IMG_BILINEAR_FIXED): void function imagesetpixel($image, int $x, int $y, int $color): void { error_clear_last(); - $result = \imagesetpixel($image, $x, $y, $color); - if ($result === false) { + $safeResult = \imagesetpixel($image, $x, $y, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2453,8 +2453,8 @@ function imagesetpixel($image, int $x, int $y, int $color): void function imagesetstyle($image, array $style): void { error_clear_last(); - $result = \imagesetstyle($image, $style); - if ($result === false) { + $safeResult = \imagesetstyle($image, $style); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2474,8 +2474,8 @@ function imagesetstyle($image, array $style): void function imagesetthickness($image, int $thickness): void { error_clear_last(); - $result = \imagesetthickness($image, $thickness); - if ($result === false) { + $safeResult = \imagesetthickness($image, $thickness); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2501,8 +2501,8 @@ function imagesetthickness($image, int $thickness): void function imagesettile($image, $tile): void { error_clear_last(); - $result = \imagesettile($image, $tile); - if ($result === false) { + $safeResult = \imagesettile($image, $tile); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2526,8 +2526,8 @@ function imagesettile($image, $tile): void function imagestring($image, int $font, int $x, int $y, string $string, int $color): void { error_clear_last(); - $result = \imagestring($image, $font, $x, $y, $string, $color); - if ($result === false) { + $safeResult = \imagestring($image, $font, $x, $y, $string, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2552,8 +2552,8 @@ function imagestring($image, int $font, int $x, int $y, string $string, int $col function imagestringup($image, int $font, int $x, int $y, string $string, int $color): void { error_clear_last(); - $result = \imagestringup($image, $font, $x, $y, $string, $color); - if ($result === false) { + $safeResult = \imagestringup($image, $font, $x, $y, $string, $color); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2571,11 +2571,11 @@ function imagestringup($image, int $font, int $x, int $y, string $string, int $c function imagesx($image): int { error_clear_last(); - $result = \imagesx($image); - if ($result === false) { + $safeResult = \imagesx($image); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2591,11 +2591,11 @@ function imagesx($image): int function imagesy($image): int { error_clear_last(); - $result = \imagesy($image); - if ($result === false) { + $safeResult = \imagesy($image); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2621,8 +2621,8 @@ function imagesy($image): int function imagetruecolortopalette($image, bool $dither, int $num_colors): void { error_clear_last(); - $result = \imagetruecolortopalette($image, $dither, $num_colors); - if ($result === false) { + $safeResult = \imagetruecolortopalette($image, $dither, $num_colors); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2716,11 +2716,11 @@ function imagetruecolortopalette($image, bool $dither, int $num_colors): void function imagettfbbox(float $size, float $angle, string $font_filename, string $string, array $options = []): array { error_clear_last(); - $result = \imagettfbbox($size, $angle, $font_filename, $string, $options); - if ($result === false) { + $safeResult = \imagettfbbox($size, $angle, $font_filename, $string, $options); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2793,11 +2793,11 @@ function imagettfbbox(float $size, float $angle, string $font_filename, string $ function imagettftext($image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []): array { error_clear_last(); - $result = \imagettftext($image, $size, $angle, $x, $y, $color, $font_filename, $text, $options); - if ($result === false) { + $safeResult = \imagettftext($image, $size, $angle, $x, $y, $color, $font_filename, $text, $options); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2818,13 +2818,13 @@ function imagewbmp($image, $file = null, int $foreground_color = null): void { error_clear_last(); if ($foreground_color !== null) { - $result = \imagewbmp($image, $file, $foreground_color); + $safeResult = \imagewbmp($image, $file, $foreground_color); } elseif ($file !== null) { - $result = \imagewbmp($image, $file); + $safeResult = \imagewbmp($image, $file); } else { - $result = \imagewbmp($image); + $safeResult = \imagewbmp($image); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2845,13 +2845,13 @@ function imagewebp($image, $file = null, int $quality = -1): void { error_clear_last(); if ($quality !== -1) { - $result = \imagewebp($image, $file, $quality); + $safeResult = \imagewebp($image, $file, $quality); } elseif ($file !== null) { - $result = \imagewebp($image, $file); + $safeResult = \imagewebp($image, $file); } else { - $result = \imagewebp($image); + $safeResult = \imagewebp($image); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2881,11 +2881,11 @@ function imagexbm($image, $filename, int $foreground_color = null): void { error_clear_last(); if ($foreground_color !== null) { - $result = \imagexbm($image, $filename, $foreground_color); + $safeResult = \imagexbm($image, $filename, $foreground_color); } else { - $result = \imagexbm($image, $filename); + $safeResult = \imagexbm($image, $filename); } - if ($result === false) { + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2905,11 +2905,11 @@ function imagexbm($image, $filename, int $foreground_color = null): void function iptcembed(string $iptc_data, string $filename, int $spool = 0) { error_clear_last(); - $result = \iptcembed($iptc_data, $filename, $spool); - if ($result === false) { + $safeResult = \iptcembed($iptc_data, $filename, $spool); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2925,11 +2925,11 @@ function iptcembed(string $iptc_data, string $filename, int $spool = 0) function iptcparse(string $iptc_block): array { error_clear_last(); - $result = \iptcparse($iptc_block); - if ($result === false) { + $safeResult = \iptcparse($iptc_block); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2947,8 +2947,8 @@ function iptcparse(string $iptc_block): array function jpeg2wbmp(string $jpegname, string $wbmpname, int $dest_height, int $dest_width, int $threshold): void { error_clear_last(); - $result = \jpeg2wbmp($jpegname, $wbmpname, $dest_height, $dest_width, $threshold); - if ($result === false) { + $safeResult = \jpeg2wbmp($jpegname, $wbmpname, $dest_height, $dest_width, $threshold); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } @@ -2968,8 +2968,9 @@ function jpeg2wbmp(string $jpegname, string $wbmpname, int $dest_height, int $de function png2wbmp(string $pngname, string $wbmpname, int $dest_height, int $dest_width, int $threshold): void { error_clear_last(); - $result = \png2wbmp($pngname, $wbmpname, $dest_height, $dest_width, $threshold); - if ($result === false) { + $safeResult = \png2wbmp($pngname, $wbmpname, $dest_height, $dest_width, $threshold); + if ($safeResult === false) { throw ImageException::createFromPhpError(); } } + diff --git a/generated/imap.php b/generated/imap.php index 917a8e20..6cc70047 100644 --- a/generated/imap.php +++ b/generated/imap.php @@ -16,11 +16,11 @@ function imap_8bit(string $string): string { error_clear_last(); - $result = \imap_8bit($string); - if ($result === false) { + $safeResult = \imap_8bit($string); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -45,13 +45,13 @@ function imap_append($imap, string $folder, string $message, string $options = n { error_clear_last(); if ($internal_date !== null) { - $result = \imap_append($imap, $folder, $message, $options, $internal_date); + $safeResult = \imap_append($imap, $folder, $message, $options, $internal_date); } elseif ($options !== null) { - $result = \imap_append($imap, $folder, $message, $options); + $safeResult = \imap_append($imap, $folder, $message, $options); } else { - $result = \imap_append($imap, $folder, $message); + $safeResult = \imap_append($imap, $folder, $message); } - if ($result === false) { + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -68,11 +68,11 @@ function imap_append($imap, string $folder, string $message, string $options = n function imap_base64(string $string): string { error_clear_last(); - $result = \imap_base64($string); - if ($result === false) { + $safeResult = \imap_base64($string); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -87,11 +87,11 @@ function imap_base64(string $string): string function imap_binary(string $string): string { error_clear_last(); - $result = \imap_binary($string); - if ($result === false) { + $safeResult = \imap_binary($string); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -135,11 +135,11 @@ function imap_binary(string $string): string function imap_body($imap, int $message_num, int $flags = 0): string { error_clear_last(); - $result = \imap_body($imap, $message_num, $flags); - if ($result === false) { + $safeResult = \imap_body($imap, $message_num, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -159,11 +159,11 @@ function imap_body($imap, int $message_num, int $flags = 0): string function imap_bodystruct($imap, int $message_num, string $section): \stdClass { error_clear_last(); - $result = \imap_bodystruct($imap, $message_num, $section); - if ($result === false) { + $safeResult = \imap_bodystruct($imap, $message_num, $section); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -208,11 +208,11 @@ function imap_bodystruct($imap, int $message_num, string $section): \stdClass function imap_check($imap): \stdClass { error_clear_last(); - $result = \imap_check($imap); - if ($result === false) { + $safeResult = \imap_check($imap); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -243,8 +243,8 @@ function imap_check($imap): \stdClass function imap_clearflag_full($imap, string $sequence, string $flag, int $options = 0): void { error_clear_last(); - $result = \imap_clearflag_full($imap, $sequence, $flag, $options); - if ($result === false) { + $safeResult = \imap_clearflag_full($imap, $sequence, $flag, $options); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -264,8 +264,8 @@ function imap_clearflag_full($imap, string $sequence, string $flag, int $options function imap_close($imap, int $flags = 0): void { error_clear_last(); - $result = \imap_close($imap, $flags); - if ($result === false) { + $safeResult = \imap_close($imap, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -284,8 +284,8 @@ function imap_close($imap, int $flags = 0): void function imap_createmailbox($imap, string $mailbox): void { error_clear_last(); - $result = \imap_createmailbox($imap, $mailbox); - if ($result === false) { + $safeResult = \imap_createmailbox($imap, $mailbox); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -303,8 +303,8 @@ function imap_createmailbox($imap, string $mailbox): void function imap_deletemailbox($imap, string $mailbox): void { error_clear_last(); - $result = \imap_deletemailbox($imap, $mailbox); - if ($result === false) { + $safeResult = \imap_deletemailbox($imap, $mailbox); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -419,11 +419,11 @@ function imap_deletemailbox($imap, string $mailbox): void function imap_fetch_overview($imap, string $sequence, int $flags = 0): array { error_clear_last(); - $result = \imap_fetch_overview($imap, $sequence, $flags); - if ($result === false) { + $safeResult = \imap_fetch_overview($imap, $sequence, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -463,11 +463,11 @@ function imap_fetch_overview($imap, string $sequence, int $flags = 0): array function imap_fetchbody($imap, int $message_num, string $section, int $flags = 0): string { error_clear_last(); - $result = \imap_fetchbody($imap, $message_num, $section, $flags); - if ($result === false) { + $safeResult = \imap_fetchbody($imap, $message_num, $section, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -508,11 +508,11 @@ function imap_fetchbody($imap, int $message_num, string $section, int $flags = 0 function imap_fetchheader($imap, int $message_num, int $flags = 0): string { error_clear_last(); - $result = \imap_fetchheader($imap, $message_num, $flags); - if ($result === false) { + $safeResult = \imap_fetchheader($imap, $message_num, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -551,11 +551,11 @@ function imap_fetchheader($imap, int $message_num, int $flags = 0): string function imap_fetchmime($imap, int $message_num, string $section, int $flags = 0): string { error_clear_last(); - $result = \imap_fetchmime($imap, $message_num, $section, $flags); - if ($result === false) { + $safeResult = \imap_fetchmime($imap, $message_num, $section, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -698,11 +698,11 @@ function imap_fetchmime($imap, int $message_num, string $section, int $flags = 0 function imap_fetchstructure($imap, int $message_num, int $flags = 0): \stdClass { error_clear_last(); - $result = \imap_fetchstructure($imap, $message_num, $flags); - if ($result === false) { + $safeResult = \imap_fetchstructure($imap, $message_num, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -721,8 +721,8 @@ function imap_fetchstructure($imap, int $message_num, int $flags = 0): \stdClass function imap_gc($imap, int $flags): void { error_clear_last(); - $result = \imap_gc($imap, $flags); - if ($result === false) { + $safeResult = \imap_gc($imap, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -741,11 +741,11 @@ function imap_gc($imap, int $flags): void function imap_getacl($imap, string $mailbox): array { error_clear_last(); - $result = \imap_getacl($imap, $mailbox); - if ($result === false) { + $safeResult = \imap_getacl($imap, $mailbox); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -827,11 +827,11 @@ function imap_getacl($imap, string $mailbox): array function imap_getmailboxes($imap, string $reference, string $pattern): array { error_clear_last(); - $result = \imap_getmailboxes($imap, $reference, $pattern); - if ($result === false) { + $safeResult = \imap_getmailboxes($imap, $reference, $pattern); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -913,11 +913,11 @@ function imap_getmailboxes($imap, string $reference, string $pattern): array function imap_getsubscribed($imap, string $reference, string $pattern): array { error_clear_last(); - $result = \imap_getsubscribed($imap, $reference, $pattern); - if ($result === false) { + $safeResult = \imap_getsubscribed($imap, $reference, $pattern); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1138,11 +1138,11 @@ function imap_getsubscribed($imap, string $reference, string $pattern): array function imap_headerinfo($imap, int $message_num, int $from_length = 0, int $subject_length = 0): \stdClass { error_clear_last(); - $result = \imap_headerinfo($imap, $message_num, $from_length, $subject_length); - if ($result === false) { + $safeResult = \imap_headerinfo($imap, $message_num, $from_length, $subject_length); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1159,11 +1159,11 @@ function imap_headerinfo($imap, int $message_num, int $from_length = 0, int $sub function imap_headers($imap): array { error_clear_last(); - $result = \imap_headers($imap); - if ($result === false) { + $safeResult = \imap_headers($imap); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1201,11 +1201,11 @@ function imap_headers($imap): array function imap_listscan($imap, string $reference, string $pattern, string $content): array { error_clear_last(); - $result = \imap_listscan($imap, $reference, $pattern, $content); - if ($result === false) { + $safeResult = \imap_listscan($imap, $reference, $pattern, $content); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1236,11 +1236,11 @@ function imap_listscan($imap, string $reference, string $pattern, string $conten function imap_lsub($imap, string $reference, string $pattern): array { error_clear_last(); - $result = \imap_lsub($imap, $reference, $pattern); - if ($result === false) { + $safeResult = \imap_lsub($imap, $reference, $pattern); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1354,11 +1354,11 @@ function imap_lsub($imap, string $reference, string $pattern): array function imap_mail_compose(array $envelope, array $bodies): string { error_clear_last(); - $result = \imap_mail_compose($envelope, $bodies); - if ($result === false) { + $safeResult = \imap_mail_compose($envelope, $bodies); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1392,8 +1392,8 @@ function imap_mail_compose(array $envelope, array $bodies): string function imap_mail_copy($imap, string $message_nums, string $mailbox, int $flags = 0): void { error_clear_last(); - $result = \imap_mail_copy($imap, $message_nums, $mailbox, $flags); - if ($result === false) { + $safeResult = \imap_mail_copy($imap, $message_nums, $mailbox, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -1425,8 +1425,8 @@ function imap_mail_copy($imap, string $message_nums, string $mailbox, int $flags function imap_mail_move($imap, string $message_nums, string $mailbox, int $flags = 0): void { error_clear_last(); - $result = \imap_mail_move($imap, $message_nums, $mailbox, $flags); - if ($result === false) { + $safeResult = \imap_mail_move($imap, $message_nums, $mailbox, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -1456,17 +1456,17 @@ function imap_mail(string $to, string $subject, string $message, string $additio { error_clear_last(); if ($return_path !== null) { - $result = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc, $return_path); + $safeResult = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc, $return_path); } elseif ($bcc !== null) { - $result = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc); + $safeResult = \imap_mail($to, $subject, $message, $additional_headers, $cc, $bcc); } elseif ($cc !== null) { - $result = \imap_mail($to, $subject, $message, $additional_headers, $cc); + $safeResult = \imap_mail($to, $subject, $message, $additional_headers, $cc); } elseif ($additional_headers !== null) { - $result = \imap_mail($to, $subject, $message, $additional_headers); + $safeResult = \imap_mail($to, $subject, $message, $additional_headers); } else { - $result = \imap_mail($to, $subject, $message); + $safeResult = \imap_mail($to, $subject, $message); } - if ($result === false) { + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -1527,11 +1527,11 @@ function imap_mail(string $to, string $subject, string $message, string $additio function imap_mailboxmsginfo($imap): \stdClass { error_clear_last(); - $result = \imap_mailboxmsginfo($imap); - if ($result === false) { + $safeResult = \imap_mailboxmsginfo($imap); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1554,11 +1554,11 @@ function imap_mailboxmsginfo($imap): \stdClass function imap_mime_header_decode(string $string): array { error_clear_last(); - $result = \imap_mime_header_decode($string); - if ($result === false) { + $safeResult = \imap_mime_header_decode($string); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1573,11 +1573,11 @@ function imap_mime_header_decode(string $string): array function imap_mutf7_to_utf8(string $string): string { error_clear_last(); - $result = \imap_mutf7_to_utf8($string); - if ($result === false) { + $safeResult = \imap_mutf7_to_utf8($string); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1592,11 +1592,11 @@ function imap_mutf7_to_utf8(string $string): string function imap_num_msg($imap): int { error_clear_last(); - $result = \imap_num_msg($imap); - if ($result === false) { + $safeResult = \imap_num_msg($imap); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1807,11 +1807,11 @@ function imap_num_msg($imap): int function imap_open(string $mailbox, string $user, string $password, int $flags = 0, int $retries = 0, array $options = []) { error_clear_last(); - $result = \imap_open($mailbox, $user, $password, $flags, $retries, $options); - if ($result === false) { + $safeResult = \imap_open($mailbox, $user, $password, $flags, $retries, $options); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1826,11 +1826,11 @@ function imap_open(string $mailbox, string $user, string $password, int $flags = function imap_qprint(string $string): string { error_clear_last(); - $result = \imap_qprint($string); - if ($result === false) { + $safeResult = \imap_qprint($string); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1850,8 +1850,8 @@ function imap_qprint(string $string): string function imap_renamemailbox($imap, string $from, string $to): void { error_clear_last(); - $result = \imap_renamemailbox($imap, $from, $to); - if ($result === false) { + $safeResult = \imap_renamemailbox($imap, $from, $to); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -1871,11 +1871,11 @@ function imap_renamemailbox($imap, string $from, string $to): void function imap_rfc822_write_address(?string $mailbox, ?string $hostname, ?string $personal): string { error_clear_last(); - $result = \imap_rfc822_write_address($mailbox, $hostname, $personal); - if ($result === false) { + $safeResult = \imap_rfc822_write_address($mailbox, $hostname, $personal); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1914,8 +1914,8 @@ function imap_rfc822_write_address(?string $mailbox, ?string $hostname, ?string function imap_savebody($imap, $file, int $message_num, string $section = "", int $flags = 0): void { error_clear_last(); - $result = \imap_savebody($imap, $file, $message_num, $section, $flags); - if ($result === false) { + $safeResult = \imap_savebody($imap, $file, $message_num, $section, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -1934,8 +1934,8 @@ function imap_savebody($imap, $file, int $message_num, string $section = "", int function imap_set_quota($imap, string $quota_root, int $mailbox_size): void { error_clear_last(); - $result = \imap_set_quota($imap, $quota_root, $mailbox_size); - if ($result === false) { + $safeResult = \imap_set_quota($imap, $quota_root, $mailbox_size); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -1956,8 +1956,8 @@ function imap_set_quota($imap, string $quota_root, int $mailbox_size): void function imap_setacl($imap, string $mailbox, string $user_id, string $rights): void { error_clear_last(); - $result = \imap_setacl($imap, $mailbox, $user_id, $rights); - if ($result === false) { + $safeResult = \imap_setacl($imap, $mailbox, $user_id, $rights); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -1991,8 +1991,8 @@ function imap_setacl($imap, string $mailbox, string $user_id, string $rights): v function imap_setflag_full($imap, string $sequence, string $flag, int $options = 0): void { error_clear_last(); - $result = \imap_setflag_full($imap, $sequence, $flag, $options); - if ($result === false) { + $safeResult = \imap_setflag_full($imap, $sequence, $flag, $options); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -2067,16 +2067,16 @@ function imap_sort($imap, int $criteria, int $reverse, int $flags = 0, string $s { error_clear_last(); if ($charset !== null) { - $result = \imap_sort($imap, $criteria, $reverse, $flags, $search_criteria, $charset); + $safeResult = \imap_sort($imap, $criteria, $reverse, $flags, $search_criteria, $charset); } elseif ($search_criteria !== null) { - $result = \imap_sort($imap, $criteria, $reverse, $flags, $search_criteria); + $safeResult = \imap_sort($imap, $criteria, $reverse, $flags, $search_criteria); } else { - $result = \imap_sort($imap, $criteria, $reverse, $flags); + $safeResult = \imap_sort($imap, $criteria, $reverse, $flags); } - if ($result === false) { + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2138,11 +2138,11 @@ function imap_sort($imap, int $criteria, int $reverse, int $flags = 0, string $s function imap_status($imap, string $mailbox, int $flags): \stdClass { error_clear_last(); - $result = \imap_status($imap, $mailbox, $flags); - if ($result === false) { + $safeResult = \imap_status($imap, $mailbox, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2158,8 +2158,8 @@ function imap_status($imap, string $mailbox, int $flags): \stdClass function imap_subscribe($imap, string $mailbox): void { error_clear_last(); - $result = \imap_subscribe($imap, $mailbox); - if ($result === false) { + $safeResult = \imap_subscribe($imap, $mailbox); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -2192,11 +2192,11 @@ function imap_subscribe($imap, string $mailbox): void function imap_thread($imap, int $flags = SE_FREE): array { error_clear_last(); - $result = \imap_thread($imap, $flags); - if ($result === false) { + $safeResult = \imap_thread($imap, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2221,11 +2221,11 @@ function imap_thread($imap, int $flags = SE_FREE): array function imap_timeout(int $timeout_type, int $timeout = -1) { error_clear_last(); - $result = \imap_timeout($timeout_type, $timeout); - if ($result === false) { + $safeResult = \imap_timeout($timeout_type, $timeout); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -2244,8 +2244,8 @@ function imap_timeout(int $timeout_type, int $timeout = -1) function imap_undelete($imap, string $message_nums, int $flags = 0): void { error_clear_last(); - $result = \imap_undelete($imap, $message_nums, $flags); - if ($result === false) { + $safeResult = \imap_undelete($imap, $message_nums, $flags); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -2263,8 +2263,8 @@ function imap_undelete($imap, string $message_nums, int $flags = 0): void function imap_unsubscribe($imap, string $mailbox): void { error_clear_last(); - $result = \imap_unsubscribe($imap, $mailbox); - if ($result === false) { + $safeResult = \imap_unsubscribe($imap, $mailbox); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } } @@ -2281,9 +2281,10 @@ function imap_unsubscribe($imap, string $mailbox): void function imap_utf8_to_mutf7(string $string): string { error_clear_last(); - $result = \imap_utf8_to_mutf7($string); - if ($result === false) { + $safeResult = \imap_utf8_to_mutf7($string); + if ($safeResult === false) { throw ImapException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/info.php b/generated/info.php index aefa0819..4a556f6e 100644 --- a/generated/info.php +++ b/generated/info.php @@ -110,14 +110,14 @@ function assert_options(int $what, $value = null) { error_clear_last(); if ($value !== null) { - $result = \assert_options($what, $value); + $safeResult = \assert_options($what, $value); } else { - $result = \assert_options($what); + $safeResult = \assert_options($what); } - if ($result === false) { + if ($safeResult === false) { throw InfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -133,8 +133,8 @@ function assert_options(int $what, $value = null) function cli_set_process_title(string $title): void { error_clear_last(); - $result = \cli_set_process_title($title); - if ($result === false) { + $safeResult = \cli_set_process_title($title); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } } @@ -197,8 +197,8 @@ function cli_set_process_title(string $title): void function dl(string $extension_filename): void { error_clear_last(); - $result = \dl($extension_filename); - if ($result === false) { + $safeResult = \dl($extension_filename); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } } @@ -214,11 +214,11 @@ function dl(string $extension_filename): void function get_include_path(): string { error_clear_last(); - $result = \get_include_path(); - if ($result === false) { + $safeResult = \get_include_path(); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -237,11 +237,11 @@ function get_include_path(): string function getlastmod(): int { error_clear_last(); - $result = \getlastmod(); - if ($result === false) { + $safeResult = \getlastmod(); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -255,11 +255,11 @@ function getlastmod(): int function getmygid(): int { error_clear_last(); - $result = \getmygid(); - if ($result === false) { + $safeResult = \getmygid(); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -273,11 +273,11 @@ function getmygid(): int function getmyinode(): int { error_clear_last(); - $result = \getmyinode(); - if ($result === false) { + $safeResult = \getmyinode(); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -291,11 +291,11 @@ function getmyinode(): int function getmypid(): int { error_clear_last(); - $result = \getmypid(); - if ($result === false) { + $safeResult = \getmypid(); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -309,11 +309,11 @@ function getmypid(): int function getmyuid(): int { error_clear_last(); - $result = \getmyuid(); - if ($result === false) { + $safeResult = \getmyuid(); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -330,11 +330,11 @@ function getmyuid(): int function getopt(string $short_options, array $long_options = [], ?int &$rest_index = null): array { error_clear_last(); - $result = \getopt($short_options, $long_options, $rest_index); - if ($result === false) { + $safeResult = \getopt($short_options, $long_options, $rest_index); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -353,11 +353,11 @@ function getopt(string $short_options, array $long_options = [], ?int &$rest_ind function getrusage(int $mode = 0): array { error_clear_last(); - $result = \getrusage($mode); - if ($result === false) { + $safeResult = \getrusage($mode); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -374,11 +374,11 @@ function getrusage(int $mode = 0): array function ini_get(string $option): string { error_clear_last(); - $result = \ini_get($option); - if ($result === false) { + $safeResult = \ini_get($option); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -398,11 +398,11 @@ function ini_get(string $option): string function ini_set(string $option, string $value): string { error_clear_last(); - $result = \ini_set($option, $value); - if ($result === false) { + $safeResult = \ini_set($option, $value); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -425,11 +425,11 @@ function ini_set(string $option, string $value): string function php_sapi_name(): string { error_clear_last(); - $result = \php_sapi_name(); - if ($result === false) { + $safeResult = \php_sapi_name(); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -505,8 +505,8 @@ function php_sapi_name(): string function phpcredits(int $flags = CREDITS_ALL): void { error_clear_last(); - $result = \phpcredits($flags); - if ($result === false) { + $safeResult = \phpcredits($flags); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } } @@ -615,8 +615,8 @@ function phpcredits(int $flags = CREDITS_ALL): void function phpinfo(int $flags = INFO_ALL): void { error_clear_last(); - $result = \phpinfo($flags); - if ($result === false) { + $safeResult = \phpinfo($flags); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } } @@ -635,8 +635,8 @@ function phpinfo(int $flags = INFO_ALL): void function putenv(string $assignment): void { error_clear_last(); - $result = \putenv($assignment); - if ($result === false) { + $safeResult = \putenv($assignment); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } } @@ -655,11 +655,11 @@ function putenv(string $assignment): void function set_include_path(string $include_path): string { error_clear_last(); - $result = \set_include_path($include_path); - if ($result === false) { + $safeResult = \set_include_path($include_path); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -683,8 +683,9 @@ function set_include_path(string $include_path): string function set_time_limit(int $seconds): void { error_clear_last(); - $result = \set_time_limit($seconds); - if ($result === false) { + $safeResult = \set_time_limit($seconds); + if ($safeResult === false) { throw InfoException::createFromPhpError(); } } + diff --git a/generated/inotify.php b/generated/inotify.php index 2e070415..1a4f93ff 100644 --- a/generated/inotify.php +++ b/generated/inotify.php @@ -15,11 +15,11 @@ function inotify_init() { error_clear_last(); - $result = \inotify_init(); - if ($result === false) { + $safeResult = \inotify_init(); + if ($safeResult === false) { throw InotifyException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -37,8 +37,9 @@ function inotify_init() function inotify_rm_watch($inotify_instance, int $watch_descriptor): void { error_clear_last(); - $result = \inotify_rm_watch($inotify_instance, $watch_descriptor); - if ($result === false) { + $safeResult = \inotify_rm_watch($inotify_instance, $watch_descriptor); + if ($safeResult === false) { throw InotifyException::createFromPhpError(); } } + diff --git a/generated/json.php b/generated/json.php index e524c617..ae58e2b7 100644 --- a/generated/json.php +++ b/generated/json.php @@ -50,9 +50,10 @@ function json_encode($value, int $flags = 0, int $depth = 512): string { error_clear_last(); - $result = \json_encode($value, $flags, $depth); - if ($result === false) { + $safeResult = \json_encode($value, $flags, $depth); + if ($safeResult === false) { throw JsonException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/ldap.php b/generated/ldap.php index f6ba0f2f..15d673a3 100644 --- a/generated/ldap.php +++ b/generated/ldap.php @@ -20,11 +20,11 @@ function ldap_8859_to_t61(string $value): string { error_clear_last(); - $result = \ldap_8859_to_t61($value); - if ($result === false) { + $safeResult = \ldap_8859_to_t61($value); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -51,11 +51,11 @@ function ldap_add($ldap, string $dn, array $entry, array $controls = null): void { error_clear_last(); if ($controls !== null) { - $result = \ldap_add($ldap, $dn, $entry, $controls); + $safeResult = \ldap_add($ldap, $dn, $entry, $controls); } else { - $result = \ldap_add($ldap, $dn, $entry); + $safeResult = \ldap_add($ldap, $dn, $entry); } - if ($result === false) { + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -74,13 +74,13 @@ function ldap_bind($ldap, ?string $dn = null, ?string $password = null): void { error_clear_last(); if ($password !== null) { - $result = \ldap_bind($ldap, $dn, $password); + $safeResult = \ldap_bind($ldap, $dn, $password); } elseif ($dn !== null) { - $result = \ldap_bind($ldap, $dn); + $safeResult = \ldap_bind($ldap, $dn); } else { - $result = \ldap_bind($ldap); + $safeResult = \ldap_bind($ldap); } - if ($result === false) { + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -99,8 +99,8 @@ function ldap_bind($ldap, ?string $dn = null, ?string $password = null): void function ldap_control_paged_result_response($link, $result, ?string &$cookie = null, ?int &$estimated = null): void { error_clear_last(); - $result = \ldap_control_paged_result_response($link, $result, $cookie, $estimated); - if ($result === false) { + $safeResult = \ldap_control_paged_result_response($link, $result, $cookie, $estimated); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -122,8 +122,8 @@ function ldap_control_paged_result_response($link, $result, ?string &$cookie = n function ldap_control_paged_result($link, int $pagesize, bool $iscritical = false, string $cookie = ""): void { error_clear_last(); - $result = \ldap_control_paged_result($link, $pagesize, $iscritical, $cookie); - if ($result === false) { + $safeResult = \ldap_control_paged_result($link, $pagesize, $iscritical, $cookie); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -142,11 +142,11 @@ function ldap_control_paged_result($link, int $pagesize, bool $iscritical = fals function ldap_count_entries($ldap, $result): int { error_clear_last(); - $result = \ldap_count_entries($ldap, $result); - if ($result === false) { + $safeResult = \ldap_count_entries($ldap, $result); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -163,11 +163,11 @@ function ldap_delete($ldap, string $dn, array $controls = null): void { error_clear_last(); if ($controls !== null) { - $result = \ldap_delete($ldap, $dn, $controls); + $safeResult = \ldap_delete($ldap, $dn, $controls); } else { - $result = \ldap_delete($ldap, $dn); + $safeResult = \ldap_delete($ldap, $dn); } - if ($result === false) { + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -185,11 +185,11 @@ function ldap_delete($ldap, string $dn, array $controls = null): void function ldap_dn2ufn(string $dn): string { error_clear_last(); - $result = \ldap_dn2ufn($dn); - if ($result === false) { + $safeResult = \ldap_dn2ufn($dn); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -211,11 +211,11 @@ function ldap_dn2ufn(string $dn): string function ldap_exop_passwd($ldap, string $user = "", string $old_password = "", string $new_password = "", array &$controls = null) { error_clear_last(); - $result = \ldap_exop_passwd($ldap, $user, $old_password, $new_password, $controls); - if ($result === false) { + $safeResult = \ldap_exop_passwd($ldap, $user, $old_password, $new_password, $controls); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -230,11 +230,11 @@ function ldap_exop_passwd($ldap, string $user = "", string $old_password = "", s function ldap_exop_whoami($ldap) { error_clear_last(); - $result = \ldap_exop_whoami($ldap); - if ($result === false) { + $safeResult = \ldap_exop_whoami($ldap); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -260,20 +260,20 @@ function ldap_exop($ldap, string $request_oid, string $request_data = null, ?arr { error_clear_last(); if ($response_oid !== null) { - $result = \ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data, $response_oid); + $safeResult = \ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data, $response_oid); } elseif ($response_data !== null) { - $result = \ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data); + $safeResult = \ldap_exop($ldap, $request_oid, $request_data, $controls, $response_data); } elseif ($controls !== null) { - $result = \ldap_exop($ldap, $request_oid, $request_data, $controls); + $safeResult = \ldap_exop($ldap, $request_oid, $request_data, $controls); } elseif ($request_data !== null) { - $result = \ldap_exop($ldap, $request_oid, $request_data); + $safeResult = \ldap_exop($ldap, $request_oid, $request_data); } else { - $result = \ldap_exop($ldap, $request_oid); + $safeResult = \ldap_exop($ldap, $request_oid); } - if ($result === false) { + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -297,11 +297,11 @@ function ldap_exop($ldap, string $request_oid, string $request_data = null, ?arr function ldap_explode_dn(string $dn, int $with_attrib): array { error_clear_last(); - $result = \ldap_explode_dn($dn, $with_attrib); - if ($result === false) { + $safeResult = \ldap_explode_dn($dn, $with_attrib); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -322,11 +322,11 @@ function ldap_explode_dn(string $dn, int $with_attrib): array function ldap_first_attribute($ldap, $entry): string { error_clear_last(); - $result = \ldap_first_attribute($ldap, $entry); - if ($result === false) { + $safeResult = \ldap_first_attribute($ldap, $entry); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -348,11 +348,11 @@ function ldap_first_attribute($ldap, $entry): string function ldap_first_entry($ldap, $result) { error_clear_last(); - $result = \ldap_first_entry($ldap, $result); - if ($result === false) { + $safeResult = \ldap_first_entry($ldap, $result); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -372,8 +372,8 @@ function ldap_first_entry($ldap, $result) function ldap_free_result($result): void { error_clear_last(); - $result = \ldap_free_result($result); - if ($result === false) { + $safeResult = \ldap_free_result($result); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -404,11 +404,11 @@ function ldap_free_result($result): void function ldap_get_attributes($ldap, $entry): array { error_clear_last(); - $result = \ldap_get_attributes($ldap, $entry); - if ($result === false) { + $safeResult = \ldap_get_attributes($ldap, $entry); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -424,11 +424,11 @@ function ldap_get_attributes($ldap, $entry): array function ldap_get_dn($ldap, $entry): string { error_clear_last(); - $result = \ldap_get_dn($ldap, $entry); - if ($result === false) { + $safeResult = \ldap_get_dn($ldap, $entry); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -456,11 +456,11 @@ function ldap_get_dn($ldap, $entry): string function ldap_get_entries($ldap, $result): array { error_clear_last(); - $result = \ldap_get_entries($ldap, $result); - if ($result === false) { + $safeResult = \ldap_get_entries($ldap, $result); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -649,8 +649,8 @@ function ldap_get_entries($ldap, $result): array function ldap_get_option($ldap, int $option, &$value = null): void { error_clear_last(); - $result = \ldap_get_option($ldap, $option, $value); - if ($result === false) { + $safeResult = \ldap_get_option($ldap, $option, $value); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -675,11 +675,11 @@ function ldap_get_option($ldap, int $option, &$value = null): void function ldap_get_values_len($ldap, $entry, string $attribute): array { error_clear_last(); - $result = \ldap_get_values_len($ldap, $entry, $attribute); - if ($result === false) { + $safeResult = \ldap_get_values_len($ldap, $entry, $attribute); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -719,11 +719,11 @@ function ldap_get_values_len($ldap, $entry, string $attribute): array function ldap_get_values($ldap, $entry, string $attribute): array { error_clear_last(); - $result = \ldap_get_values($ldap, $entry, $attribute); - if ($result === false) { + $safeResult = \ldap_get_values($ldap, $entry, $attribute); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -742,11 +742,11 @@ function ldap_mod_add($ldap, string $dn, array $entry, array $controls = null): { error_clear_last(); if ($controls !== null) { - $result = \ldap_mod_add($ldap, $dn, $entry, $controls); + $safeResult = \ldap_mod_add($ldap, $dn, $entry, $controls); } else { - $result = \ldap_mod_add($ldap, $dn, $entry); + $safeResult = \ldap_mod_add($ldap, $dn, $entry); } - if ($result === false) { + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -768,11 +768,11 @@ function ldap_mod_del($ldap, string $dn, array $entry, array $controls = null): { error_clear_last(); if ($controls !== null) { - $result = \ldap_mod_del($ldap, $dn, $entry, $controls); + $safeResult = \ldap_mod_del($ldap, $dn, $entry, $controls); } else { - $result = \ldap_mod_del($ldap, $dn, $entry); + $safeResult = \ldap_mod_del($ldap, $dn, $entry); } - if ($result === false) { + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -793,11 +793,11 @@ function ldap_mod_replace($ldap, string $dn, array $entry, array $controls = nul { error_clear_last(); if ($controls !== null) { - $result = \ldap_mod_replace($ldap, $dn, $entry, $controls); + $safeResult = \ldap_mod_replace($ldap, $dn, $entry, $controls); } else { - $result = \ldap_mod_replace($ldap, $dn, $entry); + $safeResult = \ldap_mod_replace($ldap, $dn, $entry); } - if ($result === false) { + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -892,11 +892,11 @@ function ldap_modify_batch($ldap, string $dn, array $modifications_info, array $ { error_clear_last(); if ($controls !== null) { - $result = \ldap_modify_batch($ldap, $dn, $modifications_info, $controls); + $safeResult = \ldap_modify_batch($ldap, $dn, $modifications_info, $controls); } else { - $result = \ldap_modify_batch($ldap, $dn, $modifications_info); + $safeResult = \ldap_modify_batch($ldap, $dn, $modifications_info); } - if ($result === false) { + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -918,11 +918,11 @@ function ldap_modify_batch($ldap, string $dn, array $modifications_info, array $ function ldap_next_attribute($ldap, $entry): string { error_clear_last(); - $result = \ldap_next_attribute($ldap, $entry); - if ($result === false) { + $safeResult = \ldap_next_attribute($ldap, $entry); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -939,8 +939,8 @@ function ldap_next_attribute($ldap, $entry): string function ldap_parse_exop($ldap, $result, ?string &$response_data = null, ?string &$response_oid = null): void { error_clear_last(); - $result = \ldap_parse_exop($ldap, $result, $response_data, $response_oid); - if ($result === false) { + $safeResult = \ldap_parse_exop($ldap, $result, $response_data, $response_oid); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -967,8 +967,8 @@ function ldap_parse_exop($ldap, $result, ?string &$response_data = null, ?string function ldap_parse_result($ldap, $result, ?int &$error_code, ?string &$matched_dn = null, ?string &$error_message = null, ?array &$referrals = null, ?array &$controls = null): void { error_clear_last(); - $result = \ldap_parse_result($ldap, $result, $error_code, $matched_dn, $error_message, $referrals, $controls); - if ($result === false) { + $safeResult = \ldap_parse_result($ldap, $result, $error_code, $matched_dn, $error_message, $referrals, $controls); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -991,11 +991,11 @@ function ldap_rename($ldap, string $dn, string $new_rdn, string $new_parent, boo { error_clear_last(); if ($controls !== null) { - $result = \ldap_rename($ldap, $dn, $new_rdn, $new_parent, $delete_old_rdn, $controls); + $safeResult = \ldap_rename($ldap, $dn, $new_rdn, $new_parent, $delete_old_rdn, $controls); } else { - $result = \ldap_rename($ldap, $dn, $new_rdn, $new_parent, $delete_old_rdn); + $safeResult = \ldap_rename($ldap, $dn, $new_rdn, $new_parent, $delete_old_rdn); } - if ($result === false) { + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -1019,23 +1019,23 @@ function ldap_sasl_bind($ldap, string $dn = null, string $password = null, strin { error_clear_last(); if ($props !== null) { - $result = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id, $authz_id, $props); + $safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id, $authz_id, $props); } elseif ($authz_id !== null) { - $result = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id, $authz_id); + $safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id, $authz_id); } elseif ($authc_id !== null) { - $result = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id); + $safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm, $authc_id); } elseif ($realm !== null) { - $result = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm); + $safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech, $realm); } elseif ($mech !== null) { - $result = \ldap_sasl_bind($ldap, $dn, $password, $mech); + $safeResult = \ldap_sasl_bind($ldap, $dn, $password, $mech); } elseif ($password !== null) { - $result = \ldap_sasl_bind($ldap, $dn, $password); + $safeResult = \ldap_sasl_bind($ldap, $dn, $password); } elseif ($dn !== null) { - $result = \ldap_sasl_bind($ldap, $dn); + $safeResult = \ldap_sasl_bind($ldap, $dn); } else { - $result = \ldap_sasl_bind($ldap); + $safeResult = \ldap_sasl_bind($ldap); } - if ($result === false) { + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -1222,8 +1222,8 @@ function ldap_sasl_bind($ldap, string $dn = null, string $password = null, strin function ldap_set_option($ldap, int $option, $value): void { error_clear_last(); - $result = \ldap_set_option($ldap, $option, $value); - if ($result === false) { + $safeResult = \ldap_set_option($ldap, $option, $value); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } @@ -1239,8 +1239,9 @@ function ldap_set_option($ldap, int $option, $value): void function ldap_unbind($ldap): void { error_clear_last(); - $result = \ldap_unbind($ldap); - if ($result === false) { + $safeResult = \ldap_unbind($ldap); + if ($safeResult === false) { throw LdapException::createFromPhpError(); } } + diff --git a/generated/libxml.php b/generated/libxml.php index 74925c12..c877bd1b 100644 --- a/generated/libxml.php +++ b/generated/libxml.php @@ -15,11 +15,11 @@ function libxml_get_last_error(): \LibXMLError { error_clear_last(); - $result = \libxml_get_last_error(); - if ($result === false) { + $safeResult = \libxml_get_last_error(); + if ($safeResult === false) { throw LibxmlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -71,8 +71,9 @@ function libxml_get_last_error(): \LibXMLError function libxml_set_external_entity_loader(callable $resolver_function): void { error_clear_last(); - $result = \libxml_set_external_entity_loader($resolver_function); - if ($result === false) { + $safeResult = \libxml_set_external_entity_loader($resolver_function); + if ($safeResult === false) { throw LibxmlException::createFromPhpError(); } } + diff --git a/generated/lzf.php b/generated/lzf.php index 7fce838a..77972779 100644 --- a/generated/lzf.php +++ b/generated/lzf.php @@ -16,11 +16,11 @@ function lzf_compress(string $data): string { error_clear_last(); - $result = \lzf_compress($data); - if ($result === false) { + $safeResult = \lzf_compress($data); + if ($safeResult === false) { throw LzfException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -36,9 +36,10 @@ function lzf_compress(string $data): string function lzf_decompress(string $data): string { error_clear_last(); - $result = \lzf_decompress($data); - if ($result === false) { + $safeResult = \lzf_decompress($data); + if ($safeResult === false) { throw LzfException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/mailparse.php b/generated/mailparse.php index 1bae182a..4bdf4acd 100644 --- a/generated/mailparse.php +++ b/generated/mailparse.php @@ -30,14 +30,14 @@ function mailparse_msg_extract_part_file($mimemail, $filename, callable $callbac { error_clear_last(); if ($callbackfunc !== null) { - $result = \mailparse_msg_extract_part_file($mimemail, $filename, $callbackfunc); + $safeResult = \mailparse_msg_extract_part_file($mimemail, $filename, $callbackfunc); } else { - $result = \mailparse_msg_extract_part_file($mimemail, $filename); + $safeResult = \mailparse_msg_extract_part_file($mimemail, $filename); } - if ($result === false) { + if ($safeResult === false) { throw MailparseException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -53,8 +53,8 @@ function mailparse_msg_extract_part_file($mimemail, $filename, callable $callbac function mailparse_msg_free($mimemail): void { error_clear_last(); - $result = \mailparse_msg_free($mimemail); - if ($result === false) { + $safeResult = \mailparse_msg_free($mimemail); + if ($safeResult === false) { throw MailparseException::createFromPhpError(); } } @@ -76,11 +76,11 @@ function mailparse_msg_free($mimemail): void function mailparse_msg_parse_file(string $filename) { error_clear_last(); - $result = \mailparse_msg_parse_file($filename); - if ($result === false) { + $safeResult = \mailparse_msg_parse_file($filename); + if ($safeResult === false) { throw MailparseException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -99,8 +99,8 @@ function mailparse_msg_parse_file(string $filename) function mailparse_msg_parse($mimemail, string $data): void { error_clear_last(); - $result = \mailparse_msg_parse($mimemail, $data); - if ($result === false) { + $safeResult = \mailparse_msg_parse($mimemail, $data); + if ($safeResult === false) { throw MailparseException::createFromPhpError(); } } @@ -120,8 +120,9 @@ function mailparse_msg_parse($mimemail, string $data): void function mailparse_stream_encode($sourcefp, $destfp, string $encoding): void { error_clear_last(); - $result = \mailparse_stream_encode($sourcefp, $destfp, $encoding); - if ($result === false) { + $safeResult = \mailparse_stream_encode($sourcefp, $destfp, $encoding); + if ($safeResult === false) { throw MailparseException::createFromPhpError(); } } + diff --git a/generated/mbstring.php b/generated/mbstring.php index 49622015..aabca617 100644 --- a/generated/mbstring.php +++ b/generated/mbstring.php @@ -23,14 +23,14 @@ function mb_chr(int $codepoint, string $encoding = null): string { error_clear_last(); if ($encoding !== null) { - $result = \mb_chr($codepoint, $encoding); + $safeResult = \mb_chr($codepoint, $encoding); } else { - $result = \mb_chr($codepoint); + $safeResult = \mb_chr($codepoint); } - if ($result === false) { + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -62,14 +62,14 @@ function mb_convert_encoding($string, string $to_encoding, $from_encoding = null { error_clear_last(); if ($from_encoding !== null) { - $result = \mb_convert_encoding($string, $to_encoding, $from_encoding); + $safeResult = \mb_convert_encoding($string, $to_encoding, $from_encoding); } else { - $result = \mb_convert_encoding($string, $to_encoding); + $safeResult = \mb_convert_encoding($string, $to_encoding); } - if ($result === false) { + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -106,14 +106,14 @@ function mb_detect_order($encoding = null) { error_clear_last(); if ($encoding !== null) { - $result = \mb_detect_order($encoding); + $safeResult = \mb_detect_order($encoding); } else { - $result = \mb_detect_order(); + $safeResult = \mb_detect_order(); } - if ($result === false) { + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -128,11 +128,11 @@ function mb_detect_order($encoding = null) function mb_encoding_aliases(string $encoding): array { error_clear_last(); - $result = \mb_encoding_aliases($encoding); - if ($result === false) { + $safeResult = \mb_encoding_aliases($encoding); + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -174,14 +174,14 @@ function mb_ereg_replace_callback(string $pattern, callable $callback, string $s { error_clear_last(); if ($options !== null) { - $result = \mb_ereg_replace_callback($pattern, $callback, $string, $options); + $safeResult = \mb_ereg_replace_callback($pattern, $callback, $string, $options); } else { - $result = \mb_ereg_replace_callback($pattern, $callback, $string); + $safeResult = \mb_ereg_replace_callback($pattern, $callback, $string); } - if ($result === false) { + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -204,14 +204,14 @@ function mb_ereg_replace(string $pattern, string $replacement, string $string, s { error_clear_last(); if ($options !== null) { - $result = \mb_ereg_replace($pattern, $replacement, $string, $options); + $safeResult = \mb_ereg_replace($pattern, $replacement, $string, $options); } else { - $result = \mb_ereg_replace($pattern, $replacement, $string); + $safeResult = \mb_ereg_replace($pattern, $replacement, $string); } - if ($result === false) { + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -225,11 +225,11 @@ function mb_ereg_replace(string $pattern, string $replacement, string $string, s function mb_ereg_search_getregs(): array { error_clear_last(); - $result = \mb_ereg_search_getregs(); - if ($result === false) { + $safeResult = \mb_ereg_search_getregs(); + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -251,13 +251,13 @@ function mb_ereg_search_init(string $string, string $pattern = null, string $opt { error_clear_last(); if ($options !== null) { - $result = \mb_ereg_search_init($string, $pattern, $options); + $safeResult = \mb_ereg_search_init($string, $pattern, $options); } elseif ($pattern !== null) { - $result = \mb_ereg_search_init($string, $pattern); + $safeResult = \mb_ereg_search_init($string, $pattern); } else { - $result = \mb_ereg_search_init($string); + $safeResult = \mb_ereg_search_init($string); } - if ($result === false) { + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } } @@ -276,16 +276,16 @@ function mb_ereg_search_regs(string $pattern = null, string $options = null): ar { error_clear_last(); if ($options !== null) { - $result = \mb_ereg_search_regs($pattern, $options); + $safeResult = \mb_ereg_search_regs($pattern, $options); } elseif ($pattern !== null) { - $result = \mb_ereg_search_regs($pattern); + $safeResult = \mb_ereg_search_regs($pattern); } else { - $result = \mb_ereg_search_regs(); + $safeResult = \mb_ereg_search_regs(); } - if ($result === false) { + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -299,8 +299,8 @@ function mb_ereg_search_regs(string $pattern = null, string $options = null): ar function mb_ereg_search_setpos(int $offset): void { error_clear_last(); - $result = \mb_ereg_search_setpos($offset); - if ($result === false) { + $safeResult = \mb_ereg_search_setpos($offset); + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } } @@ -323,14 +323,14 @@ function mb_eregi_replace(string $pattern, string $replacement, string $string, { error_clear_last(); if ($options !== null) { - $result = \mb_eregi_replace($pattern, $replacement, $string, $options); + $safeResult = \mb_eregi_replace($pattern, $replacement, $string, $options); } else { - $result = \mb_eregi_replace($pattern, $replacement, $string); + $safeResult = \mb_eregi_replace($pattern, $replacement, $string); } - if ($result === false) { + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -364,11 +364,11 @@ function mb_eregi_replace(string $pattern, string $replacement, string $string, function mb_get_info(string $type = "all") { error_clear_last(); - $result = \mb_get_info($type); - if ($result === false) { + $safeResult = \mb_get_info($type); + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -394,14 +394,14 @@ function mb_http_output(string $encoding = null) { error_clear_last(); if ($encoding !== null) { - $result = \mb_http_output($encoding); + $safeResult = \mb_http_output($encoding); } else { - $result = \mb_http_output(); + $safeResult = \mb_http_output(); } - if ($result === false) { + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -425,14 +425,14 @@ function mb_internal_encoding(string $encoding = null) { error_clear_last(); if ($encoding !== null) { - $result = \mb_internal_encoding($encoding); + $safeResult = \mb_internal_encoding($encoding); } else { - $result = \mb_internal_encoding(); + $safeResult = \mb_internal_encoding(); } - if ($result === false) { + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -453,14 +453,14 @@ function mb_ord(string $string, string $encoding = null): int { error_clear_last(); if ($encoding !== null) { - $result = \mb_ord($string, $encoding); + $safeResult = \mb_ord($string, $encoding); } else { - $result = \mb_ord($string); + $safeResult = \mb_ord($string); } - if ($result === false) { + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -480,8 +480,8 @@ function mb_ord(string $string, string $encoding = null): int function mb_parse_str(string $string, ?array &$result): void { error_clear_last(); - $result = \mb_parse_str($string, $result); - if ($result === false) { + $safeResult = \mb_parse_str($string, $result); + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } } @@ -501,14 +501,14 @@ function mb_regex_encoding(string $encoding = null) { error_clear_last(); if ($encoding !== null) { - $result = \mb_regex_encoding($encoding); + $safeResult = \mb_regex_encoding($encoding); } else { - $result = \mb_regex_encoding(); + $safeResult = \mb_regex_encoding(); } - if ($result === false) { + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -573,11 +573,11 @@ function mb_send_mail(string $to, string $subject, string $message, $additional_ { error_clear_last(); if ($additional_params !== null) { - $result = \mb_send_mail($to, $subject, $message, $additional_headers, $additional_params); + $safeResult = \mb_send_mail($to, $subject, $message, $additional_headers, $additional_params); } else { - $result = \mb_send_mail($to, $subject, $message, $additional_headers); + $safeResult = \mb_send_mail($to, $subject, $message, $additional_headers); } - if ($result === false) { + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } } @@ -596,9 +596,10 @@ function mb_send_mail(string $to, string $subject, string $message, $additional_ function mb_split(string $pattern, string $string, int $limit = -1): array { error_clear_last(); - $result = \mb_split($pattern, $string, $limit); - if ($result === false) { + $safeResult = \mb_split($pattern, $string, $limit); + if ($safeResult === false) { throw MbstringException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/misc.php b/generated/misc.php index 31ca6158..37b1c253 100644 --- a/generated/misc.php +++ b/generated/misc.php @@ -31,8 +31,8 @@ function define(string $constant_name, $value, bool $case_insensitive = false): void { error_clear_last(); - $result = \define($constant_name, $value, $case_insensitive); - if ($result === false) { + $safeResult = \define($constant_name, $value, $case_insensitive); + if ($safeResult === false) { throw MiscException::createFromPhpError(); } } @@ -61,11 +61,11 @@ function define(string $constant_name, $value, bool $case_insensitive = false): function highlight_file(string $filename, bool $return = false) { error_clear_last(); - $result = \highlight_file($filename, $return); - if ($result === false) { + $safeResult = \highlight_file($filename, $return); + if ($safeResult === false) { throw MiscException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -84,11 +84,11 @@ function highlight_file(string $filename, bool $return = false) function highlight_string(string $string, bool $return = false) { error_clear_last(); - $result = \highlight_string($string, $return); - if ($result === false) { + $safeResult = \highlight_string($string, $return); + if ($safeResult === false) { throw MiscException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -108,11 +108,11 @@ function highlight_string(string $string, bool $return = false) function hrtime(bool $as_number = false) { error_clear_last(); - $result = \hrtime($as_number); - if ($result === false) { + $safeResult = \hrtime($as_number); + if ($safeResult === false) { throw MiscException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -270,18 +270,18 @@ function hrtime(bool $as_number = false) * @throws MiscException * */ -function pack(string $format, ...$values): string +function pack(string $format, ...$values): string { error_clear_last(); if ($values !== []) { - $result = \pack($format, ...$values); + $safeResult = \pack($format, ...$values); } else { - $result = \pack($format); + $safeResult = \pack($format); } - if ($result === false) { + if ($safeResult === false) { throw MiscException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -301,11 +301,11 @@ function pack(string $format, ...$values): string function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject): string { error_clear_last(); - $result = \sapi_windows_cp_conv($in_codepage, $out_codepage, $subject); - if ($result === null) { + $safeResult = \sapi_windows_cp_conv($in_codepage, $out_codepage, $subject); + if ($safeResult === null) { throw MiscException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -319,8 +319,8 @@ function sapi_windows_cp_conv($in_codepage, $out_codepage, string $subject): str function sapi_windows_cp_set(int $codepage): void { error_clear_last(); - $result = \sapi_windows_cp_set($codepage); - if ($result === false) { + $safeResult = \sapi_windows_cp_set($codepage); + if ($safeResult === false) { throw MiscException::createFromPhpError(); } } @@ -340,8 +340,8 @@ function sapi_windows_cp_set(int $codepage): void function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void { error_clear_last(); - $result = \sapi_windows_generate_ctrl_event($event, $pid); - if ($result === false) { + $safeResult = \sapi_windows_generate_ctrl_event($event, $pid); + if ($safeResult === false) { throw MiscException::createFromPhpError(); } } @@ -381,8 +381,8 @@ function sapi_windows_generate_ctrl_event(int $event, int $pid = 0): void function sapi_windows_set_ctrl_handler($handler, bool $add = true): void { error_clear_last(); - $result = \sapi_windows_set_ctrl_handler($handler, $add); - if ($result === false) { + $safeResult = \sapi_windows_set_ctrl_handler($handler, $add); + if ($safeResult === false) { throw MiscException::createFromPhpError(); } } @@ -408,11 +408,11 @@ function sapi_windows_vt100_support($stream, bool $enable = null): void { error_clear_last(); if ($enable !== null) { - $result = \sapi_windows_vt100_support($stream, $enable); + $safeResult = \sapi_windows_vt100_support($stream, $enable); } else { - $result = \sapi_windows_vt100_support($stream); + $safeResult = \sapi_windows_vt100_support($stream); } - if ($result === false) { + if ($safeResult === false) { throw MiscException::createFromPhpError(); } } @@ -436,11 +436,11 @@ function sapi_windows_vt100_support($stream, bool $enable = null): void function sleep(int $seconds): int { error_clear_last(); - $result = \sleep($seconds); - if ($result === false) { + $safeResult = \sleep($seconds); + if ($safeResult === false) { throw MiscException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -474,11 +474,11 @@ function sleep(int $seconds): int function time_nanosleep(int $seconds, int $nanoseconds) { error_clear_last(); - $result = \time_nanosleep($seconds, $nanoseconds); - if ($result === false) { + $safeResult = \time_nanosleep($seconds, $nanoseconds); + if ($safeResult === false) { throw MiscException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -493,8 +493,8 @@ function time_nanosleep(int $seconds, int $nanoseconds) function time_sleep_until(float $timestamp): void { error_clear_last(); - $result = \time_sleep_until($timestamp); - if ($result === false) { + $safeResult = \time_sleep_until($timestamp); + if ($safeResult === false) { throw MiscException::createFromPhpError(); } } @@ -536,9 +536,10 @@ function time_sleep_until(float $timestamp): void function unpack(string $format, string $string, int $offset = 0): array { error_clear_last(); - $result = \unpack($format, $string, $offset); - if ($result === false) { + $safeResult = \unpack($format, $string, $offset); + if ($safeResult === false) { throw MiscException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/mysql.php b/generated/mysql.php index 475c609c..e7bde90d 100644 --- a/generated/mysql.php +++ b/generated/mysql.php @@ -26,11 +26,11 @@ * @throws MysqlException * */ -function mysql_close($link_identifier = null): void +function mysql_close($link_identifier = NULL): void { error_clear_last(); - $result = \mysql_close($link_identifier); - if ($result === false) { + $safeResult = \mysql_close($link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } } @@ -77,22 +77,22 @@ function mysql_connect(string $server = null, string $username = null, string $p { error_clear_last(); if ($client_flags !== 0) { - $result = \mysql_connect($server, $username, $password, $new_link, $client_flags); + $safeResult = \mysql_connect($server, $username, $password, $new_link, $client_flags); } elseif ($new_link !== false) { - $result = \mysql_connect($server, $username, $password, $new_link); + $safeResult = \mysql_connect($server, $username, $password, $new_link); } elseif ($password !== null) { - $result = \mysql_connect($server, $username, $password); + $safeResult = \mysql_connect($server, $username, $password); } elseif ($username !== null) { - $result = \mysql_connect($server, $username); + $safeResult = \mysql_connect($server, $username); } elseif ($server !== null) { - $result = \mysql_connect($server); + $safeResult = \mysql_connect($server); } else { - $result = \mysql_connect(); + $safeResult = \mysql_connect(); } - if ($result === false) { + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -111,11 +111,11 @@ function mysql_connect(string $server = null, string $username = null, string $p * @throws MysqlException * */ -function mysql_create_db(string $database_name, $link_identifier = null): void +function mysql_create_db(string $database_name, $link_identifier = NULL): void { error_clear_last(); - $result = \mysql_create_db($database_name, $link_identifier); - if ($result === false) { + $safeResult = \mysql_create_db($database_name, $link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } } @@ -145,8 +145,8 @@ function mysql_create_db(string $database_name, $link_identifier = null): void function mysql_data_seek($result, int $row_number): void { error_clear_last(); - $result = \mysql_data_seek($result, $row_number); - if ($result === false) { + $safeResult = \mysql_data_seek($result, $row_number); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } } @@ -165,14 +165,14 @@ function mysql_data_seek($result, int $row_number): void * @throws MysqlException * */ -function mysql_db_name($result, int $row, $field = null): string +function mysql_db_name($result, int $row, $field = NULL): string { error_clear_last(); - $result = \mysql_db_name($result, $row, $field); - if ($result === false) { + $safeResult = \mysql_db_name($result, $row, $field); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -196,14 +196,14 @@ function mysql_db_name($result, int $row, $field = null): string * @throws MysqlException * */ -function mysql_db_query(string $database, string $query, $link_identifier = null) +function mysql_db_query(string $database, string $query, $link_identifier = NULL) { error_clear_last(); - $result = \mysql_db_query($database, $query, $link_identifier); - if ($result === false) { + $safeResult = \mysql_db_query($database, $query, $link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -224,11 +224,11 @@ function mysql_db_query(string $database, string $query, $link_identifier = null * @throws MysqlException * */ -function mysql_drop_db(string $database_name, $link_identifier = null): void +function mysql_drop_db(string $database_name, $link_identifier = NULL): void { error_clear_last(); - $result = \mysql_drop_db($database_name, $link_identifier); - if ($result === false) { + $safeResult = \mysql_drop_db($database_name, $link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } } @@ -256,11 +256,11 @@ function mysql_drop_db(string $database_name, $link_identifier = null): void function mysql_fetch_lengths($result): array { error_clear_last(); - $result = \mysql_fetch_lengths($result); - if ($result === false) { + $safeResult = \mysql_fetch_lengths($result); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -292,11 +292,11 @@ function mysql_fetch_lengths($result): array function mysql_field_flags($result, int $field_offset): string { error_clear_last(); - $result = \mysql_field_flags($result, $field_offset); - if ($result === false) { + $safeResult = \mysql_field_flags($result, $field_offset); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -318,11 +318,11 @@ function mysql_field_flags($result, int $field_offset): string function mysql_field_len($result, int $field_offset): int { error_clear_last(); - $result = \mysql_field_len($result, $field_offset); - if ($result === false) { + $safeResult = \mysql_field_len($result, $field_offset); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -344,11 +344,11 @@ function mysql_field_len($result, int $field_offset): int function mysql_field_name($result, int $field_offset): string { error_clear_last(); - $result = \mysql_field_name($result, $field_offset); - if ($result === false) { + $safeResult = \mysql_field_name($result, $field_offset); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -371,8 +371,8 @@ function mysql_field_name($result, int $field_offset): string function mysql_field_seek($result, int $field_offset): void { error_clear_last(); - $result = \mysql_field_seek($result, $field_offset); - if ($result === false) { + $safeResult = \mysql_field_seek($result, $field_offset); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } } @@ -396,8 +396,8 @@ function mysql_field_seek($result, int $field_offset): void function mysql_free_result($result): void { error_clear_last(); - $result = \mysql_free_result($result); - if ($result === false) { + $safeResult = \mysql_free_result($result); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } } @@ -418,14 +418,14 @@ function mysql_free_result($result): void * @throws MysqlException * */ -function mysql_get_host_info($link_identifier = null): string +function mysql_get_host_info($link_identifier = NULL): string { error_clear_last(); - $result = \mysql_get_host_info($link_identifier); - if ($result === false) { + $safeResult = \mysql_get_host_info($link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -442,14 +442,14 @@ function mysql_get_host_info($link_identifier = null): string * @throws MysqlException * */ -function mysql_get_proto_info($link_identifier = null): int +function mysql_get_proto_info($link_identifier = NULL): int { error_clear_last(); - $result = \mysql_get_proto_info($link_identifier); - if ($result === false) { + $safeResult = \mysql_get_proto_info($link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -466,14 +466,14 @@ function mysql_get_proto_info($link_identifier = null): int * @throws MysqlException * */ -function mysql_get_server_info($link_identifier = null): string +function mysql_get_server_info($link_identifier = NULL): string { error_clear_last(); - $result = \mysql_get_server_info($link_identifier); - if ($result === false) { + $safeResult = \mysql_get_server_info($link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -492,14 +492,14 @@ function mysql_get_server_info($link_identifier = null): string * @throws MysqlException * */ -function mysql_info($link_identifier = null): string +function mysql_info($link_identifier = NULL): string { error_clear_last(); - $result = \mysql_info($link_identifier); - if ($result === false) { + $safeResult = \mysql_info($link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -519,14 +519,14 @@ function mysql_info($link_identifier = null): string * @throws MysqlException * */ -function mysql_list_dbs($link_identifier = null) +function mysql_list_dbs($link_identifier = NULL) { error_clear_last(); - $result = \mysql_list_dbs($link_identifier); - if ($result === false) { + $safeResult = \mysql_list_dbs($link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -554,14 +554,14 @@ function mysql_list_dbs($link_identifier = null) * @throws MysqlException * */ -function mysql_list_fields(string $database_name, string $table_name, $link_identifier = null) +function mysql_list_fields(string $database_name, string $table_name, $link_identifier = NULL) { error_clear_last(); - $result = \mysql_list_fields($database_name, $table_name, $link_identifier); - if ($result === false) { + $safeResult = \mysql_list_fields($database_name, $table_name, $link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -578,14 +578,14 @@ function mysql_list_fields(string $database_name, string $table_name, $link_iden * @throws MysqlException * */ -function mysql_list_processes($link_identifier = null) +function mysql_list_processes($link_identifier = NULL) { error_clear_last(); - $result = \mysql_list_processes($link_identifier); - if ($result === false) { + $safeResult = \mysql_list_processes($link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -611,14 +611,14 @@ function mysql_list_processes($link_identifier = null) * @throws MysqlException * */ -function mysql_list_tables(string $database, $link_identifier = null) +function mysql_list_tables(string $database, $link_identifier = NULL) { error_clear_last(); - $result = \mysql_list_tables($database, $link_identifier); - if ($result === false) { + $safeResult = \mysql_list_tables($database, $link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -636,11 +636,11 @@ function mysql_list_tables(string $database, $link_identifier = null) function mysql_num_fields($result): int { error_clear_last(); - $result = \mysql_num_fields($result); - if ($result === false) { + $safeResult = \mysql_num_fields($result); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -660,11 +660,11 @@ function mysql_num_fields($result): int function mysql_num_rows($result): int { error_clear_last(); - $result = \mysql_num_rows($result); - if ($result === false) { + $safeResult = \mysql_num_rows($result); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -707,14 +707,14 @@ function mysql_num_rows($result): int * @throws MysqlException * */ -function mysql_query(string $query, $link_identifier = null) +function mysql_query(string $query, $link_identifier = NULL) { error_clear_last(); - $result = \mysql_query($query, $link_identifier); - if ($result === false) { + $safeResult = \mysql_query($query, $link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -744,14 +744,14 @@ function mysql_query(string $query, $link_identifier = null) * @throws MysqlException * */ -function mysql_real_escape_string(string $unescaped_string, $link_identifier = null): string +function mysql_real_escape_string(string $unescaped_string, $link_identifier = NULL): string { error_clear_last(); - $result = \mysql_real_escape_string($unescaped_string, $link_identifier); - if ($result === false) { + $safeResult = \mysql_real_escape_string($unescaped_string, $link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -784,11 +784,11 @@ function mysql_real_escape_string(string $unescaped_string, $link_identifier = n function mysql_result($result, int $row, $field = 0): string { error_clear_last(); - $result = \mysql_result($result, $row, $field); - if ($result === false) { + $safeResult = \mysql_result($result, $row, $field); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -807,11 +807,11 @@ function mysql_result($result, int $row, $field = 0): string * @throws MysqlException * */ -function mysql_select_db(string $database_name, $link_identifier = null): void +function mysql_select_db(string $database_name, $link_identifier = NULL): void { error_clear_last(); - $result = \mysql_select_db($database_name, $link_identifier); - if ($result === false) { + $safeResult = \mysql_select_db($database_name, $link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } } @@ -830,11 +830,11 @@ function mysql_select_db(string $database_name, $link_identifier = null): void * @throws MysqlException * */ -function mysql_set_charset(string $charset, $link_identifier = null): void +function mysql_set_charset(string $charset, $link_identifier = NULL): void { error_clear_last(); - $result = \mysql_set_charset($charset, $link_identifier); - if ($result === false) { + $safeResult = \mysql_set_charset($charset, $link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } } @@ -861,11 +861,11 @@ function mysql_set_charset(string $charset, $link_identifier = null): void function mysql_tablename($result, int $i): string { error_clear_last(); - $result = \mysql_tablename($result, $i); - if ($result === false) { + $safeResult = \mysql_tablename($result, $i); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -884,14 +884,14 @@ function mysql_tablename($result, int $i): string * @throws MysqlException * */ -function mysql_thread_id($link_identifier = null): int +function mysql_thread_id($link_identifier = NULL): int { error_clear_last(); - $result = \mysql_thread_id($link_identifier); - if ($result === false) { + $safeResult = \mysql_thread_id($link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -927,12 +927,13 @@ function mysql_thread_id($link_identifier = null): int * @throws MysqlException * */ -function mysql_unbuffered_query(string $query, $link_identifier = null) +function mysql_unbuffered_query(string $query, $link_identifier = NULL) { error_clear_last(); - $result = \mysql_unbuffered_query($query, $link_identifier); - if ($result === false) { + $safeResult = \mysql_unbuffered_query($query, $link_identifier); + if ($safeResult === false) { throw MysqlException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/network.php b/generated/network.php index 21186d1f..ecc77106 100644 --- a/generated/network.php +++ b/generated/network.php @@ -14,8 +14,8 @@ function closelog(): void { error_clear_last(); - $result = \closelog(); - if ($result === false) { + $safeResult = \closelog(); + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } } @@ -249,11 +249,11 @@ function closelog(): void function dns_get_record(string $hostname, int $type = DNS_ANY, ?array &$authoritative_name_servers = null, ?array &$additional_records = null, bool $raw = false): array { error_clear_last(); - $result = \dns_get_record($hostname, $type, $authoritative_name_servers, $additional_records, $raw); - if ($result === false) { + $safeResult = \dns_get_record($hostname, $type, $authoritative_name_servers, $additional_records, $raw); + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -310,14 +310,14 @@ function fsockopen(string $hostname, int $port = -1, ?int &$error_code = null, ? { error_clear_last(); if ($timeout !== null) { - $result = \fsockopen($hostname, $port, $error_code, $error_message, $timeout); + $safeResult = \fsockopen($hostname, $port, $error_code, $error_message, $timeout); } else { - $result = \fsockopen($hostname, $port, $error_code, $error_message); + $safeResult = \fsockopen($hostname, $port, $error_code, $error_message); } - if ($result === false) { + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -333,11 +333,11 @@ function fsockopen(string $hostname, int $port = -1, ?int &$error_code = null, ? function gethostname(): string { error_clear_last(); - $result = \gethostname(); - if ($result === false) { + $safeResult = \gethostname(); + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -354,11 +354,11 @@ function gethostname(): string function getprotobyname(string $protocol): int { error_clear_last(); - $result = \getprotobyname($protocol); - if ($result === false) { + $safeResult = \getprotobyname($protocol); + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -375,11 +375,11 @@ function getprotobyname(string $protocol): int function getprotobynumber(int $protocol): string { error_clear_last(); - $result = \getprotobynumber($protocol); - if ($result === false) { + $safeResult = \getprotobynumber($protocol); + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -398,11 +398,11 @@ function getprotobynumber(int $protocol): string function getservbyport(int $port, string $protocol): string { error_clear_last(); - $result = \getservbyport($port, $protocol); - if ($result === false) { + $safeResult = \getservbyport($port, $protocol); + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -421,8 +421,8 @@ function getservbyport(int $port, string $protocol): string function header_register_callback(callable $callback): void { error_clear_last(); - $result = \header_register_callback($callback); - if ($result === false) { + $safeResult = \header_register_callback($callback); + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } } @@ -439,11 +439,11 @@ function header_register_callback(callable $callback): void function inet_ntop(string $ip): string { error_clear_last(); - $result = \inet_ntop($ip); - if ($result === false) { + $safeResult = \inet_ntop($ip); + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -460,11 +460,11 @@ function inet_ntop(string $ip): string function long2ip(int $ip): string { error_clear_last(); - $result = \long2ip($ip); - if ($result === false) { + $safeResult = \long2ip($ip); + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -565,11 +565,11 @@ function long2ip(int $ip): string function net_get_interfaces(): array { error_clear_last(); - $result = \net_get_interfaces(); - if ($result === false) { + $safeResult = \net_get_interfaces(); + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -708,8 +708,8 @@ function net_get_interfaces(): array function openlog(string $prefix, int $flags, int $facility): void { error_clear_last(); - $result = \openlog($prefix, $flags, $facility); - if ($result === false) { + $safeResult = \openlog($prefix, $flags, $facility); + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } } @@ -737,14 +737,14 @@ function pfsockopen(string $hostname, int $port = -1, ?int &$error_code = null, { error_clear_last(); if ($timeout !== null) { - $result = \pfsockopen($hostname, $port, $error_code, $error_message, $timeout); + $safeResult = \pfsockopen($hostname, $port, $error_code, $error_message, $timeout); } else { - $result = \pfsockopen($hostname, $port, $error_code, $error_message); + $safeResult = \pfsockopen($hostname, $port, $error_code, $error_message); } - if ($result === false) { + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -813,8 +813,9 @@ function pfsockopen(string $hostname, int $port = -1, ?int &$error_code = null, function syslog(int $priority, string $message): void { error_clear_last(); - $result = \syslog($priority, $message); - if ($result === false) { + $safeResult = \syslog($priority, $message); + if ($safeResult === false) { throw NetworkException::createFromPhpError(); } } + diff --git a/generated/oci8.php b/generated/oci8.php index 4a7e3880..3d733bab 100644 --- a/generated/oci8.php +++ b/generated/oci8.php @@ -104,8 +104,8 @@ function oci_bind_array_by_name($statement, string $param, array &$var, int $max_array_length, int $max_item_length = -1, int $type = SQLT_AFC): void { error_clear_last(); - $result = \oci_bind_array_by_name($statement, $param, $var, $max_array_length, $max_item_length, $type); - if ($result === false) { + $safeResult = \oci_bind_array_by_name($statement, $param, $var, $max_array_length, $max_item_length, $type); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -310,8 +310,8 @@ function oci_bind_array_by_name($statement, string $param, array &$var, int $max function oci_bind_by_name($statement, string $param, &$var, int $max_length = -1, int $type = 0): void { error_clear_last(); - $result = \oci_bind_by_name($statement, $param, $var, $max_length, $type); - if ($result === false) { + $safeResult = \oci_bind_by_name($statement, $param, $var, $max_length, $type); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -328,8 +328,8 @@ function oci_bind_by_name($statement, string $param, &$var, int $max_length = -1 function oci_cancel($statement): void { error_clear_last(); - $result = \oci_cancel($statement); - if ($result === false) { + $safeResult = \oci_cancel($statement); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -360,8 +360,8 @@ function oci_cancel($statement): void function oci_commit($connection): void { error_clear_last(); - $result = \oci_commit($connection); - if ($result === false) { + $safeResult = \oci_commit($connection); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -470,18 +470,18 @@ function oci_connect(string $username, string $password, string $connection_stri { error_clear_last(); if ($session_mode !== OCI_DEFAULT) { - $result = \oci_connect($username, $password, $connection_string, $encoding, $session_mode); + $safeResult = \oci_connect($username, $password, $connection_string, $encoding, $session_mode); } elseif ($encoding !== "") { - $result = \oci_connect($username, $password, $connection_string, $encoding); + $safeResult = \oci_connect($username, $password, $connection_string, $encoding); } elseif ($connection_string !== null) { - $result = \oci_connect($username, $password, $connection_string); + $safeResult = \oci_connect($username, $password, $connection_string); } else { - $result = \oci_connect($username, $password); + $safeResult = \oci_connect($username, $password); } - if ($result === false) { + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -514,8 +514,8 @@ function oci_connect(string $username, string $password, string $connection_stri function oci_define_by_name($statement, string $column, &$var, int $type = 0): void { error_clear_last(); - $result = \oci_define_by_name($statement, $column, $var, $type); - if ($result === false) { + $safeResult = \oci_define_by_name($statement, $column, $var, $type); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -601,8 +601,8 @@ function oci_define_by_name($statement, string $column, &$var, int $type = 0): v function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void { error_clear_last(); - $result = \oci_execute($statement, $mode); - if ($result === false) { + $safeResult = \oci_execute($statement, $mode); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -620,11 +620,11 @@ function oci_execute($statement, int $mode = OCI_COMMIT_ON_SUCCESS): void function oci_field_name($statement, $column): string { error_clear_last(); - $result = \oci_field_name($statement, $column); - if ($result === false) { + $safeResult = \oci_field_name($statement, $column); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -644,11 +644,11 @@ function oci_field_name($statement, $column): string function oci_field_precision($statement, $column): int { error_clear_last(); - $result = \oci_field_precision($statement, $column); - if ($result === false) { + $safeResult = \oci_field_precision($statement, $column); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -668,11 +668,11 @@ function oci_field_precision($statement, $column): int function oci_field_scale($statement, $column): int { error_clear_last(); - $result = \oci_field_scale($statement, $column); - if ($result === false) { + $safeResult = \oci_field_scale($statement, $column); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -688,11 +688,11 @@ function oci_field_scale($statement, $column): int function oci_field_size($statement, $column): int { error_clear_last(); - $result = \oci_field_size($statement, $column); - if ($result === false) { + $safeResult = \oci_field_size($statement, $column); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -710,11 +710,11 @@ function oci_field_size($statement, $column): int function oci_field_type_raw($statement, $column): int { error_clear_last(); - $result = \oci_field_type_raw($statement, $column); - if ($result === false) { + $safeResult = \oci_field_type_raw($statement, $column); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -730,11 +730,11 @@ function oci_field_type_raw($statement, $column): int function oci_field_type($statement, $column) { error_clear_last(); - $result = \oci_field_type($statement, $column); - if ($result === false) { + $safeResult = \oci_field_type($statement, $column); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -748,8 +748,8 @@ function oci_field_type($statement, $column) function oci_free_descriptor(\OCILob $lob): void { error_clear_last(); - $result = \oci_free_descriptor($lob); - if ($result === false) { + $safeResult = \oci_free_descriptor($lob); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -767,8 +767,8 @@ function oci_free_descriptor(\OCILob $lob): void function oci_free_statement($statement): void { error_clear_last(); - $result = \oci_free_statement($statement); - if ($result === false) { + $safeResult = \oci_free_statement($statement); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -790,14 +790,14 @@ function oci_new_collection($connection, string $type_name, string $schema = nul { error_clear_last(); if ($schema !== null) { - $result = \oci_new_collection($connection, $type_name, $schema); + $safeResult = \oci_new_collection($connection, $type_name, $schema); } else { - $result = \oci_new_collection($connection, $type_name); + $safeResult = \oci_new_collection($connection, $type_name); } - if ($result === false) { + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -893,18 +893,18 @@ function oci_new_connect(string $username, string $password, string $connection_ { error_clear_last(); if ($session_mode !== OCI_DEFAULT) { - $result = \oci_new_connect($username, $password, $connection_string, $encoding, $session_mode); + $safeResult = \oci_new_connect($username, $password, $connection_string, $encoding, $session_mode); } elseif ($encoding !== "") { - $result = \oci_new_connect($username, $password, $connection_string, $encoding); + $safeResult = \oci_new_connect($username, $password, $connection_string, $encoding); } elseif ($connection_string !== null) { - $result = \oci_new_connect($username, $password, $connection_string); + $safeResult = \oci_new_connect($username, $password, $connection_string); } else { - $result = \oci_new_connect($username, $password); + $safeResult = \oci_new_connect($username, $password); } - if ($result === false) { + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -920,11 +920,11 @@ function oci_new_connect(string $username, string $password, string $connection_ function oci_new_cursor($connection) { error_clear_last(); - $result = \oci_new_cursor($connection); - if ($result === false) { + $safeResult = \oci_new_cursor($connection); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -943,11 +943,11 @@ function oci_new_cursor($connection) function oci_new_descriptor($connection, int $type = OCI_DTYPE_LOB) { error_clear_last(); - $result = \oci_new_descriptor($connection, $type); - if ($result === null) { + $safeResult = \oci_new_descriptor($connection, $type); + if ($safeResult === null) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -962,11 +962,11 @@ function oci_new_descriptor($connection, int $type = OCI_DTYPE_LOB) function oci_num_rows($statement): int { error_clear_last(); - $result = \oci_num_rows($statement); - if ($result === false) { + $safeResult = \oci_num_rows($statement); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -995,11 +995,11 @@ function oci_num_rows($statement): int function oci_parse($connection, string $sql) { error_clear_last(); - $result = \oci_parse($connection, $sql); - if ($result === false) { + $safeResult = \oci_parse($connection, $sql); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1096,18 +1096,18 @@ function oci_pconnect(string $username, string $password, string $connection_str { error_clear_last(); if ($session_mode !== OCI_DEFAULT) { - $result = \oci_pconnect($username, $password, $connection_string, $encoding, $session_mode); + $safeResult = \oci_pconnect($username, $password, $connection_string, $encoding, $session_mode); } elseif ($encoding !== "") { - $result = \oci_pconnect($username, $password, $connection_string, $encoding); + $safeResult = \oci_pconnect($username, $password, $connection_string, $encoding); } elseif ($connection_string !== null) { - $result = \oci_pconnect($username, $password, $connection_string); + $safeResult = \oci_pconnect($username, $password, $connection_string); } else { - $result = \oci_pconnect($username, $password); + $safeResult = \oci_pconnect($username, $password); } - if ($result === false) { + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1142,8 +1142,8 @@ function oci_pconnect(string $username, string $password, string $connection_str function oci_register_taf_callback($connection, callable $callback): void { error_clear_last(); - $result = \oci_register_taf_callback($connection, $callback); - if ($result === false) { + $safeResult = \oci_register_taf_callback($connection, $callback); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1170,11 +1170,11 @@ function oci_register_taf_callback($connection, callable $callback): void function oci_result($statement, $column): string { error_clear_last(); - $result = \oci_result($statement, $column); - if ($result === false) { + $safeResult = \oci_result($statement, $column); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1204,8 +1204,8 @@ function oci_result($statement, $column): string function oci_rollback($connection): void { error_clear_last(); - $result = \oci_rollback($connection); - if ($result === false) { + $safeResult = \oci_rollback($connection); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1222,11 +1222,11 @@ function oci_rollback($connection): void function oci_server_version($connection): string { error_clear_last(); - $result = \oci_server_version($connection); - if ($result === false) { + $safeResult = \oci_server_version($connection); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1254,8 +1254,8 @@ function oci_server_version($connection): string function oci_set_action($connection, string $action): void { error_clear_last(); - $result = \oci_set_action($connection, $action); - if ($result === false) { + $safeResult = \oci_set_action($connection, $action); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1296,8 +1296,8 @@ function oci_set_action($connection, string $action): void function oci_set_call_timeout($connection, int $timeout): void { error_clear_last(); - $result = \oci_set_call_timeout($connection, $timeout); - if ($result === false) { + $safeResult = \oci_set_call_timeout($connection, $timeout); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1331,8 +1331,8 @@ function oci_set_call_timeout($connection, int $timeout): void function oci_set_client_identifier($connection, string $client_id): void { error_clear_last(); - $result = \oci_set_client_identifier($connection, $client_id); - if ($result === false) { + $safeResult = \oci_set_client_identifier($connection, $client_id); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1360,8 +1360,8 @@ function oci_set_client_identifier($connection, string $client_id): void function oci_set_client_info($connection, string $client_info): void { error_clear_last(); - $result = \oci_set_client_info($connection, $client_info); - if ($result === false) { + $safeResult = \oci_set_client_info($connection, $client_info); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1390,8 +1390,8 @@ function oci_set_client_info($connection, string $client_info): void function oci_set_db_operation($connection, string $action): void { error_clear_last(); - $result = \oci_set_db_operation($connection, $action); - if ($result === false) { + $safeResult = \oci_set_db_operation($connection, $action); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1424,8 +1424,8 @@ function oci_set_db_operation($connection, string $action): void function oci_set_edition(string $edition): void { error_clear_last(); - $result = \oci_set_edition($edition); - if ($result === false) { + $safeResult = \oci_set_edition($edition); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1455,8 +1455,8 @@ function oci_set_edition(string $edition): void function oci_set_module_name($connection, string $name): void { error_clear_last(); - $result = \oci_set_module_name($connection, $name); - if ($result === false) { + $safeResult = \oci_set_module_name($connection, $name); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1491,8 +1491,8 @@ function oci_set_module_name($connection, string $name): void function oci_set_prefetch_lob($statement, int $prefetch_lob_size): void { error_clear_last(); - $result = \oci_set_prefetch_lob($statement, $prefetch_lob_size); - if ($result === false) { + $safeResult = \oci_set_prefetch_lob($statement, $prefetch_lob_size); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1555,8 +1555,8 @@ function oci_set_prefetch_lob($statement, int $prefetch_lob_size): void function oci_set_prefetch($statement, int $rows): void { error_clear_last(); - $result = \oci_set_prefetch($statement, $rows); - if ($result === false) { + $safeResult = \oci_set_prefetch($statement, $rows); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } @@ -1627,11 +1627,11 @@ function oci_set_prefetch($statement, int $rows): void function oci_statement_type($statement): string { error_clear_last(); - $result = \oci_statement_type($statement); - if ($result === false) { + $safeResult = \oci_statement_type($statement); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1648,8 +1648,9 @@ function oci_statement_type($statement): string function oci_unregister_taf_callback($connection): void { error_clear_last(); - $result = \oci_unregister_taf_callback($connection); - if ($result === false) { + $safeResult = \oci_unregister_taf_callback($connection); + if ($safeResult === false) { throw Oci8Exception::createFromPhpError(); } } + diff --git a/generated/opcache.php b/generated/opcache.php index dcac8549..ed8ccdd8 100644 --- a/generated/opcache.php +++ b/generated/opcache.php @@ -16,8 +16,8 @@ function opcache_compile_file(string $filename): void { error_clear_last(); - $result = \opcache_compile_file($filename); - if ($result === false) { + $safeResult = \opcache_compile_file($filename); + if ($safeResult === false) { throw OpcacheException::createFromPhpError(); } } @@ -35,9 +35,10 @@ function opcache_compile_file(string $filename): void function opcache_get_status(bool $include_scripts = true): array { error_clear_last(); - $result = \opcache_get_status($include_scripts); - if ($result === false) { + $safeResult = \opcache_get_status($include_scripts); + if ($safeResult === false) { throw OpcacheException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/openssl.php b/generated/openssl.php index bef308dc..95450126 100644 --- a/generated/openssl.php +++ b/generated/openssl.php @@ -15,11 +15,11 @@ function openssl_cipher_iv_length(string $cipher_algo): int { error_clear_last(); - $result = \openssl_cipher_iv_length($cipher_algo); - if ($result === false) { + $safeResult = \openssl_cipher_iv_length($cipher_algo); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -39,13 +39,13 @@ function openssl_cms_decrypt(string $input_filename, string $output_filename, $c { error_clear_last(); if ($encoding !== OPENSSL_ENCODING_SMIME) { - $result = \openssl_cms_decrypt($input_filename, $output_filename, $certificate, $private_key, $encoding); + $safeResult = \openssl_cms_decrypt($input_filename, $output_filename, $certificate, $private_key, $encoding); } elseif ($private_key !== null) { - $result = \openssl_cms_decrypt($input_filename, $output_filename, $certificate, $private_key); + $safeResult = \openssl_cms_decrypt($input_filename, $output_filename, $certificate, $private_key); } else { - $result = \openssl_cms_decrypt($input_filename, $output_filename, $certificate); + $safeResult = \openssl_cms_decrypt($input_filename, $output_filename, $certificate); } - if ($result === false) { + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -69,8 +69,8 @@ function openssl_cms_decrypt(string $input_filename, string $output_filename, $c function openssl_cms_encrypt(string $input_filename, string $output_filename, $certificate, $headers, int $flags = 0, int $encoding = OPENSSL_ENCODING_SMIME, int $cipher_algo = OPENSSL_CIPHER_AES_128_CBC): void { error_clear_last(); - $result = \openssl_cms_encrypt($input_filename, $output_filename, $certificate, $headers, $flags, $encoding, $cipher_algo); - if ($result === false) { + $safeResult = \openssl_cms_encrypt($input_filename, $output_filename, $certificate, $headers, $flags, $encoding, $cipher_algo); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -87,8 +87,8 @@ function openssl_cms_encrypt(string $input_filename, string $output_filename, $c function openssl_cms_read(string $input_filename, array &$certificates): void { error_clear_last(); - $result = \openssl_cms_read($input_filename, $certificates); - if ($result === false) { + $safeResult = \openssl_cms_read($input_filename, $certificates); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -115,11 +115,11 @@ function openssl_cms_sign(string $input_filename, string $output_filename, $cert { error_clear_last(); if ($untrusted_certificates_filename !== null) { - $result = \openssl_cms_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags, $encoding, $untrusted_certificates_filename); + $safeResult = \openssl_cms_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags, $encoding, $untrusted_certificates_filename); } else { - $result = \openssl_cms_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags, $encoding); + $safeResult = \openssl_cms_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags, $encoding); } - if ($result === false) { + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -145,23 +145,23 @@ function openssl_cms_verify(string $input_filename, int $flags = 0, $certificate { error_clear_last(); if ($encoding !== OPENSSL_ENCODING_SMIME) { - $result = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content, $pk7, $sigfile, $encoding); + $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content, $pk7, $sigfile, $encoding); } elseif ($sigfile !== null) { - $result = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content, $pk7, $sigfile); + $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content, $pk7, $sigfile); } elseif ($pk7 !== null) { - $result = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content, $pk7); + $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content, $pk7); } elseif ($content !== null) { - $result = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content); + $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename, $content); } elseif ($untrusted_certificates_filename !== null) { - $result = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename); + $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info, $untrusted_certificates_filename); } elseif ($ca_info !== []) { - $result = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info); + $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates, $ca_info); } elseif ($certificates !== null) { - $result = \openssl_cms_verify($input_filename, $flags, $certificates); + $safeResult = \openssl_cms_verify($input_filename, $flags, $certificates); } else { - $result = \openssl_cms_verify($input_filename, $flags); + $safeResult = \openssl_cms_verify($input_filename, $flags); } - if ($result === false) { + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -185,8 +185,8 @@ function openssl_cms_verify(string $input_filename, int $flags = 0, $certificate function openssl_csr_export_to_file($csr, string $output_filename, bool $no_text = true): void { error_clear_last(); - $result = \openssl_csr_export_to_file($csr, $output_filename, $no_text); - if ($result === false) { + $safeResult = \openssl_csr_export_to_file($csr, $output_filename, $no_text); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -211,8 +211,8 @@ function openssl_csr_export_to_file($csr, string $output_filename, bool $no_text function openssl_csr_export($csr, ?string &$output, bool $no_text = true): void { error_clear_last(); - $result = \openssl_csr_export($csr, $output, $no_text); - if ($result === false) { + $safeResult = \openssl_csr_export($csr, $output, $no_text); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -231,11 +231,11 @@ function openssl_csr_export($csr, ?string &$output, bool $no_text = true): void function openssl_csr_get_public_key($csr, bool $short_names = true) { error_clear_last(); - $result = \openssl_csr_get_public_key($csr, $short_names); - if ($result === false) { + $safeResult = \openssl_csr_get_public_key($csr, $short_names); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -256,11 +256,11 @@ function openssl_csr_get_public_key($csr, bool $short_names = true) function openssl_csr_get_subject($csr, bool $short_names = true): array { error_clear_last(); - $result = \openssl_csr_get_subject($csr, $short_names); - if ($result === false) { + $safeResult = \openssl_csr_get_subject($csr, $short_names); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -378,16 +378,16 @@ function openssl_csr_new(array $distinguished_names, &$private_key, array $optio { error_clear_last(); if ($extra_attributes !== null) { - $result = \openssl_csr_new($distinguished_names, $private_key, $options, $extra_attributes); + $safeResult = \openssl_csr_new($distinguished_names, $private_key, $options, $extra_attributes); } elseif ($options !== null) { - $result = \openssl_csr_new($distinguished_names, $private_key, $options); + $safeResult = \openssl_csr_new($distinguished_names, $private_key, $options); } else { - $result = \openssl_csr_new($distinguished_names, $private_key); + $safeResult = \openssl_csr_new($distinguished_names, $private_key); } - if ($result === false) { + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -418,16 +418,16 @@ function openssl_csr_sign($csr, $ca_certificate, $private_key, int $days, array { error_clear_last(); if ($serial !== 0) { - $result = \openssl_csr_sign($csr, $ca_certificate, $private_key, $days, $options, $serial); + $safeResult = \openssl_csr_sign($csr, $ca_certificate, $private_key, $days, $options, $serial); } elseif ($options !== null) { - $result = \openssl_csr_sign($csr, $ca_certificate, $private_key, $days, $options); + $safeResult = \openssl_csr_sign($csr, $ca_certificate, $private_key, $days, $options); } else { - $result = \openssl_csr_sign($csr, $ca_certificate, $private_key, $days); + $safeResult = \openssl_csr_sign($csr, $ca_certificate, $private_key, $days); } - if ($result === false) { + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -452,16 +452,16 @@ function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, { error_clear_last(); if ($aad !== "") { - $result = \openssl_decrypt($data, $cipher_algo, $passphrase, $options, $iv, $tag, $aad); + $safeResult = \openssl_decrypt($data, $cipher_algo, $passphrase, $options, $iv, $tag, $aad); } elseif ($tag !== null) { - $result = \openssl_decrypt($data, $cipher_algo, $passphrase, $options, $iv, $tag); + $safeResult = \openssl_decrypt($data, $cipher_algo, $passphrase, $options, $iv, $tag); } else { - $result = \openssl_decrypt($data, $cipher_algo, $passphrase, $options, $iv); + $safeResult = \openssl_decrypt($data, $cipher_algo, $passphrase, $options, $iv); } - if ($result === false) { + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -479,11 +479,11 @@ function openssl_decrypt(string $data, string $cipher_algo, string $passphrase, function openssl_dh_compute_key(string $public_key, $private_key): string { error_clear_last(); - $result = \openssl_dh_compute_key($public_key, $private_key); - if ($result === false) { + $safeResult = \openssl_dh_compute_key($public_key, $private_key); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -502,11 +502,11 @@ function openssl_dh_compute_key(string $public_key, $private_key): string function openssl_digest(string $data, string $digest_algo, bool $binary = false): string { error_clear_last(); - $result = \openssl_digest($data, $digest_algo, $binary); - if ($result === false) { + $safeResult = \openssl_digest($data, $digest_algo, $binary); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -564,11 +564,11 @@ function openssl_digest(string $data, string $digest_algo, bool $binary = false) function openssl_get_curve_names(): array { error_clear_last(); - $result = \openssl_get_curve_names(); - if ($result === false) { + $safeResult = \openssl_get_curve_names(); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -602,11 +602,11 @@ function openssl_open(string $data, ?string &$output, string $encrypted_key, $pr { error_clear_last(); if ($iv !== null) { - $result = \openssl_open($data, $output, $encrypted_key, $private_key, $cipher_algo, $iv); + $safeResult = \openssl_open($data, $output, $encrypted_key, $private_key, $cipher_algo, $iv); } else { - $result = \openssl_open($data, $output, $encrypted_key, $private_key, $cipher_algo); + $safeResult = \openssl_open($data, $output, $encrypted_key, $private_key, $cipher_algo); } - if ($result === false) { + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -629,11 +629,11 @@ function openssl_open(string $data, ?string &$output, string $encrypted_key, $pr function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algo = "sha1"): string { error_clear_last(); - $result = \openssl_pbkdf2($password, $salt, $key_length, $iterations, $digest_algo); - if ($result === false) { + $safeResult = \openssl_pbkdf2($password, $salt, $key_length, $iterations, $digest_algo); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -674,8 +674,8 @@ function openssl_pbkdf2(string $password, string $salt, int $key_length, int $it function openssl_pkcs12_export_to_file($certificate, string $output_filename, $private_key, string $passphrase, array $options = []): void { error_clear_last(); - $result = \openssl_pkcs12_export_to_file($certificate, $output_filename, $private_key, $passphrase, $options); - if ($result === false) { + $safeResult = \openssl_pkcs12_export_to_file($certificate, $output_filename, $private_key, $passphrase, $options); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -718,8 +718,8 @@ function openssl_pkcs12_export_to_file($certificate, string $output_filename, $p function openssl_pkcs12_export($certificate, ?string &$output, $private_key, string $passphrase, array $options = []): void { error_clear_last(); - $result = \openssl_pkcs12_export($certificate, $output, $private_key, $passphrase, $options); - if ($result === false) { + $safeResult = \openssl_pkcs12_export($certificate, $output, $private_key, $passphrase, $options); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -739,8 +739,8 @@ function openssl_pkcs12_export($certificate, ?string &$output, $private_key, str function openssl_pkcs12_read(string $pkcs12, ?array &$certificates, string $passphrase): void { error_clear_last(); - $result = \openssl_pkcs12_read($pkcs12, $certificates, $passphrase); - if ($result === false) { + $safeResult = \openssl_pkcs12_read($pkcs12, $certificates, $passphrase); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -764,11 +764,11 @@ function openssl_pkcs7_decrypt(string $input_filename, string $output_filename, { error_clear_last(); if ($private_key !== null) { - $result = \openssl_pkcs7_decrypt($input_filename, $output_filename, $certificate, $private_key); + $safeResult = \openssl_pkcs7_decrypt($input_filename, $output_filename, $certificate, $private_key); } else { - $result = \openssl_pkcs7_decrypt($input_filename, $output_filename, $certificate); + $safeResult = \openssl_pkcs7_decrypt($input_filename, $output_filename, $certificate); } - if ($result === false) { + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -799,8 +799,8 @@ function openssl_pkcs7_decrypt(string $input_filename, string $output_filename, function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, $certificate, array $headers, int $flags = 0, int $cipher_algo = OPENSSL_CIPHER_AES_128_CBC): void { error_clear_last(); - $result = \openssl_pkcs7_encrypt($input_filename, $output_filename, $certificate, $headers, $flags, $cipher_algo); - if ($result === false) { + $safeResult = \openssl_pkcs7_encrypt($input_filename, $output_filename, $certificate, $headers, $flags, $cipher_algo); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -817,8 +817,8 @@ function openssl_pkcs7_encrypt(string $input_filename, string $output_filename, function openssl_pkcs7_read(string $data, ?array &$certificates): void { error_clear_last(); - $result = \openssl_pkcs7_read($data, $certificates); - if ($result === false) { + $safeResult = \openssl_pkcs7_read($data, $certificates); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -852,11 +852,11 @@ function openssl_pkcs7_sign(string $input_filename, string $output_filename, $ce { error_clear_last(); if ($untrusted_certificates_filename !== null) { - $result = \openssl_pkcs7_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags, $untrusted_certificates_filename); + $safeResult = \openssl_pkcs7_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags, $untrusted_certificates_filename); } else { - $result = \openssl_pkcs7_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags); + $safeResult = \openssl_pkcs7_sign($input_filename, $output_filename, $certificate, $private_key, $headers, $flags); } - if ($result === false) { + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -878,11 +878,11 @@ function openssl_pkcs7_sign(string $input_filename, string $output_filename, $ce function openssl_pkey_derive($public_key, $private_key, int $key_length = 0): string { error_clear_last(); - $result = \openssl_pkey_derive($public_key, $private_key, $key_length); - if ($result === false) { + $safeResult = \openssl_pkey_derive($public_key, $private_key, $key_length); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -906,13 +906,13 @@ function openssl_pkey_export_to_file($key, string $output_filename, ?string $pas { error_clear_last(); if ($options !== null) { - $result = \openssl_pkey_export_to_file($key, $output_filename, $passphrase, $options); + $safeResult = \openssl_pkey_export_to_file($key, $output_filename, $passphrase, $options); } elseif ($passphrase !== null) { - $result = \openssl_pkey_export_to_file($key, $output_filename, $passphrase); + $safeResult = \openssl_pkey_export_to_file($key, $output_filename, $passphrase); } else { - $result = \openssl_pkey_export_to_file($key, $output_filename); + $safeResult = \openssl_pkey_export_to_file($key, $output_filename); } - if ($result === false) { + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -937,13 +937,13 @@ function openssl_pkey_export($key, ?string &$output, ?string $passphrase = null, { error_clear_last(); if ($options !== null) { - $result = \openssl_pkey_export($key, $output, $passphrase, $options); + $safeResult = \openssl_pkey_export($key, $output, $passphrase, $options); } elseif ($passphrase !== null) { - $result = \openssl_pkey_export($key, $output, $passphrase); + $safeResult = \openssl_pkey_export($key, $output, $passphrase); } else { - $result = \openssl_pkey_export($key, $output); + $safeResult = \openssl_pkey_export($key, $output); } - if ($result === false) { + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -972,14 +972,14 @@ function openssl_pkey_get_private(string $private_key, string $passphrase = null { error_clear_last(); if ($passphrase !== null) { - $result = \openssl_pkey_get_private($private_key, $passphrase); + $safeResult = \openssl_pkey_get_private($private_key, $passphrase); } else { - $result = \openssl_pkey_get_private($private_key); + $safeResult = \openssl_pkey_get_private($private_key); } - if ($result === false) { + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1005,11 +1005,11 @@ function openssl_pkey_get_private(string $private_key, string $passphrase = null function openssl_pkey_get_public($public_key) { error_clear_last(); - $result = \openssl_pkey_get_public($public_key); - if ($result === false) { + $safeResult = \openssl_pkey_get_public($public_key); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1030,14 +1030,14 @@ function openssl_pkey_new(array $options = null) { error_clear_last(); if ($options !== null) { - $result = \openssl_pkey_new($options); + $safeResult = \openssl_pkey_new($options); } else { - $result = \openssl_pkey_new(); + $safeResult = \openssl_pkey_new(); } - if ($result === false) { + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1064,8 +1064,8 @@ function openssl_pkey_new(array $options = null) function openssl_private_decrypt(string $data, ?string &$decrypted_data, $private_key, int $padding = OPENSSL_PKCS1_PADDING): void { error_clear_last(); - $result = \openssl_private_decrypt($data, $decrypted_data, $private_key, $padding); - if ($result === false) { + $safeResult = \openssl_private_decrypt($data, $decrypted_data, $private_key, $padding); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -1092,8 +1092,8 @@ function openssl_private_decrypt(string $data, ?string &$decrypted_data, $privat function openssl_private_encrypt(string $data, ?string &$encrypted_data, $private_key, int $padding = OPENSSL_PKCS1_PADDING): void { error_clear_last(); - $result = \openssl_private_encrypt($data, $encrypted_data, $private_key, $padding); - if ($result === false) { + $safeResult = \openssl_private_encrypt($data, $encrypted_data, $private_key, $padding); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -1121,8 +1121,8 @@ function openssl_private_encrypt(string $data, ?string &$encrypted_data, $privat function openssl_public_decrypt(string $data, ?string &$decrypted_data, $public_key, int $padding = OPENSSL_PKCS1_PADDING): void { error_clear_last(); - $result = \openssl_public_decrypt($data, $decrypted_data, $public_key, $padding); - if ($result === false) { + $safeResult = \openssl_public_decrypt($data, $decrypted_data, $public_key, $padding); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -1152,8 +1152,8 @@ function openssl_public_decrypt(string $data, ?string &$decrypted_data, $public_ function openssl_public_encrypt(string $data, ?string &$encrypted_data, $public_key, int $padding = OPENSSL_PKCS1_PADDING): void { error_clear_last(); - $result = \openssl_public_encrypt($data, $encrypted_data, $public_key, $padding); - if ($result === false) { + $safeResult = \openssl_public_encrypt($data, $encrypted_data, $public_key, $padding); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -1192,11 +1192,11 @@ function openssl_public_encrypt(string $data, ?string &$encrypted_data, $public_ function openssl_seal(string $data, ?string &$sealed_data, ?array &$encrypted_keys, array $public_key, string $cipher_algo, ?string &$iv = null): int { error_clear_last(); - $result = \openssl_seal($data, $sealed_data, $encrypted_keys, $public_key, $cipher_algo, $iv); - if ($result === false) { + $safeResult = \openssl_seal($data, $sealed_data, $encrypted_keys, $public_key, $cipher_algo, $iv); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1222,8 +1222,8 @@ function openssl_seal(string $data, ?string &$sealed_data, ?array &$encrypted_ke function openssl_sign(string $data, ?string &$signature, $private_key, $algorithm = OPENSSL_ALGO_SHA1): void { error_clear_last(); - $result = \openssl_sign($data, $signature, $private_key, $algorithm); - if ($result === false) { + $safeResult = \openssl_sign($data, $signature, $private_key, $algorithm); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -1240,11 +1240,11 @@ function openssl_sign(string $data, ?string &$signature, $private_key, $algorith function openssl_spki_export_challenge(string $spki): ?string { error_clear_last(); - $result = \openssl_spki_export_challenge($spki); - if ($result === false) { + $safeResult = \openssl_spki_export_challenge($spki); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1259,11 +1259,11 @@ function openssl_spki_export_challenge(string $spki): ?string function openssl_spki_export(string $spki): ?string { error_clear_last(); - $result = \openssl_spki_export($spki); - if ($result === false) { + $safeResult = \openssl_spki_export($spki); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1284,11 +1284,11 @@ function openssl_spki_export(string $spki): ?string function openssl_spki_new($private_key, string $challenge, int $digest_algo = OPENSSL_ALGO_MD5): ?string { error_clear_last(); - $result = \openssl_spki_new($private_key, $challenge, $digest_algo); - if ($result === false) { + $safeResult = \openssl_spki_new($private_key, $challenge, $digest_algo); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1302,8 +1302,8 @@ function openssl_spki_new($private_key, string $challenge, int $digest_algo = OP function openssl_spki_verify(string $spki): void { error_clear_last(); - $result = \openssl_spki_verify($spki); - if ($result === false) { + $safeResult = \openssl_spki_verify($spki); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -1333,11 +1333,11 @@ function openssl_spki_verify(string $spki): void function openssl_verify(string $data, string $signature, $public_key, $algorithm = OPENSSL_ALGO_SHA1): int { error_clear_last(); - $result = \openssl_verify($data, $signature, $public_key, $algorithm); - if ($result === false) { + $safeResult = \openssl_verify($data, $signature, $public_key, $algorithm); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1359,8 +1359,8 @@ function openssl_verify(string $data, string $signature, $public_key, $algorithm function openssl_x509_export_to_file($certificate, string $output_filename, bool $no_text = true): void { error_clear_last(); - $result = \openssl_x509_export_to_file($certificate, $output_filename, $no_text); - if ($result === false) { + $safeResult = \openssl_x509_export_to_file($certificate, $output_filename, $no_text); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -1384,8 +1384,8 @@ function openssl_x509_export_to_file($certificate, string $output_filename, bool function openssl_x509_export($certificate, ?string &$output, bool $no_text = true): void { error_clear_last(); - $result = \openssl_x509_export($certificate, $output, $no_text); - if ($result === false) { + $safeResult = \openssl_x509_export($certificate, $output, $no_text); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } } @@ -1407,11 +1407,11 @@ function openssl_x509_export($certificate, ?string &$output, bool $no_text = tru function openssl_x509_fingerprint($certificate, string $digest_algo = "sha1", bool $binary = false): string { error_clear_last(); - $result = \openssl_x509_fingerprint($certificate, $digest_algo, $binary); - if ($result === false) { + $safeResult = \openssl_x509_fingerprint($certificate, $digest_algo, $binary); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1428,9 +1428,10 @@ function openssl_x509_fingerprint($certificate, string $digest_algo = "sha1", bo function openssl_x509_read($certificate) { error_clear_last(); - $result = \openssl_x509_read($certificate); - if ($result === false) { + $safeResult = \openssl_x509_read($certificate); + if ($safeResult === false) { throw OpensslException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/outcontrol.php b/generated/outcontrol.php index e52c4a08..3255edd0 100644 --- a/generated/outcontrol.php +++ b/generated/outcontrol.php @@ -20,8 +20,8 @@ function ob_clean(): void { error_clear_last(); - $result = \ob_clean(); - if ($result === false) { + $safeResult = \ob_clean(); + if ($safeResult === false) { throw OutcontrolException::createFromPhpError(); } } @@ -45,8 +45,8 @@ function ob_clean(): void function ob_end_clean(): void { error_clear_last(); - $result = \ob_end_clean(); - if ($result === false) { + $safeResult = \ob_end_clean(); + if ($safeResult === false) { throw OutcontrolException::createFromPhpError(); } } @@ -71,8 +71,8 @@ function ob_end_clean(): void function ob_end_flush(): void { error_clear_last(); - $result = \ob_end_flush(); - if ($result === false) { + $safeResult = \ob_end_flush(); + if ($safeResult === false) { throw OutcontrolException::createFromPhpError(); } } @@ -94,8 +94,8 @@ function ob_end_flush(): void function ob_flush(): void { error_clear_last(); - $result = \ob_flush(); - if ($result === false) { + $safeResult = \ob_flush(); + if ($safeResult === false) { throw OutcontrolException::createFromPhpError(); } } @@ -192,15 +192,15 @@ function ob_start($callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT { error_clear_last(); if ($flags !== PHP_OUTPUT_HANDLER_STDFLAGS) { - $result = \ob_start($callback, $chunk_size, $flags); + $safeResult = \ob_start($callback, $chunk_size, $flags); } elseif ($chunk_size !== 0) { - $result = \ob_start($callback, $chunk_size); + $safeResult = \ob_start($callback, $chunk_size); } elseif ($callback !== null) { - $result = \ob_start($callback); + $safeResult = \ob_start($callback); } else { - $result = \ob_start(); + $safeResult = \ob_start(); } - if ($result === false) { + if ($safeResult === false) { throw OutcontrolException::createFromPhpError(); } } @@ -226,8 +226,8 @@ function ob_start($callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT function output_add_rewrite_var(string $name, string $value): void { error_clear_last(); - $result = \output_add_rewrite_var($name, $value); - if ($result === false) { + $safeResult = \output_add_rewrite_var($name, $value); + if ($safeResult === false) { throw OutcontrolException::createFromPhpError(); } } @@ -244,8 +244,9 @@ function output_add_rewrite_var(string $name, string $value): void function output_reset_rewrite_vars(): void { error_clear_last(); - $result = \output_reset_rewrite_vars(); - if ($result === false) { + $safeResult = \output_reset_rewrite_vars(); + if ($safeResult === false) { throw OutcontrolException::createFromPhpError(); } } + diff --git a/generated/pcntl.php b/generated/pcntl.php index d05f7ff3..ba47d5e2 100644 --- a/generated/pcntl.php +++ b/generated/pcntl.php @@ -23,16 +23,16 @@ function pcntl_getpriority(int $process_id = null, int $mode = PRIO_PROCESS): in { error_clear_last(); if ($mode !== PRIO_PROCESS) { - $result = \pcntl_getpriority($process_id, $mode); + $safeResult = \pcntl_getpriority($process_id, $mode); } elseif ($process_id !== null) { - $result = \pcntl_getpriority($process_id); + $safeResult = \pcntl_getpriority($process_id); } else { - $result = \pcntl_getpriority(); + $safeResult = \pcntl_getpriority(); } - if ($result === false) { + if ($safeResult === false) { throw PcntlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -57,13 +57,13 @@ function pcntl_setpriority(int $priority, int $process_id = null, int $mode = PR { error_clear_last(); if ($mode !== PRIO_PROCESS) { - $result = \pcntl_setpriority($priority, $process_id, $mode); + $safeResult = \pcntl_setpriority($priority, $process_id, $mode); } elseif ($process_id !== null) { - $result = \pcntl_setpriority($priority, $process_id); + $safeResult = \pcntl_setpriority($priority, $process_id); } else { - $result = \pcntl_setpriority($priority); + $safeResult = \pcntl_setpriority($priority); } - if ($result === false) { + if ($safeResult === false) { throw PcntlException::createFromPhpError(); } } @@ -80,8 +80,8 @@ function pcntl_setpriority(int $priority, int $process_id = null, int $mode = PR function pcntl_signal_dispatch(): void { error_clear_last(); - $result = \pcntl_signal_dispatch(); - if ($result === false) { + $safeResult = \pcntl_signal_dispatch(); + if ($safeResult === false) { throw PcntlException::createFromPhpError(); } } @@ -135,8 +135,8 @@ function pcntl_signal_dispatch(): void function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): void { error_clear_last(); - $result = \pcntl_signal($signal, $handler, $restart_syscalls); - if ($result === false) { + $safeResult = \pcntl_signal($signal, $handler, $restart_syscalls); + if ($safeResult === false) { throw PcntlException::createFromPhpError(); } } @@ -165,8 +165,8 @@ function pcntl_signal(int $signal, $handler, bool $restart_syscalls = true): voi function pcntl_sigprocmask(int $mode, array $signals, ?array &$old_signals = null): void { error_clear_last(); - $result = \pcntl_sigprocmask($mode, $signals, $old_signals); - if ($result === false) { + $safeResult = \pcntl_sigprocmask($mode, $signals, $old_signals); + if ($safeResult === false) { throw PcntlException::createFromPhpError(); } } @@ -192,11 +192,11 @@ function pcntl_sigprocmask(int $mode, array $signals, ?array &$old_signals = nul function pcntl_sigtimedwait(array $signals, ?array &$info = [], int $seconds = 0, int $nanoseconds = 0): int { error_clear_last(); - $result = \pcntl_sigtimedwait($signals, $info, $seconds, $nanoseconds); - if ($result === false) { + $safeResult = \pcntl_sigtimedwait($signals, $info, $seconds, $nanoseconds); + if ($safeResult === false) { throw PcntlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -247,9 +247,10 @@ function pcntl_sigtimedwait(array $signals, ?array &$info = [], int $seconds = 0 function pcntl_sigwaitinfo(array $signals, ?array &$info = []): int { error_clear_last(); - $result = \pcntl_sigwaitinfo($signals, $info); - if ($result === false) { + $safeResult = \pcntl_sigwaitinfo($signals, $info); + if ($safeResult === false) { throw PcntlException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/pcre.php b/generated/pcre.php index 4ebb9839..cae4fa08 100644 --- a/generated/pcre.php +++ b/generated/pcre.php @@ -22,11 +22,11 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array { error_clear_last(); - $result = \preg_grep($pattern, $array, $flags); - if ($result === false) { + $safeResult = \preg_grep($pattern, $array, $flags); + if ($safeResult === false) { throw PcreException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -376,11 +376,11 @@ function preg_grep(string $pattern, array $array, int $flags = 0): array function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): ?int { error_clear_last(); - $result = \preg_match_all($pattern, $subject, $matches, $flags, $offset); - if ($result === false) { + $safeResult = \preg_match_all($pattern, $subject, $matches, $flags, $offset); + if ($safeResult === false) { throw PcreException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -613,11 +613,11 @@ function preg_match_all(string $pattern, string $subject, ?array &$matches = nul function preg_match(string $pattern, string $subject, ?iterable &$matches = null, int $flags = 0, int $offset = 0): int { error_clear_last(); - $result = \preg_match($pattern, $subject, $matches, $flags, $offset); - if ($result === false) { + $safeResult = \preg_match($pattern, $subject, $matches, $flags, $offset); + if ($safeResult === false) { throw PcreException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -677,9 +677,10 @@ function preg_match(string $pattern, string $subject, ?iterable &$matches = null function preg_split(string $pattern, string $subject, ?int $limit = -1, int $flags = 0): array { error_clear_last(); - $result = \preg_split($pattern, $subject, $limit, $flags); - if ($result === false) { + $safeResult = \preg_split($pattern, $subject, $limit, $flags); + if ($safeResult === false) { throw PcreException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/pgsql.php b/generated/pgsql.php index 14b5548d..7c5957d5 100644 --- a/generated/pgsql.php +++ b/generated/pgsql.php @@ -17,8 +17,8 @@ function pg_cancel_query($connection): void { error_clear_last(); - $result = \pg_cancel_query($connection); - if ($result === false) { + $safeResult = \pg_cancel_query($connection); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -74,11 +74,11 @@ function pg_cancel_query($connection): void function pg_connect(string $connection_string, int $flags = 0) { error_clear_last(); - $result = \pg_connect($connection_string, $flags); - if ($result === false) { + $safeResult = \pg_connect($connection_string, $flags); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -93,8 +93,8 @@ function pg_connect(string $connection_string, int $flags = 0) function pg_connection_reset($connection): void { error_clear_last(); - $result = \pg_connection_reset($connection); - if ($result === false) { + $safeResult = \pg_connection_reset($connection); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -124,11 +124,11 @@ function pg_connection_reset($connection): void function pg_convert($connection, string $table_name, array $values, int $flags = 0): array { error_clear_last(); - $result = \pg_convert($connection, $table_name, $values, $flags); - if ($result === false) { + $safeResult = \pg_convert($connection, $table_name, $values, $flags); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -153,8 +153,8 @@ function pg_convert($connection, string $table_name, array $values, int $flags = function pg_copy_from($connection, string $table_name, array $rows, string $separator = "\t", string $null_as = "\\\\N"): void { error_clear_last(); - $result = \pg_copy_from($connection, $table_name, $rows, $separator, $null_as); - if ($result === false) { + $safeResult = \pg_copy_from($connection, $table_name, $rows, $separator, $null_as); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -178,11 +178,11 @@ function pg_copy_from($connection, string $table_name, array $rows, string $sepa function pg_copy_to($connection, string $table_name, string $separator = "\t", string $null_as = "\\\\N"): array { error_clear_last(); - $result = \pg_copy_to($connection, $table_name, $separator, $null_as); - if ($result === false) { + $safeResult = \pg_copy_to($connection, $table_name, $separator, $null_as); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -224,11 +224,11 @@ function pg_copy_to($connection, string $table_name, string $separator = "\t", s function pg_delete($connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC) { error_clear_last(); - $result = \pg_delete($connection, $table_name, $conditions, $flags); - if ($result === false) { + $safeResult = \pg_delete($connection, $table_name, $conditions, $flags); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -252,11 +252,11 @@ function pg_end_copy($connection = null): void { error_clear_last(); if ($connection !== null) { - $result = \pg_end_copy($connection); + $safeResult = \pg_end_copy($connection); } else { - $result = \pg_end_copy(); + $safeResult = \pg_end_copy(); } - if ($result === false) { + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -301,18 +301,18 @@ function pg_execute($connection = null, string $stmtname = null, array $params = { error_clear_last(); if ($params !== null) { - $result = \pg_execute($connection, $stmtname, $params); + $safeResult = \pg_execute($connection, $stmtname, $params); } elseif ($stmtname !== null) { - $result = \pg_execute($connection, $stmtname); + $safeResult = \pg_execute($connection, $stmtname); } elseif ($connection !== null) { - $result = \pg_execute($connection); + $safeResult = \pg_execute($connection); } else { - $result = \pg_execute(); + $safeResult = \pg_execute(); } - if ($result === false) { + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -333,11 +333,11 @@ function pg_execute($connection = null, string $stmtname = null, array $params = function pg_field_table($result, int $field, bool $oid_only = false) { error_clear_last(); - $result = \pg_field_table($result, $field, $oid_only); - if ($result === false) { + $safeResult = \pg_field_table($result, $field, $oid_only); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -355,11 +355,11 @@ function pg_field_table($result, int $field, bool $oid_only = false) function pg_flush($connection) { error_clear_last(); - $result = \pg_flush($connection); - if ($result === false) { + $safeResult = \pg_flush($connection); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -379,8 +379,8 @@ function pg_flush($connection) function pg_free_result($result): void { error_clear_last(); - $result = \pg_free_result($result); - if ($result === false) { + $safeResult = \pg_free_result($result); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -405,14 +405,14 @@ function pg_host($connection = null): string { error_clear_last(); if ($connection !== null) { - $result = \pg_host($connection); + $safeResult = \pg_host($connection); } else { - $result = \pg_host(); + $safeResult = \pg_host(); } - if ($result === '') { + if ($safeResult === '') { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -456,11 +456,11 @@ function pg_host($connection = null): string function pg_insert($connection, string $table_name, array $values, int $flags = PGSQL_DML_EXEC) { error_clear_last(); - $result = \pg_insert($connection, $table_name, $values, $flags); - if ($result === false) { + $safeResult = \pg_insert($connection, $table_name, $values, $flags); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -495,11 +495,11 @@ function pg_insert($connection, string $table_name, array $values, int $flags = function pg_last_oid($result): string { error_clear_last(); - $result = \pg_last_oid($result); - if ($result === false) { + $safeResult = \pg_last_oid($result); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -516,8 +516,8 @@ function pg_last_oid($result): string function pg_lo_close($lob): void { error_clear_last(); - $result = \pg_lo_close($lob); - if ($result === false) { + $safeResult = \pg_lo_close($lob); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -546,15 +546,15 @@ function pg_lo_export($connection = null, int $oid = null, string $pathname = nu { error_clear_last(); if ($pathname !== null) { - $result = \pg_lo_export($connection, $oid, $pathname); + $safeResult = \pg_lo_export($connection, $oid, $pathname); } elseif ($oid !== null) { - $result = \pg_lo_export($connection, $oid); + $safeResult = \pg_lo_export($connection, $oid); } elseif ($connection !== null) { - $result = \pg_lo_export($connection); + $safeResult = \pg_lo_export($connection); } else { - $result = \pg_lo_export(); + $safeResult = \pg_lo_export(); } - if ($result === false) { + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -588,18 +588,18 @@ function pg_lo_import($connection = null, string $pathname = null, $object_id = { error_clear_last(); if ($object_id !== null) { - $result = \pg_lo_import($connection, $pathname, $object_id); + $safeResult = \pg_lo_import($connection, $pathname, $object_id); } elseif ($pathname !== null) { - $result = \pg_lo_import($connection, $pathname); + $safeResult = \pg_lo_import($connection, $pathname); } elseif ($connection !== null) { - $result = \pg_lo_import($connection); + $safeResult = \pg_lo_import($connection); } else { - $result = \pg_lo_import(); + $safeResult = \pg_lo_import(); } - if ($result === false) { + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -625,11 +625,11 @@ function pg_lo_import($connection = null, string $pathname = null, $object_id = function pg_lo_open($connection, int $oid, string $mode) { error_clear_last(); - $result = \pg_lo_open($connection, $oid, $mode); - if ($result === false) { + $safeResult = \pg_lo_open($connection, $oid, $mode); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -651,11 +651,11 @@ function pg_lo_open($connection, int $oid, string $mode) function pg_lo_read($lob, int $length = 8192): string { error_clear_last(); - $result = \pg_lo_read($lob, $length); - if ($result === false) { + $safeResult = \pg_lo_read($lob, $length); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -676,8 +676,8 @@ function pg_lo_read($lob, int $length = 8192): string function pg_lo_seek($lob, int $offset, int $whence = SEEK_CUR): void { error_clear_last(); - $result = \pg_lo_seek($lob, $offset, $whence); - if ($result === false) { + $safeResult = \pg_lo_seek($lob, $offset, $whence); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -697,8 +697,8 @@ function pg_lo_seek($lob, int $offset, int $whence = SEEK_CUR): void function pg_lo_truncate($lob, int $size): void { error_clear_last(); - $result = \pg_lo_truncate($lob, $size); - if ($result === false) { + $safeResult = \pg_lo_truncate($lob, $size); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -723,8 +723,8 @@ function pg_lo_truncate($lob, int $size): void function pg_lo_unlink($connection, int $oid): void { error_clear_last(); - $result = \pg_lo_unlink($connection, $oid); - if ($result === false) { + $safeResult = \pg_lo_unlink($connection, $oid); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -752,14 +752,14 @@ function pg_lo_write($lob, string $data, int $length = null): int { error_clear_last(); if ($length !== null) { - $result = \pg_lo_write($lob, $data, $length); + $safeResult = \pg_lo_write($lob, $data, $length); } else { - $result = \pg_lo_write($lob, $data); + $safeResult = \pg_lo_write($lob, $data); } - if ($result === false) { + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -777,11 +777,11 @@ function pg_lo_write($lob, string $data, int $length = null): int function pg_meta_data($connection, string $table_name, bool $extended = false): array { error_clear_last(); - $result = \pg_meta_data($connection, $table_name, $extended); - if ($result === false) { + $safeResult = \pg_meta_data($connection, $table_name, $extended); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -828,16 +828,16 @@ function pg_parameter_status($connection = null, string $param_name = null): str { error_clear_last(); if ($param_name !== null) { - $result = \pg_parameter_status($connection, $param_name); + $safeResult = \pg_parameter_status($connection, $param_name); } elseif ($connection !== null) { - $result = \pg_parameter_status($connection); + $safeResult = \pg_parameter_status($connection); } else { - $result = \pg_parameter_status(); + $safeResult = \pg_parameter_status(); } - if ($result === false) { + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -888,11 +888,11 @@ function pg_parameter_status($connection = null, string $param_name = null): str function pg_pconnect(string $connection_string, int $flags = 0) { error_clear_last(); - $result = \pg_pconnect($connection_string, $flags); - if ($result === false) { + $safeResult = \pg_pconnect($connection_string, $flags); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -912,11 +912,11 @@ function pg_ping($connection = null): void { error_clear_last(); if ($connection !== null) { - $result = \pg_ping($connection); + $safeResult = \pg_ping($connection); } else { - $result = \pg_ping(); + $safeResult = \pg_ping(); } - if ($result === false) { + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -962,18 +962,18 @@ function pg_prepare($connection = null, string $stmtname = null, string $query = { error_clear_last(); if ($query !== null) { - $result = \pg_prepare($connection, $stmtname, $query); + $safeResult = \pg_prepare($connection, $stmtname, $query); } elseif ($stmtname !== null) { - $result = \pg_prepare($connection, $stmtname); + $safeResult = \pg_prepare($connection, $stmtname); } elseif ($connection !== null) { - $result = \pg_prepare($connection); + $safeResult = \pg_prepare($connection); } else { - $result = \pg_prepare(); + $safeResult = \pg_prepare(); } - if ($result === false) { + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1004,13 +1004,13 @@ function pg_put_line($connection = null, string $data = null): void { error_clear_last(); if ($data !== null) { - $result = \pg_put_line($connection, $data); + $safeResult = \pg_put_line($connection, $data); } elseif ($connection !== null) { - $result = \pg_put_line($connection); + $safeResult = \pg_put_line($connection); } else { - $result = \pg_put_line(); + $safeResult = \pg_put_line(); } - if ($result === false) { + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -1071,18 +1071,18 @@ function pg_query_params($connection = null, string $query = null, array $params { error_clear_last(); if ($params !== null) { - $result = \pg_query_params($connection, $query, $params); + $safeResult = \pg_query_params($connection, $query, $params); } elseif ($query !== null) { - $result = \pg_query_params($connection, $query); + $safeResult = \pg_query_params($connection, $query); } elseif ($connection !== null) { - $result = \pg_query_params($connection); + $safeResult = \pg_query_params($connection); } else { - $result = \pg_query_params(); + $safeResult = \pg_query_params(); } - if ($result === false) { + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1130,16 +1130,16 @@ function pg_query($connection = null, string $query = null) { error_clear_last(); if ($query !== null) { - $result = \pg_query($connection, $query); + $safeResult = \pg_query($connection, $query); } elseif ($connection !== null) { - $result = \pg_query($connection); + $safeResult = \pg_query($connection); } else { - $result = \pg_query(); + $safeResult = \pg_query(); } - if ($result === false) { + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1175,11 +1175,11 @@ function pg_query($connection = null, string $query = null) function pg_result_error_field($result, int $field_code): ?string { error_clear_last(); - $result = \pg_result_error_field($result, $field_code); - if ($result === false) { + $safeResult = \pg_result_error_field($result, $field_code); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1197,8 +1197,8 @@ function pg_result_error_field($result, int $field_code): ?string function pg_result_seek($result, int $row): void { error_clear_last(); - $result = \pg_result_seek($result, $row); - if ($result === false) { + $safeResult = \pg_result_seek($result, $row); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -1246,11 +1246,11 @@ function pg_result_seek($result, int $row): void function pg_select($connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC, int $mode = PGSQL_ASSOC) { error_clear_last(); - $result = \pg_select($connection, $table_name, $conditions, $flags, $mode); - if ($result === false) { + $safeResult = \pg_select($connection, $table_name, $conditions, $flags, $mode); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1266,11 +1266,11 @@ function pg_select($connection, string $table_name, array $conditions, int $flag function pg_socket($connection) { error_clear_last(); - $result = \pg_socket($connection); - if ($result === false) { + $safeResult = \pg_socket($connection); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1302,11 +1302,11 @@ function pg_trace(string $filename, string $mode = "w", $connection = null): voi { error_clear_last(); if ($connection !== null) { - $result = \pg_trace($filename, $mode, $connection); + $safeResult = \pg_trace($filename, $mode, $connection); } else { - $result = \pg_trace($filename, $mode); + $safeResult = \pg_trace($filename, $mode); } - if ($result === false) { + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } } @@ -1352,9 +1352,10 @@ function pg_trace(string $filename, string $mode = "w", $connection = null): voi function pg_update($connection, string $table_name, array $values, array $conditions, int $flags = PGSQL_DML_EXEC) { error_clear_last(); - $result = \pg_update($connection, $table_name, $values, $conditions, $flags); - if ($result === false) { + $safeResult = \pg_update($connection, $table_name, $values, $conditions, $flags); + if ($safeResult === false) { throw PgsqlException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/posix.php b/generated/posix.php index 26b77eaa..9866bc51 100644 --- a/generated/posix.php +++ b/generated/posix.php @@ -23,8 +23,8 @@ function posix_access(string $filename, int $flags = 0): void { error_clear_last(); - $result = \posix_access($filename, $flags); - if ($result === false) { + $safeResult = \posix_access($filename, $flags); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } } @@ -86,11 +86,11 @@ function posix_access(string $filename, int $flags = 0): void function posix_getgrgid(int $group_id): array { error_clear_last(); - $result = \posix_getgrgid($group_id); - if ($result === false) { + $safeResult = \posix_getgrgid($group_id); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -150,11 +150,11 @@ function posix_getgrgid(int $group_id): array function posix_getgrnam(string $name): array { error_clear_last(); - $result = \posix_getgrnam($name); - if ($result === false) { + $safeResult = \posix_getgrnam($name); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -169,11 +169,11 @@ function posix_getgrnam(string $name): array function posix_getgroups(): array { error_clear_last(); - $result = \posix_getgroups(); - if ($result === false) { + $safeResult = \posix_getgroups(); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -187,11 +187,11 @@ function posix_getgroups(): array function posix_getlogin(): string { error_clear_last(); - $result = \posix_getlogin(); - if ($result === false) { + $safeResult = \posix_getlogin(); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -279,11 +279,11 @@ function posix_getlogin(): string function posix_getpwuid(int $user_id): array { error_clear_last(); - $result = \posix_getpwuid($user_id); - if ($result === false) { + $safeResult = \posix_getpwuid($user_id); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -389,11 +389,11 @@ function posix_getpwuid(int $user_id): array function posix_getrlimit(): array { error_clear_last(); - $result = \posix_getrlimit(); - if ($result === false) { + $safeResult = \posix_getrlimit(); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -412,11 +412,11 @@ function posix_getrlimit(): array function posix_getsid(int $process_id): int { error_clear_last(); - $result = \posix_getsid($process_id); - if ($result === false) { + $safeResult = \posix_getsid($process_id); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -431,8 +431,8 @@ function posix_getsid(int $process_id): int function posix_initgroups(string $username, int $group_id): void { error_clear_last(); - $result = \posix_initgroups($username, $group_id); - if ($result === false) { + $safeResult = \posix_initgroups($username, $group_id); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } } @@ -450,8 +450,8 @@ function posix_initgroups(string $username, int $group_id): void function posix_kill(int $process_id, int $signal): void { error_clear_last(); - $result = \posix_kill($process_id, $signal); - if ($result === false) { + $safeResult = \posix_kill($process_id, $signal); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } } @@ -474,8 +474,8 @@ function posix_kill(int $process_id, int $signal): void function posix_mkfifo(string $filename, int $permissions): void { error_clear_last(); - $result = \posix_mkfifo($filename, $permissions); - if ($result === false) { + $safeResult = \posix_mkfifo($filename, $permissions); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } } @@ -499,8 +499,8 @@ function posix_mkfifo(string $filename, int $permissions): void function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = 0): void { error_clear_last(); - $result = \posix_mknod($filename, $flags, $major, $minor); - if ($result === false) { + $safeResult = \posix_mknod($filename, $flags, $major, $minor); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } } @@ -518,8 +518,8 @@ function posix_mknod(string $filename, int $flags, int $major = 0, int $minor = function posix_setegid(int $group_id): void { error_clear_last(); - $result = \posix_setegid($group_id); - if ($result === false) { + $safeResult = \posix_setegid($group_id); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } } @@ -537,8 +537,8 @@ function posix_setegid(int $group_id): void function posix_seteuid(int $user_id): void { error_clear_last(); - $result = \posix_seteuid($user_id); - if ($result === false) { + $safeResult = \posix_seteuid($user_id); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } } @@ -559,8 +559,8 @@ function posix_seteuid(int $user_id): void function posix_setgid(int $group_id): void { error_clear_last(); - $result = \posix_setgid($group_id); - if ($result === false) { + $safeResult = \posix_setgid($group_id); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } } @@ -578,8 +578,8 @@ function posix_setgid(int $group_id): void function posix_setpgid(int $process_id, int $process_group_id): void { error_clear_last(); - $result = \posix_setpgid($process_id, $process_group_id); - if ($result === false) { + $safeResult = \posix_setpgid($process_id, $process_group_id); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } } @@ -609,8 +609,8 @@ function posix_setpgid(int $process_id, int $process_group_id): void function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): void { error_clear_last(); - $result = \posix_setrlimit($resource, $soft_limit, $hard_limit); - if ($result === false) { + $safeResult = \posix_setrlimit($resource, $soft_limit, $hard_limit); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } } @@ -628,8 +628,8 @@ function posix_setrlimit(int $resource, int $soft_limit, int $hard_limit): void function posix_setuid(int $user_id): void { error_clear_last(); - $result = \posix_setuid($user_id); - if ($result === false) { + $safeResult = \posix_setuid($user_id); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } } @@ -675,11 +675,11 @@ function posix_setuid(int $user_id): void function posix_times(): array { error_clear_last(); - $result = \posix_times(); - if ($result === false) { + $safeResult = \posix_times(); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -725,9 +725,10 @@ function posix_times(): array function posix_uname(): array { error_clear_last(); - $result = \posix_uname(); - if ($result === false) { + $safeResult = \posix_uname(); + if ($safeResult === false) { throw PosixException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/ps.php b/generated/ps.php index a2dca797..2cc4fe6a 100644 --- a/generated/ps.php +++ b/generated/ps.php @@ -28,8 +28,8 @@ function ps_add_launchlink($psdoc, float $llx, float $lly, float $urx, float $ury, string $filename): void { error_clear_last(); - $result = \ps_add_launchlink($psdoc, $llx, $lly, $urx, $ury, $filename); - if ($result === false) { + $safeResult = \ps_add_launchlink($psdoc, $llx, $lly, $urx, $ury, $filename); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -66,8 +66,8 @@ function ps_add_launchlink($psdoc, float $llx, float $lly, float $urx, float $ur function ps_add_locallink($psdoc, float $llx, float $lly, float $urx, float $ury, int $page, string $dest): void { error_clear_last(); - $result = \ps_add_locallink($psdoc, $llx, $lly, $urx, $ury, $page, $dest); - if ($result === false) { + $safeResult = \ps_add_locallink($psdoc, $llx, $lly, $urx, $ury, $page, $dest); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -105,8 +105,8 @@ function ps_add_locallink($psdoc, float $llx, float $lly, float $urx, float $ury function ps_add_note($psdoc, float $llx, float $lly, float $urx, float $ury, string $contents, string $title, string $icon, int $open): void { error_clear_last(); - $result = \ps_add_note($psdoc, $llx, $lly, $urx, $ury, $contents, $title, $icon, $open); - if ($result === false) { + $safeResult = \ps_add_note($psdoc, $llx, $lly, $urx, $ury, $contents, $title, $icon, $open); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -145,8 +145,8 @@ function ps_add_note($psdoc, float $llx, float $lly, float $urx, float $ury, str function ps_add_pdflink($psdoc, float $llx, float $lly, float $urx, float $ury, string $filename, int $page, string $dest): void { error_clear_last(); - $result = \ps_add_pdflink($psdoc, $llx, $lly, $urx, $ury, $filename, $page, $dest); - if ($result === false) { + $safeResult = \ps_add_pdflink($psdoc, $llx, $lly, $urx, $ury, $filename, $page, $dest); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -178,8 +178,8 @@ function ps_add_pdflink($psdoc, float $llx, float $lly, float $urx, float $ury, function ps_add_weblink($psdoc, float $llx, float $lly, float $urx, float $ury, string $url): void { error_clear_last(); - $result = \ps_add_weblink($psdoc, $llx, $lly, $urx, $ury, $url); - if ($result === false) { + $safeResult = \ps_add_weblink($psdoc, $llx, $lly, $urx, $ury, $url); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -207,8 +207,8 @@ function ps_add_weblink($psdoc, float $llx, float $lly, float $urx, float $ury, function ps_arc($psdoc, float $x, float $y, float $radius, float $alpha, float $beta): void { error_clear_last(); - $result = \ps_arc($psdoc, $x, $y, $radius, $alpha, $beta); - if ($result === false) { + $safeResult = \ps_arc($psdoc, $x, $y, $radius, $alpha, $beta); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -236,8 +236,8 @@ function ps_arc($psdoc, float $x, float $y, float $radius, float $alpha, float $ function ps_arcn($psdoc, float $x, float $y, float $radius, float $alpha, float $beta): void { error_clear_last(); - $result = \ps_arcn($psdoc, $x, $y, $radius, $alpha, $beta); - if ($result === false) { + $safeResult = \ps_arcn($psdoc, $x, $y, $radius, $alpha, $beta); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -287,8 +287,8 @@ function ps_arcn($psdoc, float $x, float $y, float $radius, float $alpha, float function ps_begin_page($psdoc, float $width, float $height): void { error_clear_last(); - $result = \ps_begin_page($psdoc, $width, $height); - if ($result === false) { + $safeResult = \ps_begin_page($psdoc, $width, $height); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -316,11 +316,11 @@ function ps_begin_page($psdoc, float $width, float $height): void function ps_begin_pattern($psdoc, float $width, float $height, float $xstep, float $ystep, int $painttype): int { error_clear_last(); - $result = \ps_begin_pattern($psdoc, $width, $height, $xstep, $ystep, $painttype); - if ($result === false) { + $safeResult = \ps_begin_pattern($psdoc, $width, $height, $xstep, $ystep, $painttype); + if ($safeResult === false) { throw PsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -343,11 +343,11 @@ function ps_begin_pattern($psdoc, float $width, float $height, float $xstep, flo function ps_begin_template($psdoc, float $width, float $height): int { error_clear_last(); - $result = \ps_begin_template($psdoc, $width, $height); - if ($result === false) { + $safeResult = \ps_begin_template($psdoc, $width, $height); + if ($safeResult === false) { throw PsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -372,8 +372,8 @@ function ps_begin_template($psdoc, float $width, float $height): int function ps_circle($psdoc, float $x, float $y, float $radius): void { error_clear_last(); - $result = \ps_circle($psdoc, $x, $y, $radius); - if ($result === false) { + $safeResult = \ps_circle($psdoc, $x, $y, $radius); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -391,8 +391,8 @@ function ps_circle($psdoc, float $x, float $y, float $radius): void function ps_clip($psdoc): void { error_clear_last(); - $result = \ps_clip($psdoc); - if ($result === false) { + $safeResult = \ps_clip($psdoc); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -413,8 +413,8 @@ function ps_clip($psdoc): void function ps_close_image($psdoc, int $imageid): void { error_clear_last(); - $result = \ps_close_image($psdoc, $imageid); - if ($result === false) { + $safeResult = \ps_close_image($psdoc, $imageid); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -438,8 +438,8 @@ function ps_close_image($psdoc, int $imageid): void function ps_close($psdoc): void { error_clear_last(); - $result = \ps_close($psdoc); - if ($result === false) { + $safeResult = \ps_close($psdoc); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -457,8 +457,8 @@ function ps_close($psdoc): void function ps_closepath_stroke($psdoc): void { error_clear_last(); - $result = \ps_closepath_stroke($psdoc); - if ($result === false) { + $safeResult = \ps_closepath_stroke($psdoc); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -476,8 +476,8 @@ function ps_closepath_stroke($psdoc): void function ps_closepath($psdoc): void { error_clear_last(); - $result = \ps_closepath($psdoc); - if ($result === false) { + $safeResult = \ps_closepath($psdoc); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -499,8 +499,8 @@ function ps_closepath($psdoc): void function ps_continue_text($psdoc, string $text): void { error_clear_last(); - $result = \ps_continue_text($psdoc, $text); - if ($result === false) { + $safeResult = \ps_continue_text($psdoc, $text); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -524,8 +524,8 @@ function ps_continue_text($psdoc, string $text): void function ps_curveto($psdoc, float $x1, float $y1, float $x2, float $y2, float $x3, float $y3): void { error_clear_last(); - $result = \ps_curveto($psdoc, $x1, $y1, $x2, $y2, $x3, $y3); - if ($result === false) { + $safeResult = \ps_curveto($psdoc, $x1, $y1, $x2, $y2, $x3, $y3); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -547,8 +547,8 @@ function ps_curveto($psdoc, float $x1, float $y1, float $x2, float $y2, float $x function ps_delete($psdoc): void { error_clear_last(); - $result = \ps_delete($psdoc); - if ($result === false) { + $safeResult = \ps_delete($psdoc); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -568,8 +568,8 @@ function ps_delete($psdoc): void function ps_end_page($psdoc): void { error_clear_last(); - $result = \ps_end_page($psdoc); - if ($result === false) { + $safeResult = \ps_end_page($psdoc); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -588,8 +588,8 @@ function ps_end_page($psdoc): void function ps_end_pattern($psdoc): void { error_clear_last(); - $result = \ps_end_pattern($psdoc); - if ($result === false) { + $safeResult = \ps_end_pattern($psdoc); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -607,8 +607,8 @@ function ps_end_pattern($psdoc): void function ps_end_template($psdoc): void { error_clear_last(); - $result = \ps_end_template($psdoc); - if ($result === false) { + $safeResult = \ps_end_template($psdoc); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -626,8 +626,8 @@ function ps_end_template($psdoc): void function ps_fill_stroke($psdoc): void { error_clear_last(); - $result = \ps_fill_stroke($psdoc); - if ($result === false) { + $safeResult = \ps_fill_stroke($psdoc); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -645,8 +645,8 @@ function ps_fill_stroke($psdoc): void function ps_fill($psdoc): void { error_clear_last(); - $result = \ps_fill($psdoc); - if ($result === false) { + $safeResult = \ps_fill($psdoc); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -782,14 +782,14 @@ function ps_get_parameter($psdoc, string $name, float $modifier = null): string { error_clear_last(); if ($modifier !== null) { - $result = \ps_get_parameter($psdoc, $name, $modifier); + $safeResult = \ps_get_parameter($psdoc, $name, $modifier); } else { - $result = \ps_get_parameter($psdoc, $name); + $safeResult = \ps_get_parameter($psdoc, $name); } - if ($result === false) { + if ($safeResult === false) { throw PsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -817,11 +817,11 @@ function ps_get_parameter($psdoc, string $name, float $modifier = null): string function ps_hyphenate($psdoc, string $text): array { error_clear_last(); - $result = \ps_hyphenate($psdoc, $text); - if ($result === false) { + $safeResult = \ps_hyphenate($psdoc, $text); + if ($safeResult === false) { throw PsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -839,8 +839,8 @@ function ps_hyphenate($psdoc, string $text): array function ps_include_file($psdoc, string $file): void { error_clear_last(); - $result = \ps_include_file($psdoc, $file); - if ($result === false) { + $safeResult = \ps_include_file($psdoc, $file); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -861,8 +861,8 @@ function ps_include_file($psdoc, string $file): void function ps_lineto($psdoc, float $x, float $y): void { error_clear_last(); - $result = \ps_lineto($psdoc, $x, $y); - if ($result === false) { + $safeResult = \ps_lineto($psdoc, $x, $y); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -884,8 +884,8 @@ function ps_lineto($psdoc, float $x, float $y): void function ps_moveto($psdoc, float $x, float $y): void { error_clear_last(); - $result = \ps_moveto($psdoc, $x, $y); - if ($result === false) { + $safeResult = \ps_moveto($psdoc, $x, $y); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -905,11 +905,11 @@ function ps_moveto($psdoc, float $x, float $y): void function ps_new() { error_clear_last(); - $result = \ps_new(); - if ($result === false) { + $safeResult = \ps_new(); + if ($safeResult === false) { throw PsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -929,11 +929,11 @@ function ps_open_file($psdoc, string $filename = null): void { error_clear_last(); if ($filename !== null) { - $result = \ps_open_file($psdoc, $filename); + $safeResult = \ps_open_file($psdoc, $filename); } else { - $result = \ps_open_file($psdoc); + $safeResult = \ps_open_file($psdoc); } - if ($result === false) { + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -960,8 +960,8 @@ function ps_open_file($psdoc, string $filename = null): void function ps_place_image($psdoc, int $imageid, float $x, float $y, float $scale): void { error_clear_last(); - $result = \ps_place_image($psdoc, $imageid, $x, $y, $scale); - if ($result === false) { + $safeResult = \ps_place_image($psdoc, $imageid, $x, $y, $scale); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -987,8 +987,8 @@ function ps_place_image($psdoc, int $imageid, float $x, float $y, float $scale): function ps_rect($psdoc, float $x, float $y, float $width, float $height): void { error_clear_last(); - $result = \ps_rect($psdoc, $x, $y, $width, $height); - if ($result === false) { + $safeResult = \ps_rect($psdoc, $x, $y, $width, $height); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1009,8 +1009,8 @@ function ps_rect($psdoc, float $x, float $y, float $width, float $height): void function ps_restore($psdoc): void { error_clear_last(); - $result = \ps_restore($psdoc); - if ($result === false) { + $safeResult = \ps_restore($psdoc); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1028,8 +1028,8 @@ function ps_restore($psdoc): void function ps_rotate($psdoc, float $rot): void { error_clear_last(); - $result = \ps_rotate($psdoc, $rot); - if ($result === false) { + $safeResult = \ps_rotate($psdoc, $rot); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1048,8 +1048,8 @@ function ps_rotate($psdoc, float $rot): void function ps_save($psdoc): void { error_clear_last(); - $result = \ps_save($psdoc); - if ($result === false) { + $safeResult = \ps_save($psdoc); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1068,8 +1068,8 @@ function ps_save($psdoc): void function ps_scale($psdoc, float $x, float $y): void { error_clear_last(); - $result = \ps_scale($psdoc, $x, $y); - if ($result === false) { + $safeResult = \ps_scale($psdoc, $x, $y); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1094,8 +1094,8 @@ function ps_scale($psdoc, float $x, float $y): void function ps_set_border_color($psdoc, float $red, float $green, float $blue): void { error_clear_last(); - $result = \ps_set_border_color($psdoc, $red, $green, $blue); - if ($result === false) { + $safeResult = \ps_set_border_color($psdoc, $red, $green, $blue); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1120,8 +1120,8 @@ function ps_set_border_color($psdoc, float $red, float $green, float $blue): voi function ps_set_border_dash($psdoc, float $black, float $white): void { error_clear_last(); - $result = \ps_set_border_dash($psdoc, $black, $white); - if ($result === false) { + $safeResult = \ps_set_border_dash($psdoc, $black, $white); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1146,8 +1146,8 @@ function ps_set_border_dash($psdoc, float $black, float $white): void function ps_set_border_style($psdoc, string $style, float $width): void { error_clear_last(); - $result = \ps_set_border_style($psdoc, $style, $width); - if ($result === false) { + $safeResult = \ps_set_border_style($psdoc, $style, $width); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1193,8 +1193,8 @@ function ps_set_border_style($psdoc, string $style, float $width): void function ps_set_info($p, string $key, string $val): void { error_clear_last(); - $result = \ps_set_info($p, $key, $val); - if ($result === false) { + $safeResult = \ps_set_info($p, $key, $val); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1214,8 +1214,8 @@ function ps_set_info($p, string $key, string $val): void function ps_set_parameter($psdoc, string $name, string $value): void { error_clear_last(); - $result = \ps_set_parameter($psdoc, $name, $value); - if ($result === false) { + $safeResult = \ps_set_parameter($psdoc, $name, $value); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1241,8 +1241,8 @@ function ps_set_parameter($psdoc, string $name, string $value): void function ps_set_text_pos($psdoc, float $x, float $y): void { error_clear_last(); - $result = \ps_set_text_pos($psdoc, $x, $y); - if ($result === false) { + $safeResult = \ps_set_text_pos($psdoc, $x, $y); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1314,8 +1314,8 @@ function ps_set_text_pos($psdoc, float $x, float $y): void function ps_set_value($psdoc, string $name, float $value): void { error_clear_last(); - $result = \ps_set_value($psdoc, $name, $value); - if ($result === false) { + $safeResult = \ps_set_value($psdoc, $name, $value); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1349,8 +1349,8 @@ function ps_set_value($psdoc, string $name, float $value): void function ps_setcolor($psdoc, string $type, string $colorspace, float $c1, float $c2, float $c3, float $c4): void { error_clear_last(); - $result = \ps_setcolor($psdoc, $type, $colorspace, $c1, $c2, $c3, $c4); - if ($result === false) { + $safeResult = \ps_setcolor($psdoc, $type, $colorspace, $c1, $c2, $c3, $c4); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1369,8 +1369,8 @@ function ps_setcolor($psdoc, string $type, string $colorspace, float $c1, float function ps_setdash($psdoc, float $on, float $off): void { error_clear_last(); - $result = \ps_setdash($psdoc, $on, $off); - if ($result === false) { + $safeResult = \ps_setdash($psdoc, $on, $off); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1390,8 +1390,8 @@ function ps_setdash($psdoc, float $on, float $off): void function ps_setflat($psdoc, float $value): void { error_clear_last(); - $result = \ps_setflat($psdoc, $value); - if ($result === false) { + $safeResult = \ps_setflat($psdoc, $value); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1412,8 +1412,8 @@ function ps_setflat($psdoc, float $value): void function ps_setfont($psdoc, int $fontid, float $size): void { error_clear_last(); - $result = \ps_setfont($psdoc, $fontid, $size); - if ($result === false) { + $safeResult = \ps_setfont($psdoc, $fontid, $size); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1431,8 +1431,8 @@ function ps_setfont($psdoc, int $fontid, float $size): void function ps_setgray($psdoc, float $gray): void { error_clear_last(); - $result = \ps_setgray($psdoc, $gray); - if ($result === false) { + $safeResult = \ps_setgray($psdoc, $gray); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1453,8 +1453,8 @@ function ps_setgray($psdoc, float $gray): void function ps_setlinecap($psdoc, int $type): void { error_clear_last(); - $result = \ps_setlinecap($psdoc, $type); - if ($result === false) { + $safeResult = \ps_setlinecap($psdoc, $type); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1475,8 +1475,8 @@ function ps_setlinecap($psdoc, int $type): void function ps_setlinejoin($psdoc, int $type): void { error_clear_last(); - $result = \ps_setlinejoin($psdoc, $type); - if ($result === false) { + $safeResult = \ps_setlinejoin($psdoc, $type); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1494,8 +1494,8 @@ function ps_setlinejoin($psdoc, int $type): void function ps_setlinewidth($psdoc, float $width): void { error_clear_last(); - $result = \ps_setlinewidth($psdoc, $width); - if ($result === false) { + $safeResult = \ps_setlinewidth($psdoc, $width); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1518,8 +1518,8 @@ function ps_setlinewidth($psdoc, float $width): void function ps_setmiterlimit($psdoc, float $value): void { error_clear_last(); - $result = \ps_setmiterlimit($psdoc, $value); - if ($result === false) { + $safeResult = \ps_setmiterlimit($psdoc, $value); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1539,8 +1539,8 @@ function ps_setmiterlimit($psdoc, float $value): void function ps_setoverprintmode($psdoc, int $mode): void { error_clear_last(); - $result = \ps_setoverprintmode($psdoc, $mode); - if ($result === false) { + $safeResult = \ps_setoverprintmode($psdoc, $mode); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1561,8 +1561,8 @@ function ps_setoverprintmode($psdoc, int $mode): void function ps_setpolydash($psdoc, float $arr): void { error_clear_last(); - $result = \ps_setpolydash($psdoc, $arr); - if ($result === false) { + $safeResult = \ps_setpolydash($psdoc, $arr); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1585,11 +1585,11 @@ function ps_setpolydash($psdoc, float $arr): void function ps_shading_pattern($psdoc, int $shadingid, string $optlist): int { error_clear_last(); - $result = \ps_shading_pattern($psdoc, $shadingid, $optlist); - if ($result === false) { + $safeResult = \ps_shading_pattern($psdoc, $shadingid, $optlist); + if ($safeResult === false) { throw PsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1630,11 +1630,11 @@ function ps_shading_pattern($psdoc, int $shadingid, string $optlist): int function ps_shading($psdoc, string $type, float $x0, float $y0, float $x1, float $y1, float $c1, float $c2, float $c3, float $c4, string $optlist): int { error_clear_last(); - $result = \ps_shading($psdoc, $type, $x0, $y0, $x1, $y1, $c1, $c2, $c3, $c4, $optlist); - if ($result === false) { + $safeResult = \ps_shading($psdoc, $type, $x0, $y0, $x1, $y1, $c1, $c2, $c3, $c4, $optlist); + if ($safeResult === false) { throw PsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1654,8 +1654,8 @@ function ps_shading($psdoc, string $type, float $x0, float $y0, float $x1, float function ps_shfill($psdoc, int $shadingid): void { error_clear_last(); - $result = \ps_shfill($psdoc, $shadingid); - if ($result === false) { + $safeResult = \ps_shfill($psdoc, $shadingid); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1675,8 +1675,8 @@ function ps_shfill($psdoc, int $shadingid): void function ps_show_xy($psdoc, string $text, float $x, float $y): void { error_clear_last(); - $result = \ps_show_xy($psdoc, $text, $x, $y); - if ($result === false) { + $safeResult = \ps_show_xy($psdoc, $text, $x, $y); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1698,8 +1698,8 @@ function ps_show_xy($psdoc, string $text, float $x, float $y): void function ps_show_xy2($psdoc, string $text, int $len, float $xcoor, float $ycoor): void { error_clear_last(); - $result = \ps_show_xy2($psdoc, $text, $len, $xcoor, $ycoor); - if ($result === false) { + $safeResult = \ps_show_xy2($psdoc, $text, $len, $xcoor, $ycoor); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1725,8 +1725,8 @@ function ps_show_xy2($psdoc, string $text, int $len, float $xcoor, float $ycoor) function ps_show($psdoc, string $text): void { error_clear_last(); - $result = \ps_show($psdoc, $text); - if ($result === false) { + $safeResult = \ps_show($psdoc, $text); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1745,8 +1745,8 @@ function ps_show($psdoc, string $text): void function ps_show2($psdoc, string $text, int $len): void { error_clear_last(); - $result = \ps_show2($psdoc, $text, $len); - if ($result === false) { + $safeResult = \ps_show2($psdoc, $text, $len); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1764,8 +1764,8 @@ function ps_show2($psdoc, string $text, int $len): void function ps_stroke($psdoc): void { error_clear_last(); - $result = \ps_stroke($psdoc); - if ($result === false) { + $safeResult = \ps_stroke($psdoc); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1785,8 +1785,8 @@ function ps_stroke($psdoc): void function ps_symbol($psdoc, int $ord): void { error_clear_last(); - $result = \ps_symbol($psdoc, $ord); - if ($result === false) { + $safeResult = \ps_symbol($psdoc, $ord); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } @@ -1805,8 +1805,9 @@ function ps_symbol($psdoc, int $ord): void function ps_translate($psdoc, float $x, float $y): void { error_clear_last(); - $result = \ps_translate($psdoc, $x, $y); - if ($result === false) { + $safeResult = \ps_translate($psdoc, $x, $y); + if ($safeResult === false) { throw PsException::createFromPhpError(); } } + diff --git a/generated/pspell.php b/generated/pspell.php index b1e296d6..294c5432 100644 --- a/generated/pspell.php +++ b/generated/pspell.php @@ -15,8 +15,8 @@ function pspell_add_to_personal(int $dictionary, string $word): void { error_clear_last(); - $result = \pspell_add_to_personal($dictionary, $word); - if ($result === false) { + $safeResult = \pspell_add_to_personal($dictionary, $word); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } } @@ -33,8 +33,8 @@ function pspell_add_to_personal(int $dictionary, string $word): void function pspell_add_to_session(int $dictionary, string $word): void { error_clear_last(); - $result = \pspell_add_to_session($dictionary, $word); - if ($result === false) { + $safeResult = \pspell_add_to_session($dictionary, $word); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } } @@ -50,8 +50,8 @@ function pspell_add_to_session(int $dictionary, string $word): void function pspell_clear_session(int $dictionary): void { error_clear_last(); - $result = \pspell_clear_session($dictionary); - if ($result === false) { + $safeResult = \pspell_clear_session($dictionary); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } } @@ -93,11 +93,11 @@ function pspell_clear_session(int $dictionary): void function pspell_config_create(string $language, string $spelling = "", string $jargon = "", string $encoding = ""): int { error_clear_last(); - $result = \pspell_config_create($language, $spelling, $jargon, $encoding); - if ($result === false) { + $safeResult = \pspell_config_create($language, $spelling, $jargon, $encoding); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -114,8 +114,8 @@ function pspell_config_create(string $language, string $spelling = "", string $j function pspell_config_data_dir(int $config, string $directory): void { error_clear_last(); - $result = \pspell_config_data_dir($config, $directory); - if ($result === false) { + $safeResult = \pspell_config_data_dir($config, $directory); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } } @@ -134,8 +134,8 @@ function pspell_config_data_dir(int $config, string $directory): void function pspell_config_dict_dir(int $config, string $directory): void { error_clear_last(); - $result = \pspell_config_dict_dir($config, $directory); - if ($result === false) { + $safeResult = \pspell_config_dict_dir($config, $directory); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } } @@ -152,8 +152,8 @@ function pspell_config_dict_dir(int $config, string $directory): void function pspell_config_ignore(int $config, int $min_length): void { error_clear_last(); - $result = \pspell_config_ignore($config, $min_length); - if ($result === false) { + $safeResult = \pspell_config_ignore($config, $min_length); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } } @@ -190,8 +190,8 @@ function pspell_config_ignore(int $config, int $min_length): void function pspell_config_mode(int $config, int $mode): void { error_clear_last(); - $result = \pspell_config_mode($config, $mode); - if ($result === false) { + $safeResult = \pspell_config_mode($config, $mode); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } } @@ -215,8 +215,8 @@ function pspell_config_mode(int $config, int $mode): void function pspell_config_personal(int $config, string $filename): void { error_clear_last(); - $result = \pspell_config_personal($config, $filename); - if ($result === false) { + $safeResult = \pspell_config_personal($config, $filename); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } } @@ -242,8 +242,8 @@ function pspell_config_personal(int $config, string $filename): void function pspell_config_repl(int $config, string $filename): void { error_clear_last(); - $result = \pspell_config_repl($config, $filename); - if ($result === false) { + $safeResult = \pspell_config_repl($config, $filename); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } } @@ -268,8 +268,8 @@ function pspell_config_repl(int $config, string $filename): void function pspell_config_runtogether(int $config, bool $allow): void { error_clear_last(); - $result = \pspell_config_runtogether($config, $allow); - if ($result === false) { + $safeResult = \pspell_config_runtogether($config, $allow); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } } @@ -295,8 +295,8 @@ function pspell_config_runtogether(int $config, bool $allow): void function pspell_config_save_repl(int $config, bool $save): void { error_clear_last(); - $result = \pspell_config_save_repl($config, $save); - if ($result === false) { + $safeResult = \pspell_config_save_repl($config, $save); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } } @@ -314,11 +314,11 @@ function pspell_config_save_repl(int $config, bool $save): void function pspell_new_config(int $config): int { error_clear_last(); - $result = \pspell_new_config($config); - if ($result === false) { + $safeResult = \pspell_new_config($config); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -384,11 +384,11 @@ function pspell_new_config(int $config): int function pspell_new_personal(string $filename, string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): int { error_clear_last(); - $result = \pspell_new_personal($filename, $language, $spelling, $jargon, $encoding, $mode); - if ($result === false) { + $safeResult = \pspell_new_personal($filename, $language, $spelling, $jargon, $encoding, $mode); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -457,11 +457,11 @@ function pspell_new_personal(string $filename, string $language, string $spellin function pspell_new(string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): int { error_clear_last(); - $result = \pspell_new($language, $spelling, $jargon, $encoding, $mode); - if ($result === false) { + $safeResult = \pspell_new($language, $spelling, $jargon, $encoding, $mode); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -475,8 +475,8 @@ function pspell_new(string $language, string $spelling = "", string $jargon = "" function pspell_save_wordlist(int $dictionary): void { error_clear_last(); - $result = \pspell_save_wordlist($dictionary); - if ($result === false) { + $safeResult = \pspell_save_wordlist($dictionary); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } } @@ -494,8 +494,9 @@ function pspell_save_wordlist(int $dictionary): void function pspell_store_replacement(int $dictionary, string $misspelled, string $correct): void { error_clear_last(); - $result = \pspell_store_replacement($dictionary, $misspelled, $correct); - if ($result === false) { + $safeResult = \pspell_store_replacement($dictionary, $misspelled, $correct); + if ($safeResult === false) { throw PspellException::createFromPhpError(); } } + diff --git a/generated/readline.php b/generated/readline.php index ddbf5a35..2613c3ee 100644 --- a/generated/readline.php +++ b/generated/readline.php @@ -14,8 +14,8 @@ function readline_add_history(string $prompt): void { error_clear_last(); - $result = \readline_add_history($prompt); - if ($result === false) { + $safeResult = \readline_add_history($prompt); + if ($safeResult === false) { throw ReadlineException::createFromPhpError(); } } @@ -41,8 +41,8 @@ function readline_add_history(string $prompt): void function readline_callback_handler_install(string $prompt, callable $callback): void { error_clear_last(); - $result = \readline_callback_handler_install($prompt, $callback); - if ($result === false) { + $safeResult = \readline_callback_handler_install($prompt, $callback); + if ($safeResult === false) { throw ReadlineException::createFromPhpError(); } } @@ -57,8 +57,8 @@ function readline_callback_handler_install(string $prompt, callable $callback): function readline_clear_history(): void { error_clear_last(); - $result = \readline_clear_history(); - if ($result === false) { + $safeResult = \readline_clear_history(); + if ($safeResult === false) { throw ReadlineException::createFromPhpError(); } } @@ -76,8 +76,8 @@ function readline_clear_history(): void function readline_completion_function(callable $callback): void { error_clear_last(); - $result = \readline_completion_function($callback); - if ($result === false) { + $safeResult = \readline_completion_function($callback); + if ($safeResult === false) { throw ReadlineException::createFromPhpError(); } } @@ -94,11 +94,11 @@ function readline_read_history(string $filename = null): void { error_clear_last(); if ($filename !== null) { - $result = \readline_read_history($filename); + $safeResult = \readline_read_history($filename); } else { - $result = \readline_read_history(); + $safeResult = \readline_read_history(); } - if ($result === false) { + if ($safeResult === false) { throw ReadlineException::createFromPhpError(); } } @@ -115,11 +115,12 @@ function readline_write_history(string $filename = null): void { error_clear_last(); if ($filename !== null) { - $result = \readline_write_history($filename); + $safeResult = \readline_write_history($filename); } else { - $result = \readline_write_history(); + $safeResult = \readline_write_history(); } - if ($result === false) { + if ($safeResult === false) { throw ReadlineException::createFromPhpError(); } } + diff --git a/generated/rpminfo.php b/generated/rpminfo.php index 44de1ce2..1a6ba986 100644 --- a/generated/rpminfo.php +++ b/generated/rpminfo.php @@ -14,8 +14,9 @@ function rpmaddtag(int $tag): void { error_clear_last(); - $result = \rpmaddtag($tag); - if ($result === false) { + $safeResult = \rpmaddtag($tag); + if ($safeResult === false) { throw RpminfoException::createFromPhpError(); } } + diff --git a/generated/rrd.php b/generated/rrd.php index 2da227d0..3c44ced6 100644 --- a/generated/rrd.php +++ b/generated/rrd.php @@ -16,8 +16,8 @@ function rrd_create(string $filename, array $options): void { error_clear_last(); - $result = \rrd_create($filename, $options); - if ($result === false) { + $safeResult = \rrd_create($filename, $options); + if ($safeResult === false) { throw RrdException::createFromPhpError(); } } @@ -35,11 +35,11 @@ function rrd_create(string $filename, array $options): void function rrd_first(string $file, int $raaindex = 0): int { error_clear_last(); - $result = \rrd_first($file, $raaindex); - if ($result === false) { + $safeResult = \rrd_first($file, $raaindex); + if ($safeResult === false) { throw RrdException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -59,11 +59,11 @@ function rrd_first(string $file, int $raaindex = 0): int function rrd_graph(string $filename, array $options): array { error_clear_last(); - $result = \rrd_graph($filename, $options); - if ($result === false) { + $safeResult = \rrd_graph($filename, $options); + if ($safeResult === false) { throw RrdException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -78,11 +78,11 @@ function rrd_graph(string $filename, array $options): array function rrd_info(string $filename): array { error_clear_last(); - $result = \rrd_info($filename); - if ($result === false) { + $safeResult = \rrd_info($filename); + if ($safeResult === false) { throw RrdException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -98,11 +98,11 @@ function rrd_info(string $filename): array function rrd_lastupdate(string $filename): array { error_clear_last(); - $result = \rrd_lastupdate($filename); - if ($result === false) { + $safeResult = \rrd_lastupdate($filename); + if ($safeResult === false) { throw RrdException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -119,11 +119,11 @@ function rrd_restore(string $xml_file, string $rrd_file, array $options = null): { error_clear_last(); if ($options !== null) { - $result = \rrd_restore($xml_file, $rrd_file, $options); + $safeResult = \rrd_restore($xml_file, $rrd_file, $options); } else { - $result = \rrd_restore($xml_file, $rrd_file); + $safeResult = \rrd_restore($xml_file, $rrd_file); } - if ($result === false) { + if ($safeResult === false) { throw RrdException::createFromPhpError(); } } @@ -142,8 +142,8 @@ function rrd_restore(string $xml_file, string $rrd_file, array $options = null): function rrd_tune(string $filename, array $options): void { error_clear_last(); - $result = \rrd_tune($filename, $options); - if ($result === false) { + $safeResult = \rrd_tune($filename, $options); + if ($safeResult === false) { throw RrdException::createFromPhpError(); } } @@ -162,8 +162,8 @@ function rrd_tune(string $filename, array $options): void function rrd_update(string $filename, array $options): void { error_clear_last(); - $result = \rrd_update($filename, $options); - if ($result === false) { + $safeResult = \rrd_update($filename, $options); + if ($safeResult === false) { throw RrdException::createFromPhpError(); } } @@ -182,9 +182,10 @@ function rrd_update(string $filename, array $options): void function rrd_xport(array $options): array { error_clear_last(); - $result = \rrd_xport($options); - if ($result === false) { + $safeResult = \rrd_xport($options); + if ($safeResult === false) { throw RrdException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/sem.php b/generated/sem.php index 02021215..9e6f60f9 100644 --- a/generated/sem.php +++ b/generated/sem.php @@ -24,11 +24,11 @@ function msg_get_queue(int $key, int $permissions = 0666) { error_clear_last(); - $result = \msg_get_queue($key, $permissions); - if ($result === false) { + $safeResult = \msg_get_queue($key, $permissions); + if ($safeResult === false) { throw SemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -42,8 +42,8 @@ function msg_get_queue(int $key, int $permissions = 0666) function msg_queue_exists(int $key): void { error_clear_last(); - $result = \msg_queue_exists($key); - if ($result === false) { + $safeResult = \msg_queue_exists($key); + if ($safeResult === false) { throw SemException::createFromPhpError(); } } @@ -123,8 +123,8 @@ function msg_queue_exists(int $key): void function msg_receive($queue, int $desired_message_type, ?int &$received_message_type, int $max_message_size, &$message, bool $unserialize = true, int $flags = 0, ?int &$error_code = null): void { error_clear_last(); - $result = \msg_receive($queue, $desired_message_type, $received_message_type, $max_message_size, $message, $unserialize, $flags, $error_code); - if ($result === false) { + $safeResult = \msg_receive($queue, $desired_message_type, $received_message_type, $max_message_size, $message, $unserialize, $flags, $error_code); + if ($safeResult === false) { throw SemException::createFromPhpError(); } } @@ -143,8 +143,8 @@ function msg_receive($queue, int $desired_message_type, ?int &$received_message_ function msg_remove_queue($queue): void { error_clear_last(); - $result = \msg_remove_queue($queue); - if ($result === false) { + $safeResult = \msg_remove_queue($queue); + if ($safeResult === false) { throw SemException::createFromPhpError(); } } @@ -186,8 +186,8 @@ function msg_remove_queue($queue): void function msg_send($queue, int $message_type, $message, bool $serialize = true, bool $blocking = true, ?int &$error_code = null): void { error_clear_last(); - $result = \msg_send($queue, $message_type, $message, $serialize, $blocking, $error_code); - if ($result === false) { + $safeResult = \msg_send($queue, $message_type, $message, $serialize, $blocking, $error_code); + if ($safeResult === false) { throw SemException::createFromPhpError(); } } @@ -213,8 +213,8 @@ function msg_send($queue, int $message_type, $message, bool $serialize = true, b function msg_set_queue($queue, array $data): void { error_clear_last(); - $result = \msg_set_queue($queue, $data); - if ($result === false) { + $safeResult = \msg_set_queue($queue, $data); + if ($safeResult === false) { throw SemException::createFromPhpError(); } } @@ -306,11 +306,11 @@ function msg_set_queue($queue, array $data): void function msg_stat_queue($queue): array { error_clear_last(); - $result = \msg_stat_queue($queue); - if ($result === false) { + $safeResult = \msg_stat_queue($queue); + if ($safeResult === false) { throw SemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -336,8 +336,8 @@ function msg_stat_queue($queue): array function sem_acquire($semaphore, bool $non_blocking = false): void { error_clear_last(); - $result = \sem_acquire($semaphore, $non_blocking); - if ($result === false) { + $safeResult = \sem_acquire($semaphore, $non_blocking); + if ($safeResult === false) { throw SemException::createFromPhpError(); } } @@ -369,11 +369,11 @@ function sem_acquire($semaphore, bool $non_blocking = false): void function sem_get(int $key, int $max_acquire = 1, int $permissions = 0666, bool $auto_release = true) { error_clear_last(); - $result = \sem_get($key, $max_acquire, $permissions, $auto_release); - if ($result === false) { + $safeResult = \sem_get($key, $max_acquire, $permissions, $auto_release); + if ($safeResult === false) { throw SemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -393,8 +393,8 @@ function sem_get(int $key, int $max_acquire = 1, int $permissions = 0666, bool $ function sem_release($semaphore): void { error_clear_last(); - $result = \sem_release($semaphore); - if ($result === false) { + $safeResult = \sem_release($semaphore); + if ($safeResult === false) { throw SemException::createFromPhpError(); } } @@ -413,8 +413,8 @@ function sem_release($semaphore): void function sem_remove($semaphore): void { error_clear_last(); - $result = \sem_remove($semaphore); - if ($result === false) { + $safeResult = \sem_remove($semaphore); + if ($safeResult === false) { throw SemException::createFromPhpError(); } } @@ -446,16 +446,16 @@ function shm_attach(int $key, int $size = null, int $permissions = 0666) { error_clear_last(); if ($permissions !== 0666) { - $result = \shm_attach($key, $size, $permissions); + $safeResult = \shm_attach($key, $size, $permissions); } elseif ($size !== null) { - $result = \shm_attach($key, $size); + $safeResult = \shm_attach($key, $size); } else { - $result = \shm_attach($key); + $safeResult = \shm_attach($key); } - if ($result === false) { + if ($safeResult === false) { throw SemException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -472,8 +472,8 @@ function shm_attach(int $key, int $size = null, int $permissions = 0666) function shm_detach($shm): void { error_clear_last(); - $result = \shm_detach($shm); - if ($result === false) { + $safeResult = \shm_detach($shm); + if ($safeResult === false) { throw SemException::createFromPhpError(); } } @@ -501,8 +501,8 @@ function shm_detach($shm): void function shm_put_var($shm, int $key, $value): void { error_clear_last(); - $result = \shm_put_var($shm, $key, $value); - if ($result === false) { + $safeResult = \shm_put_var($shm, $key, $value); + if ($safeResult === false) { throw SemException::createFromPhpError(); } } @@ -520,8 +520,8 @@ function shm_put_var($shm, int $key, $value): void function shm_remove_var($shm, int $key): void { error_clear_last(); - $result = \shm_remove_var($shm, $key); - if ($result === false) { + $safeResult = \shm_remove_var($shm, $key); + if ($safeResult === false) { throw SemException::createFromPhpError(); } } @@ -538,8 +538,9 @@ function shm_remove_var($shm, int $key): void function shm_remove($shm): void { error_clear_last(); - $result = \shm_remove($shm); - if ($result === false) { + $safeResult = \shm_remove($shm); + if ($safeResult === false) { throw SemException::createFromPhpError(); } } + diff --git a/generated/session.php b/generated/session.php index 212cf850..5f514089 100644 --- a/generated/session.php +++ b/generated/session.php @@ -14,8 +14,8 @@ function session_abort(): void { error_clear_last(); - $result = \session_abort(); - if ($result === false) { + $safeResult = \session_abort(); + if ($safeResult === false) { throw SessionException::createFromPhpError(); } } @@ -49,11 +49,11 @@ function session_abort(): void function session_create_id(string $prefix = ""): string { error_clear_last(); - $result = \session_create_id($prefix); - if ($result === false) { + $safeResult = \session_create_id($prefix); + if ($safeResult === false) { throw SessionException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -72,8 +72,8 @@ function session_create_id(string $prefix = ""): string function session_decode(string $data): void { error_clear_last(); - $result = \session_decode($data); - if ($result === false) { + $safeResult = \session_decode($data); + if ($safeResult === false) { throw SessionException::createFromPhpError(); } } @@ -98,8 +98,8 @@ function session_decode(string $data): void function session_destroy(): void { error_clear_last(); - $result = \session_destroy(); - if ($result === false) { + $safeResult = \session_destroy(); + if ($safeResult === false) { throw SessionException::createFromPhpError(); } } @@ -119,11 +119,11 @@ function session_destroy(): void function session_encode(): string { error_clear_last(); - $result = \session_encode(); - if ($result === false) { + $safeResult = \session_encode(); + if ($safeResult === false) { throw SessionException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -153,14 +153,14 @@ function session_id(string $id = null): string { error_clear_last(); if ($id !== null) { - $result = \session_id($id); + $safeResult = \session_id($id); } else { - $result = \session_id(); + $safeResult = \session_id(); } - if ($result === false) { + if ($safeResult === false) { throw SessionException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -182,14 +182,14 @@ function session_module_name(string $module = null): string { error_clear_last(); if ($module !== null) { - $result = \session_module_name($module); + $safeResult = \session_module_name($module); } else { - $result = \session_module_name(); + $safeResult = \session_module_name(); } - if ($result === false) { + if ($safeResult === false) { throw SessionException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -239,14 +239,14 @@ function session_name(string $name = null): string { error_clear_last(); if ($name !== null) { - $result = \session_name($name); + $safeResult = \session_name($name); } else { - $result = \session_name(); + $safeResult = \session_name(); } - if ($result === false) { + if ($safeResult === false) { throw SessionException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -268,8 +268,8 @@ function session_name(string $name = null): string function session_regenerate_id(bool $delete_old_session = false): void { error_clear_last(); - $result = \session_regenerate_id($delete_old_session); - if ($result === false) { + $safeResult = \session_regenerate_id($delete_old_session); + if ($safeResult === false) { throw SessionException::createFromPhpError(); } } @@ -286,8 +286,8 @@ function session_regenerate_id(bool $delete_old_session = false): void function session_reset(): void { error_clear_last(); - $result = \session_reset(); - if ($result === false) { + $safeResult = \session_reset(); + if ($safeResult === false) { throw SessionException::createFromPhpError(); } } @@ -320,14 +320,14 @@ function session_save_path(string $path = null): string { error_clear_last(); if ($path !== null) { - $result = \session_save_path($path); + $safeResult = \session_save_path($path); } else { - $result = \session_save_path(); + $safeResult = \session_save_path(); } - if ($result === false) { + if ($safeResult === false) { throw SessionException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -341,8 +341,8 @@ function session_save_path(string $path = null): string function session_unset(): void { error_clear_last(); - $result = \session_unset(); - if ($result === false) { + $safeResult = \session_unset(); + if ($safeResult === false) { throw SessionException::createFromPhpError(); } } @@ -365,8 +365,9 @@ function session_unset(): void function session_write_close(): void { error_clear_last(); - $result = \session_write_close(); - if ($result === false) { + $safeResult = \session_write_close(); + if ($safeResult === false) { throw SessionException::createFromPhpError(); } } + diff --git a/generated/shmop.php b/generated/shmop.php index aa5d8f49..ae7c992c 100644 --- a/generated/shmop.php +++ b/generated/shmop.php @@ -15,8 +15,8 @@ function shmop_delete($shmop): void { error_clear_last(); - $result = \shmop_delete($shmop); - if ($result === false) { + $safeResult = \shmop_delete($shmop); + if ($safeResult === false) { throw ShmopException::createFromPhpError(); } } @@ -37,9 +37,10 @@ function shmop_delete($shmop): void function shmop_read($shmop, int $offset, int $size): string { error_clear_last(); - $result = \shmop_read($shmop, $offset, $size); - if ($result === false) { + $safeResult = \shmop_read($shmop, $offset, $size); + if ($safeResult === false) { throw ShmopException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/sockets.php b/generated/sockets.php index bfcd9bac..3b8ad335 100644 --- a/generated/sockets.php +++ b/generated/sockets.php @@ -37,11 +37,11 @@ function socket_accept($socket) { error_clear_last(); - $result = \socket_accept($socket); - if ($result === false) { + $safeResult = \socket_accept($socket); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -57,11 +57,11 @@ function socket_accept($socket) function socket_addrinfo_bind($address) { error_clear_last(); - $result = \socket_addrinfo_bind($address); - if ($result === false) { + $safeResult = \socket_addrinfo_bind($address); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -77,11 +77,11 @@ function socket_addrinfo_bind($address) function socket_addrinfo_connect($address) { error_clear_last(); - $result = \socket_addrinfo_connect($address); - if ($result === false) { + $safeResult = \socket_addrinfo_connect($address); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -103,16 +103,16 @@ function socket_addrinfo_lookup(string $host, $service = null, array $hints = [] { error_clear_last(); if ($hints !== []) { - $result = \socket_addrinfo_lookup($host, $service, $hints); + $safeResult = \socket_addrinfo_lookup($host, $service, $hints); } elseif ($service !== null) { - $result = \socket_addrinfo_lookup($host, $service); + $safeResult = \socket_addrinfo_lookup($host, $service); } else { - $result = \socket_addrinfo_lookup($host); + $safeResult = \socket_addrinfo_lookup($host); } - if ($result === false) { + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -139,8 +139,8 @@ function socket_addrinfo_lookup(string $host, $service = null, array $hints = [] function socket_bind($socket, string $address, int $port = 0): void { error_clear_last(); - $result = \socket_bind($socket, $address, $port); - if ($result === false) { + $safeResult = \socket_bind($socket, $address, $port); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } } @@ -171,11 +171,11 @@ function socket_connect($socket, string $address, int $port = null): void { error_clear_last(); if ($port !== null) { - $result = \socket_connect($socket, $address, $port); + $safeResult = \socket_connect($socket, $address, $port); } else { - $result = \socket_connect($socket, $address); + $safeResult = \socket_connect($socket, $address); } - if ($result === false) { + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } } @@ -206,11 +206,11 @@ function socket_connect($socket, string $address, int $port = null): void function socket_create_listen(int $port, int $backlog = 128) { error_clear_last(); - $result = \socket_create_listen($port, $backlog); - if ($result === false) { + $safeResult = \socket_create_listen($port, $backlog); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -242,8 +242,8 @@ function socket_create_listen(int $port, int $backlog = 128) function socket_create_pair(int $domain, int $type, int $protocol, ?iterable &$pair): void { error_clear_last(); - $result = \socket_create_pair($domain, $type, $protocol, $pair); - if ($result === false) { + $safeResult = \socket_create_pair($domain, $type, $protocol, $pair); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } } @@ -275,11 +275,11 @@ function socket_create_pair(int $domain, int $type, int $protocol, ?iterable &$p function socket_create(int $domain, int $type, int $protocol) { error_clear_last(); - $result = \socket_create($domain, $type, $protocol); - if ($result === false) { + $safeResult = \socket_create($domain, $type, $protocol); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -294,11 +294,11 @@ function socket_create(int $domain, int $type, int $protocol) function socket_export_stream($socket) { error_clear_last(); - $result = \socket_export_stream($socket); - if ($result === false) { + $safeResult = \socket_export_stream($socket); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -341,11 +341,11 @@ function socket_export_stream($socket) function socket_get_option($socket, int $level, int $option) { error_clear_last(); - $result = \socket_get_option($socket, $level, $option); - if ($result === false) { + $safeResult = \socket_get_option($socket, $level, $option); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -375,8 +375,8 @@ function socket_get_option($socket, int $level, int $option) function socket_getpeername($socket, ?string &$address, ?int &$port = null): void { error_clear_last(); - $result = \socket_getpeername($socket, $address, $port); - if ($result === false) { + $safeResult = \socket_getpeername($socket, $address, $port); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } } @@ -405,8 +405,8 @@ function socket_getpeername($socket, ?string &$address, ?int &$port = null): voi function socket_getsockname($socket, ?string &$address, ?int &$port = null): void { error_clear_last(); - $result = \socket_getsockname($socket, $address, $port); - if ($result === false) { + $safeResult = \socket_getsockname($socket, $address, $port); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } } @@ -423,11 +423,11 @@ function socket_getsockname($socket, ?string &$address, ?int &$port = null): voi function socket_import_stream($stream) { error_clear_last(); - $result = \socket_import_stream($stream); - if ($result === false) { + $safeResult = \socket_import_stream($stream); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -462,8 +462,8 @@ function socket_import_stream($stream) function socket_listen($socket, int $backlog = 0): void { error_clear_last(); - $result = \socket_listen($socket, $backlog); - if ($result === false) { + $safeResult = \socket_listen($socket, $backlog); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } } @@ -508,11 +508,11 @@ function socket_listen($socket, int $backlog = 0): void function socket_read($socket, int $length, int $mode = PHP_BINARY_READ): string { error_clear_last(); - $result = \socket_read($socket, $length, $mode); - if ($result === false) { + $safeResult = \socket_read($socket, $length, $mode); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -569,11 +569,11 @@ function socket_read($socket, int $length, int $mode = PHP_BINARY_READ): string function socket_send($socket, string $data, int $length, int $flags): int { error_clear_last(); - $result = \socket_send($socket, $data, $length, $flags); - if ($result === false) { + $safeResult = \socket_send($socket, $data, $length, $flags); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -590,11 +590,11 @@ function socket_send($socket, string $data, int $length, int $flags): int function socket_sendmsg($socket, array $message, int $flags = 0): int { error_clear_last(); - $result = \socket_sendmsg($socket, $message, $flags); - if ($result === false) { + $safeResult = \socket_sendmsg($socket, $message, $flags); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -656,14 +656,14 @@ function socket_sendto($socket, string $data, int $length, int $flags, string $a { error_clear_last(); if ($port !== null) { - $result = \socket_sendto($socket, $data, $length, $flags, $address, $port); + $safeResult = \socket_sendto($socket, $data, $length, $flags, $address, $port); } else { - $result = \socket_sendto($socket, $data, $length, $flags, $address); + $safeResult = \socket_sendto($socket, $data, $length, $flags, $address); } - if ($result === false) { + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -684,8 +684,8 @@ function socket_sendto($socket, string $data, int $length, int $flags, string $a function socket_set_block($socket): void { error_clear_last(); - $result = \socket_set_block($socket); - if ($result === false) { + $safeResult = \socket_set_block($socket); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } } @@ -709,8 +709,8 @@ function socket_set_block($socket): void function socket_set_nonblock($socket): void { error_clear_last(); - $result = \socket_set_nonblock($socket); - if ($result === false) { + $safeResult = \socket_set_nonblock($socket); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } } @@ -741,8 +741,8 @@ function socket_set_nonblock($socket): void function socket_set_option($socket, int $level, int $option, $value): void { error_clear_last(); - $result = \socket_set_option($socket, $level, $option, $value); - if ($result === false) { + $safeResult = \socket_set_option($socket, $level, $option, $value); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } } @@ -786,8 +786,8 @@ function socket_set_option($socket, int $level, int $option, $value): void function socket_shutdown($socket, int $mode = 2): void { error_clear_last(); - $result = \socket_shutdown($socket, $mode); - if ($result === false) { + $safeResult = \socket_shutdown($socket, $mode); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } } @@ -807,11 +807,11 @@ function socket_shutdown($socket, int $mode = 2): void function socket_wsaprotocol_info_export($socket, int $process_id): string { error_clear_last(); - $result = \socket_wsaprotocol_info_export($socket, $process_id); - if ($result === false) { + $safeResult = \socket_wsaprotocol_info_export($socket, $process_id); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -827,11 +827,11 @@ function socket_wsaprotocol_info_export($socket, int $process_id): string function socket_wsaprotocol_info_import(string $info_id) { error_clear_last(); - $result = \socket_wsaprotocol_info_import($info_id); - if ($result === false) { + $safeResult = \socket_wsaprotocol_info_import($info_id); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -846,8 +846,9 @@ function socket_wsaprotocol_info_import(string $info_id) function socket_wsaprotocol_info_release(string $info_id): void { error_clear_last(); - $result = \socket_wsaprotocol_info_release($info_id); - if ($result === false) { + $safeResult = \socket_wsaprotocol_info_release($info_id); + if ($safeResult === false) { throw SocketsException::createFromPhpError(); } } + diff --git a/generated/sodium.php b/generated/sodium.php index d13da0da..3c515140 100644 --- a/generated/sodium.php +++ b/generated/sodium.php @@ -21,11 +21,11 @@ function sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string { error_clear_last(); - $result = \sodium_crypto_aead_aes256gcm_decrypt($ciphertext, $additional_data, $nonce, $key); - if ($result === false) { + $safeResult = \sodium_crypto_aead_aes256gcm_decrypt($ciphertext, $additional_data, $nonce, $key); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -45,11 +45,11 @@ function sodium_crypto_aead_aes256gcm_decrypt(string $ciphertext, string $additi function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string { error_clear_last(); - $result = \sodium_crypto_aead_chacha20poly1305_decrypt($ciphertext, $additional_data, $nonce, $key); - if ($result === false) { + $safeResult = \sodium_crypto_aead_chacha20poly1305_decrypt($ciphertext, $additional_data, $nonce, $key); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -68,11 +68,11 @@ function sodium_crypto_aead_chacha20poly1305_decrypt(string $ciphertext, string function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, string $additional_data, string $nonce, string $key): string { error_clear_last(); - $result = \sodium_crypto_aead_chacha20poly1305_encrypt($message, $additional_data, $nonce, $key); - if ($result === false) { + $safeResult = \sodium_crypto_aead_chacha20poly1305_encrypt($message, $additional_data, $nonce, $key); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -94,11 +94,11 @@ function sodium_crypto_aead_chacha20poly1305_encrypt(string $message, string $ad function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string { error_clear_last(); - $result = \sodium_crypto_aead_chacha20poly1305_ietf_decrypt($ciphertext, $additional_data, $nonce, $key); - if ($result === false) { + $safeResult = \sodium_crypto_aead_chacha20poly1305_ietf_decrypt($ciphertext, $additional_data, $nonce, $key); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -119,11 +119,11 @@ function sodium_crypto_aead_chacha20poly1305_ietf_decrypt(string $ciphertext, st function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key): string { error_clear_last(); - $result = \sodium_crypto_aead_chacha20poly1305_ietf_encrypt($message, $additional_data, $nonce, $key); - if ($result === false) { + $safeResult = \sodium_crypto_aead_chacha20poly1305_ietf_encrypt($message, $additional_data, $nonce, $key); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -146,11 +146,11 @@ function sodium_crypto_aead_chacha20poly1305_ietf_encrypt(string $message, strin function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, string $additional_data, string $nonce, string $key): string { error_clear_last(); - $result = \sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($ciphertext, $additional_data, $nonce, $key); - if ($result === false) { + $safeResult = \sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($ciphertext, $additional_data, $nonce, $key); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -172,11 +172,11 @@ function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt(string $ciphertext, s function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, string $additional_data, string $nonce, string $key): string { error_clear_last(); - $result = \sodium_crypto_aead_xchacha20poly1305_ietf_encrypt($message, $additional_data, $nonce, $key); - if ($result === false) { + $safeResult = \sodium_crypto_aead_xchacha20poly1305_ietf_encrypt($message, $additional_data, $nonce, $key); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -196,8 +196,8 @@ function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt(string $message, stri function sodium_crypto_auth_verify(string $mac, string $message, string $key): void { error_clear_last(); - $result = \sodium_crypto_auth_verify($mac, $message, $key); - if ($result === false) { + $safeResult = \sodium_crypto_auth_verify($mac, $message, $key); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } } @@ -218,11 +218,11 @@ function sodium_crypto_auth_verify(string $mac, string $message, string $key): v function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key_pair): string { error_clear_last(); - $result = \sodium_crypto_box_open($ciphertext, $nonce, $key_pair); - if ($result === false) { + $safeResult = \sodium_crypto_box_open($ciphertext, $nonce, $key_pair); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -238,11 +238,11 @@ function sodium_crypto_box_open(string $ciphertext, string $nonce, string $key_p function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair): string { error_clear_last(); - $result = \sodium_crypto_box_seal_open($ciphertext, $key_pair); - if ($result === false) { + $safeResult = \sodium_crypto_box_seal_open($ciphertext, $key_pair); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -257,8 +257,8 @@ function sodium_crypto_box_seal_open(string $ciphertext, string $key_pair): stri function sodium_crypto_generichash_update(string &$state, string $message): void { error_clear_last(); - $result = \sodium_crypto_generichash_update($state, $message); - if ($result === false) { + $safeResult = \sodium_crypto_generichash_update($state, $message); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } } @@ -279,11 +279,11 @@ function sodium_crypto_generichash_update(string &$state, string $message): void function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string $key): string { error_clear_last(); - $result = \sodium_crypto_secretbox_open($ciphertext, $nonce, $key); - if ($result === false) { + $safeResult = \sodium_crypto_secretbox_open($ciphertext, $nonce, $key); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -299,11 +299,11 @@ function sodium_crypto_secretbox_open(string $ciphertext, string $nonce, string function sodium_crypto_sign_open(string $signed_message, string $public_key): string { error_clear_last(); - $result = \sodium_crypto_sign_open($signed_message, $public_key); - if ($result === false) { + $safeResult = \sodium_crypto_sign_open($signed_message, $public_key); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -319,8 +319,9 @@ function sodium_crypto_sign_open(string $signed_message, string $public_key): st function sodium_crypto_sign_verify_detached(string $signature, string $message, string $public_key): void { error_clear_last(); - $result = \sodium_crypto_sign_verify_detached($signature, $message, $public_key); - if ($result === false) { + $safeResult = \sodium_crypto_sign_verify_detached($signature, $message, $public_key); + if ($safeResult === false) { throw SodiumException::createFromPhpError(); } } + diff --git a/generated/solr.php b/generated/solr.php index 4d4e0418..6b036ee8 100644 --- a/generated/solr.php +++ b/generated/solr.php @@ -14,9 +14,10 @@ function solr_get_version(): string { error_clear_last(); - $result = \solr_get_version(); - if ($result === false) { + $safeResult = \solr_get_version(); + if ($safeResult === false) { throw SolrException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/spl.php b/generated/spl.php index 08c679dc..8883e62d 100644 --- a/generated/spl.php +++ b/generated/spl.php @@ -17,11 +17,11 @@ function class_implements($object_or_class, bool $autoload = true): array { error_clear_last(); - $result = \class_implements($object_or_class, $autoload); - if ($result === false) { + $safeResult = \class_implements($object_or_class, $autoload); + if ($safeResult === false) { throw SplException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -38,11 +38,11 @@ function class_implements($object_or_class, bool $autoload = true): array function class_parents($object_or_class, bool $autoload = true): array { error_clear_last(); - $result = \class_parents($object_or_class, $autoload); - if ($result === false) { + $safeResult = \class_parents($object_or_class, $autoload); + if ($safeResult === false) { throw SplException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -60,11 +60,11 @@ function class_parents($object_or_class, bool $autoload = true): array function class_uses($object_or_class, bool $autoload = true): array { error_clear_last(); - $result = \class_uses($object_or_class, $autoload); - if ($result === false) { + $safeResult = \class_uses($object_or_class, $autoload); + if ($safeResult === false) { throw SplException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -100,15 +100,15 @@ function spl_autoload_register(callable $callback = null, bool $throw = true, bo { error_clear_last(); if ($prepend !== false) { - $result = \spl_autoload_register($callback, $throw, $prepend); + $safeResult = \spl_autoload_register($callback, $throw, $prepend); } elseif ($throw !== true) { - $result = \spl_autoload_register($callback, $throw); + $safeResult = \spl_autoload_register($callback, $throw); } elseif ($callback !== null) { - $result = \spl_autoload_register($callback); + $safeResult = \spl_autoload_register($callback); } else { - $result = \spl_autoload_register(); + $safeResult = \spl_autoload_register(); } - if ($result === false) { + if ($safeResult === false) { throw SplException::createFromPhpError(); } } @@ -129,8 +129,9 @@ function spl_autoload_register(callable $callback = null, bool $throw = true, bo function spl_autoload_unregister($callback): void { error_clear_last(); - $result = \spl_autoload_unregister($callback); - if ($result === false) { + $safeResult = \spl_autoload_unregister($callback); + if ($safeResult === false) { throw SplException::createFromPhpError(); } } + diff --git a/generated/sqlsrv.php b/generated/sqlsrv.php index e93aa37a..ef2a27f6 100644 --- a/generated/sqlsrv.php +++ b/generated/sqlsrv.php @@ -21,8 +21,8 @@ function sqlsrv_begin_transaction($conn): void { error_clear_last(); - $result = \sqlsrv_begin_transaction($conn); - if ($result === false) { + $safeResult = \sqlsrv_begin_transaction($conn); + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } } @@ -43,8 +43,8 @@ function sqlsrv_begin_transaction($conn): void function sqlsrv_cancel($stmt): void { error_clear_last(); - $result = \sqlsrv_cancel($stmt); - if ($result === false) { + $safeResult = \sqlsrv_cancel($stmt); + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } } @@ -90,11 +90,11 @@ function sqlsrv_cancel($stmt): void function sqlsrv_client_info($conn): array { error_clear_last(); - $result = \sqlsrv_client_info($conn); - if ($result === false) { + $safeResult = \sqlsrv_client_info($conn); + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -108,8 +108,8 @@ function sqlsrv_client_info($conn): array function sqlsrv_close($conn): void { error_clear_last(); - $result = \sqlsrv_close($conn); - if ($result === false) { + $safeResult = \sqlsrv_close($conn); + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } } @@ -132,8 +132,8 @@ function sqlsrv_close($conn): void function sqlsrv_commit($conn): void { error_clear_last(); - $result = \sqlsrv_commit($conn); - if ($result === false) { + $safeResult = \sqlsrv_commit($conn); + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } } @@ -184,8 +184,8 @@ function sqlsrv_commit($conn): void function sqlsrv_configure(string $setting, $value): void { error_clear_last(); - $result = \sqlsrv_configure($setting, $value); - if ($result === false) { + $safeResult = \sqlsrv_configure($setting, $value); + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } } @@ -203,8 +203,8 @@ function sqlsrv_configure(string $setting, $value): void function sqlsrv_execute($stmt): void { error_clear_last(); - $result = \sqlsrv_execute($stmt); - if ($result === false) { + $safeResult = \sqlsrv_execute($stmt); + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } } @@ -226,8 +226,8 @@ function sqlsrv_execute($stmt): void function sqlsrv_free_stmt($stmt): void { error_clear_last(); - $result = \sqlsrv_free_stmt($stmt); - if ($result === false) { + $safeResult = \sqlsrv_free_stmt($stmt); + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } } @@ -255,14 +255,14 @@ function sqlsrv_get_field($stmt, int $fieldIndex, int $getAsType = null) { error_clear_last(); if ($getAsType !== null) { - $result = \sqlsrv_get_field($stmt, $fieldIndex, $getAsType); + $safeResult = \sqlsrv_get_field($stmt, $fieldIndex, $getAsType); } else { - $result = \sqlsrv_get_field($stmt, $fieldIndex); + $safeResult = \sqlsrv_get_field($stmt, $fieldIndex); } - if ($result === false) { + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -279,11 +279,11 @@ function sqlsrv_get_field($stmt, int $fieldIndex, int $getAsType = null) function sqlsrv_next_result($stmt): ?bool { error_clear_last(); - $result = \sqlsrv_next_result($stmt); - if ($result === false) { + $safeResult = \sqlsrv_next_result($stmt); + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -300,11 +300,11 @@ function sqlsrv_next_result($stmt): ?bool function sqlsrv_num_fields($stmt): int { error_clear_last(); - $result = \sqlsrv_num_fields($stmt); - if ($result === false) { + $safeResult = \sqlsrv_num_fields($stmt); + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -328,11 +328,11 @@ function sqlsrv_num_fields($stmt): int function sqlsrv_num_rows($stmt): int { error_clear_last(); - $result = \sqlsrv_num_rows($stmt); - if ($result === false) { + $safeResult = \sqlsrv_num_rows($stmt); + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -361,16 +361,16 @@ function sqlsrv_prepare($conn, string $sql, array $params = null, array $options { error_clear_last(); if ($options !== null) { - $result = \sqlsrv_prepare($conn, $sql, $params, $options); + $safeResult = \sqlsrv_prepare($conn, $sql, $params, $options); } elseif ($params !== null) { - $result = \sqlsrv_prepare($conn, $sql, $params); + $safeResult = \sqlsrv_prepare($conn, $sql, $params); } else { - $result = \sqlsrv_prepare($conn, $sql); + $safeResult = \sqlsrv_prepare($conn, $sql); } - if ($result === false) { + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -398,16 +398,16 @@ function sqlsrv_query($conn, string $sql, array $params = null, array $options = { error_clear_last(); if ($options !== null) { - $result = \sqlsrv_query($conn, $sql, $params, $options); + $safeResult = \sqlsrv_query($conn, $sql, $params, $options); } elseif ($params !== null) { - $result = \sqlsrv_query($conn, $sql, $params); + $safeResult = \sqlsrv_query($conn, $sql, $params); } else { - $result = \sqlsrv_query($conn, $sql); + $safeResult = \sqlsrv_query($conn, $sql); } - if ($result === false) { + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -422,8 +422,9 @@ function sqlsrv_query($conn, string $sql, array $params = null, array $options = function sqlsrv_rollback($conn): void { error_clear_last(); - $result = \sqlsrv_rollback($conn); - if ($result === false) { + $safeResult = \sqlsrv_rollback($conn); + if ($safeResult === false) { throw SqlsrvException::createFromPhpError(); } } + diff --git a/generated/ssdeep.php b/generated/ssdeep.php index 662fc9b9..59e17c13 100644 --- a/generated/ssdeep.php +++ b/generated/ssdeep.php @@ -19,11 +19,11 @@ function ssdeep_fuzzy_compare(string $signature1, string $signature2): int { error_clear_last(); - $result = \ssdeep_fuzzy_compare($signature1, $signature2); - if ($result === false) { + $safeResult = \ssdeep_fuzzy_compare($signature1, $signature2); + if ($safeResult === false) { throw SsdeepException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -41,11 +41,11 @@ function ssdeep_fuzzy_compare(string $signature1, string $signature2): int function ssdeep_fuzzy_hash_filename(string $file_name): string { error_clear_last(); - $result = \ssdeep_fuzzy_hash_filename($file_name); - if ($result === false) { + $safeResult = \ssdeep_fuzzy_hash_filename($file_name); + if ($safeResult === false) { throw SsdeepException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -62,9 +62,10 @@ function ssdeep_fuzzy_hash_filename(string $file_name): string function ssdeep_fuzzy_hash(string $to_hash): string { error_clear_last(); - $result = \ssdeep_fuzzy_hash($to_hash); - if ($result === false) { + $safeResult = \ssdeep_fuzzy_hash($to_hash); + if ($safeResult === false) { throw SsdeepException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/ssh2.php b/generated/ssh2.php index fff3ceb6..10801c9d 100644 --- a/generated/ssh2.php +++ b/generated/ssh2.php @@ -16,8 +16,8 @@ function ssh2_auth_agent($session, string $username): void { error_clear_last(); - $result = \ssh2_auth_agent($session, $username); - if ($result === false) { + $safeResult = \ssh2_auth_agent($session, $username); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -43,13 +43,13 @@ function ssh2_auth_hostbased_file($session, string $username, string $hostname, { error_clear_last(); if ($local_username !== null) { - $result = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile, $passphrase, $local_username); + $safeResult = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile, $passphrase, $local_username); } elseif ($passphrase !== null) { - $result = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile, $passphrase); + $safeResult = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile, $passphrase); } else { - $result = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile); + $safeResult = \ssh2_auth_hostbased_file($session, $username, $hostname, $pubkeyfile, $privkeyfile); } - if ($result === false) { + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -69,8 +69,8 @@ function ssh2_auth_hostbased_file($session, string $username, string $hostname, function ssh2_auth_password($session, string $username, string $password): void { error_clear_last(); - $result = \ssh2_auth_password($session, $username, $password); - if ($result === false) { + $safeResult = \ssh2_auth_password($session, $username, $password); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -95,11 +95,11 @@ function ssh2_auth_pubkey_file($session, string $username, string $pubkeyfile, s { error_clear_last(); if ($passphrase !== null) { - $result = \ssh2_auth_pubkey_file($session, $username, $pubkeyfile, $privkeyfile, $passphrase); + $safeResult = \ssh2_auth_pubkey_file($session, $username, $pubkeyfile, $privkeyfile, $passphrase); } else { - $result = \ssh2_auth_pubkey_file($session, $username, $pubkeyfile, $privkeyfile); + $safeResult = \ssh2_auth_pubkey_file($session, $username, $pubkeyfile, $privkeyfile); } - if ($result === false) { + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -308,16 +308,16 @@ function ssh2_connect(string $host, int $port = 22, array $methods = null, array { error_clear_last(); if ($callbacks !== null) { - $result = \ssh2_connect($host, $port, $methods, $callbacks); + $safeResult = \ssh2_connect($host, $port, $methods, $callbacks); } elseif ($methods !== null) { - $result = \ssh2_connect($host, $port, $methods); + $safeResult = \ssh2_connect($host, $port, $methods); } else { - $result = \ssh2_connect($host, $port); + $safeResult = \ssh2_connect($host, $port); } - if ($result === false) { + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -332,8 +332,8 @@ function ssh2_connect(string $host, int $port = 22, array $methods = null, array function ssh2_disconnect($session): void { error_clear_last(); - $result = \ssh2_disconnect($session); - if ($result === false) { + $safeResult = \ssh2_disconnect($session); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -361,22 +361,22 @@ function ssh2_exec($session, string $command, string $pty = null, array $env = n { error_clear_last(); if ($width_height_type !== SSH2_TERM_UNIT_CHARS) { - $result = \ssh2_exec($session, $command, $pty, $env, $width, $height, $width_height_type); + $safeResult = \ssh2_exec($session, $command, $pty, $env, $width, $height, $width_height_type); } elseif ($height !== 25) { - $result = \ssh2_exec($session, $command, $pty, $env, $width, $height); + $safeResult = \ssh2_exec($session, $command, $pty, $env, $width, $height); } elseif ($width !== 80) { - $result = \ssh2_exec($session, $command, $pty, $env, $width); + $safeResult = \ssh2_exec($session, $command, $pty, $env, $width); } elseif ($env !== null) { - $result = \ssh2_exec($session, $command, $pty, $env); + $safeResult = \ssh2_exec($session, $command, $pty, $env); } elseif ($pty !== null) { - $result = \ssh2_exec($session, $command, $pty); + $safeResult = \ssh2_exec($session, $command, $pty); } else { - $result = \ssh2_exec($session, $command); + $safeResult = \ssh2_exec($session, $command); } - if ($result === false) { + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -391,11 +391,11 @@ function ssh2_exec($session, string $command, string $pty = null, array $env = n function ssh2_forward_accept($listener) { error_clear_last(); - $result = \ssh2_forward_accept($listener); - if ($result === false) { + $safeResult = \ssh2_forward_accept($listener); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -414,16 +414,16 @@ function ssh2_forward_listen($session, int $port, string $host = null, int $max_ { error_clear_last(); if ($max_connections !== 16) { - $result = \ssh2_forward_listen($session, $port, $host, $max_connections); + $safeResult = \ssh2_forward_listen($session, $port, $host, $max_connections); } elseif ($host !== null) { - $result = \ssh2_forward_listen($session, $port, $host); + $safeResult = \ssh2_forward_listen($session, $port, $host); } else { - $result = \ssh2_forward_listen($session, $port); + $safeResult = \ssh2_forward_listen($session, $port); } - if ($result === false) { + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -446,11 +446,11 @@ function ssh2_publickey_add($pkey, string $algoname, string $blob, bool $overwri { error_clear_last(); if ($attributes !== null) { - $result = \ssh2_publickey_add($pkey, $algoname, $blob, $overwrite, $attributes); + $safeResult = \ssh2_publickey_add($pkey, $algoname, $blob, $overwrite, $attributes); } else { - $result = \ssh2_publickey_add($pkey, $algoname, $blob, $overwrite); + $safeResult = \ssh2_publickey_add($pkey, $algoname, $blob, $overwrite); } - if ($result === false) { + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -474,11 +474,11 @@ function ssh2_publickey_add($pkey, string $algoname, string $blob, bool $overwri function ssh2_publickey_init($session) { error_clear_last(); - $result = \ssh2_publickey_init($session); - if ($result === false) { + $safeResult = \ssh2_publickey_init($session); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -494,8 +494,8 @@ function ssh2_publickey_init($session) function ssh2_publickey_remove($pkey, string $algoname, string $blob): void { error_clear_last(); - $result = \ssh2_publickey_remove($pkey, $algoname, $blob); - if ($result === false) { + $safeResult = \ssh2_publickey_remove($pkey, $algoname, $blob); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -514,8 +514,8 @@ function ssh2_publickey_remove($pkey, string $algoname, string $blob): void function ssh2_scp_recv($session, string $remote_file, string $local_file): void { error_clear_last(); - $result = \ssh2_scp_recv($session, $remote_file, $local_file); - if ($result === false) { + $safeResult = \ssh2_scp_recv($session, $remote_file, $local_file); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -536,8 +536,8 @@ function ssh2_scp_recv($session, string $remote_file, string $local_file): void function ssh2_scp_send($session, string $local_file, string $remote_file, int $create_mode = 0644): void { error_clear_last(); - $result = \ssh2_scp_send($session, $local_file, $remote_file, $create_mode); - if ($result === false) { + $safeResult = \ssh2_scp_send($session, $local_file, $remote_file, $create_mode); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -557,8 +557,8 @@ function ssh2_scp_send($session, string $local_file, string $remote_file, int $c function ssh2_send_eof($channel): void { error_clear_last(); - $result = \ssh2_send_eof($channel); - if ($result === false) { + $safeResult = \ssh2_send_eof($channel); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -577,8 +577,8 @@ function ssh2_send_eof($channel): void function ssh2_sftp_chmod($sftp, string $filename, int $mode): void { error_clear_last(); - $result = \ssh2_sftp_chmod($sftp, $filename, $mode); - if ($result === false) { + $safeResult = \ssh2_sftp_chmod($sftp, $filename, $mode); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -603,8 +603,8 @@ function ssh2_sftp_chmod($sftp, string $filename, int $mode): void function ssh2_sftp_mkdir($sftp, string $dirname, int $mode = 0777, bool $recursive = false): void { error_clear_last(); - $result = \ssh2_sftp_mkdir($sftp, $dirname, $mode, $recursive); - if ($result === false) { + $safeResult = \ssh2_sftp_mkdir($sftp, $dirname, $mode, $recursive); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -622,8 +622,8 @@ function ssh2_sftp_mkdir($sftp, string $dirname, int $mode = 0777, bool $recursi function ssh2_sftp_rename($sftp, string $from, string $to): void { error_clear_last(); - $result = \ssh2_sftp_rename($sftp, $from, $to); - if ($result === false) { + $safeResult = \ssh2_sftp_rename($sftp, $from, $to); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -643,8 +643,8 @@ function ssh2_sftp_rename($sftp, string $from, string $to): void function ssh2_sftp_rmdir($sftp, string $dirname): void { error_clear_last(); - $result = \ssh2_sftp_rmdir($sftp, $dirname); - if ($result === false) { + $safeResult = \ssh2_sftp_rmdir($sftp, $dirname); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -663,8 +663,8 @@ function ssh2_sftp_rmdir($sftp, string $dirname): void function ssh2_sftp_symlink($sftp, string $target, string $link): void { error_clear_last(); - $result = \ssh2_sftp_symlink($sftp, $target, $link); - if ($result === false) { + $safeResult = \ssh2_sftp_symlink($sftp, $target, $link); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -681,8 +681,8 @@ function ssh2_sftp_symlink($sftp, string $target, string $link): void function ssh2_sftp_unlink($sftp, string $filename): void { error_clear_last(); - $result = \ssh2_sftp_unlink($sftp, $filename); - if ($result === false) { + $safeResult = \ssh2_sftp_unlink($sftp, $filename); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } } @@ -702,11 +702,11 @@ function ssh2_sftp_unlink($sftp, string $filename): void function ssh2_sftp($session) { error_clear_last(); - $result = \ssh2_sftp($session); - if ($result === false) { + $safeResult = \ssh2_sftp($session); + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } - return $result; + return $safeResult; } @@ -732,18 +732,19 @@ function ssh2_shell($session, string $term_type = "vanilla", array $env = null, { error_clear_last(); if ($width_height_type !== SSH2_TERM_UNIT_CHARS) { - $result = \ssh2_shell($session, $term_type, $env, $width, $height, $width_height_type); + $safeResult = \ssh2_shell($session, $term_type, $env, $width, $height, $width_height_type); } elseif ($height !== 25) { - $result = \ssh2_shell($session, $term_type, $env, $width, $height); + $safeResult = \ssh2_shell($session, $term_type, $env, $width, $height); } elseif ($width !== 80) { - $result = \ssh2_shell($session, $term_type, $env, $width); + $safeResult = \ssh2_shell($session, $term_type, $env, $width); } elseif ($env !== null) { - $result = \ssh2_shell($session, $term_type, $env); + $safeResult = \ssh2_shell($session, $term_type, $env); } else { - $result = \ssh2_shell($session, $term_type); + $safeResult = \ssh2_shell($session, $term_type); } - if ($result === false) { + if ($safeResult === false) { throw Ssh2Exception::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/stream.php b/generated/stream.php index 3d086e14..52800c3f 100644 --- a/generated/stream.php +++ b/generated/stream.php @@ -16,8 +16,8 @@ function stream_context_set_params($context, array $params): void { error_clear_last(); - $result = \stream_context_set_params($context, $params); - if ($result === false) { + $safeResult = \stream_context_set_params($context, $params); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } } @@ -43,16 +43,16 @@ function stream_copy_to_stream($from, $to, int $length = null, int $offset = 0): { error_clear_last(); if ($offset !== 0) { - $result = \stream_copy_to_stream($from, $to, $length, $offset); + $safeResult = \stream_copy_to_stream($from, $to, $length, $offset); } elseif ($length !== null) { - $result = \stream_copy_to_stream($from, $to, $length); + $safeResult = \stream_copy_to_stream($from, $to, $length); } else { - $result = \stream_copy_to_stream($from, $to); + $safeResult = \stream_copy_to_stream($from, $to); } - if ($result === false) { + if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -91,16 +91,16 @@ function stream_filter_append($stream, string $filtername, int $read_write = nul { error_clear_last(); if ($params !== null) { - $result = \stream_filter_append($stream, $filtername, $read_write, $params); + $safeResult = \stream_filter_append($stream, $filtername, $read_write, $params); } elseif ($read_write !== null) { - $result = \stream_filter_append($stream, $filtername, $read_write); + $safeResult = \stream_filter_append($stream, $filtername, $read_write); } else { - $result = \stream_filter_append($stream, $filtername); + $safeResult = \stream_filter_append($stream, $filtername); } - if ($result === false) { + if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -140,16 +140,16 @@ function stream_filter_prepend($stream, string $filtername, int $read_write = nu { error_clear_last(); if ($params !== null) { - $result = \stream_filter_prepend($stream, $filtername, $read_write, $params); + $safeResult = \stream_filter_prepend($stream, $filtername, $read_write, $params); } elseif ($read_write !== null) { - $result = \stream_filter_prepend($stream, $filtername, $read_write); + $safeResult = \stream_filter_prepend($stream, $filtername, $read_write); } else { - $result = \stream_filter_prepend($stream, $filtername); + $safeResult = \stream_filter_prepend($stream, $filtername); } - if ($result === false) { + if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -174,8 +174,8 @@ function stream_filter_prepend($stream, string $filtername, int $read_write = nu function stream_filter_register(string $filter_name, string $class): void { error_clear_last(); - $result = \stream_filter_register($filter_name, $class); - if ($result === false) { + $safeResult = \stream_filter_register($filter_name, $class); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } } @@ -195,8 +195,8 @@ function stream_filter_register(string $filter_name, string $class): void function stream_filter_remove($stream_filter): void { error_clear_last(); - $result = \stream_filter_remove($stream_filter); - if ($result === false) { + $safeResult = \stream_filter_remove($stream_filter); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } } @@ -222,16 +222,16 @@ function stream_get_contents($stream, int $length = null, int $offset = -1): str { error_clear_last(); if ($offset !== -1) { - $result = \stream_get_contents($stream, $length, $offset); + $safeResult = \stream_get_contents($stream, $length, $offset); } elseif ($length !== null) { - $result = \stream_get_contents($stream, $length); + $safeResult = \stream_get_contents($stream, $length); } else { - $result = \stream_get_contents($stream); + $safeResult = \stream_get_contents($stream); } - if ($result === false) { + if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -261,11 +261,11 @@ function stream_get_contents($stream, int $length = null, int $offset = -1): str function stream_get_line($stream, int $length, string $ending = ""): string { error_clear_last(); - $result = \stream_get_line($stream, $length, $ending); - if ($result === false) { + $safeResult = \stream_get_line($stream, $length, $ending); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -280,8 +280,8 @@ function stream_get_line($stream, int $length, string $ending = ""): string function stream_isatty($stream): void { error_clear_last(); - $result = \stream_isatty($stream); - if ($result === false) { + $safeResult = \stream_isatty($stream); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } } @@ -298,11 +298,11 @@ function stream_isatty($stream): void function stream_resolve_include_path(string $filename): string { error_clear_last(); - $result = \stream_resolve_include_path($filename); - if ($result === false) { + $safeResult = \stream_resolve_include_path($filename); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -327,8 +327,8 @@ function stream_resolve_include_path(string $filename): string function stream_set_blocking($stream, bool $enable): void { error_clear_last(); - $result = \stream_set_blocking($stream, $enable); - if ($result === false) { + $safeResult = \stream_set_blocking($stream, $enable); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } } @@ -352,8 +352,8 @@ function stream_set_blocking($stream, bool $enable): void function stream_set_timeout($stream, int $seconds, int $microseconds = 0): void { error_clear_last(); - $result = \stream_set_timeout($stream, $seconds, $microseconds); - if ($result === false) { + $safeResult = \stream_set_timeout($stream, $seconds, $microseconds); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } } @@ -380,16 +380,16 @@ function stream_socket_accept($socket, float $timeout = null, ?string &$peer_nam { error_clear_last(); if ($peer_name !== null) { - $result = \stream_socket_accept($socket, $timeout, $peer_name); + $safeResult = \stream_socket_accept($socket, $timeout, $peer_name); } elseif ($timeout !== null) { - $result = \stream_socket_accept($socket, $timeout); + $safeResult = \stream_socket_accept($socket, $timeout); } else { - $result = \stream_socket_accept($socket); + $safeResult = \stream_socket_accept($socket); } - if ($result === false) { + if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -447,18 +447,18 @@ function stream_socket_client(string $address, ?int &$error_code = null, ?string { error_clear_last(); if ($context !== null) { - $result = \stream_socket_client($address, $error_code, $error_message, $timeout, $flags, $context); + $safeResult = \stream_socket_client($address, $error_code, $error_message, $timeout, $flags, $context); } elseif ($flags !== STREAM_CLIENT_CONNECT) { - $result = \stream_socket_client($address, $error_code, $error_message, $timeout, $flags); + $safeResult = \stream_socket_client($address, $error_code, $error_message, $timeout, $flags); } elseif ($timeout !== null) { - $result = \stream_socket_client($address, $error_code, $error_message, $timeout); + $safeResult = \stream_socket_client($address, $error_code, $error_message, $timeout); } else { - $result = \stream_socket_client($address, $error_code, $error_message); + $safeResult = \stream_socket_client($address, $error_code, $error_message); } - if ($result === false) { + if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -475,11 +475,11 @@ function stream_socket_client(string $address, ?int &$error_code = null, ?string function stream_socket_get_name($socket, bool $remote): string { error_clear_last(); - $result = \stream_socket_get_name($socket, $remote); - if ($result === false) { + $safeResult = \stream_socket_get_name($socket, $remote); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -509,11 +509,11 @@ function stream_socket_get_name($socket, bool $remote): string function stream_socket_pair(int $domain, int $type, int $protocol): iterable { error_clear_last(); - $result = \stream_socket_pair($domain, $type, $protocol); - if ($result === false) { + $safeResult = \stream_socket_pair($domain, $type, $protocol); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -556,11 +556,11 @@ function stream_socket_pair(int $domain, int $type, int $protocol): iterable function stream_socket_recvfrom($socket, int $length, int $flags = 0, ?string &$address = null): string { error_clear_last(); - $result = \stream_socket_recvfrom($socket, $length, $flags, $address); - if ($result === false) { + $safeResult = \stream_socket_recvfrom($socket, $length, $flags, $address); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -596,11 +596,11 @@ function stream_socket_recvfrom($socket, int $length, int $flags = 0, ?string &$ function stream_socket_sendto($socket, string $data, int $flags = 0, string $address = ""): int { error_clear_last(); - $result = \stream_socket_sendto($socket, $data, $flags, $address); - if ($result === false) { + $safeResult = \stream_socket_sendto($socket, $data, $flags, $address); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -650,14 +650,14 @@ function stream_socket_server(string $address, ?int &$error_code = null, ?string { error_clear_last(); if ($context !== null) { - $result = \stream_socket_server($address, $error_code, $error_message, $flags, $context); + $safeResult = \stream_socket_server($address, $error_code, $error_message, $flags, $context); } else { - $result = \stream_socket_server($address, $error_code, $error_message, $flags); + $safeResult = \stream_socket_server($address, $error_code, $error_message, $flags); } - if ($result === false) { + if ($safeResult === false) { throw StreamException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -677,8 +677,8 @@ function stream_socket_server(string $address, ?int &$error_code = null, ?string function stream_socket_shutdown($stream, int $mode): void { error_clear_last(); - $result = \stream_socket_shutdown($stream, $mode); - if ($result === false) { + $safeResult = \stream_socket_shutdown($stream, $mode); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } } @@ -695,8 +695,8 @@ function stream_socket_shutdown($stream, int $mode): void function stream_supports_lock($stream): void { error_clear_last(); - $result = \stream_supports_lock($stream); - if ($result === false) { + $safeResult = \stream_supports_lock($stream); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } } @@ -719,8 +719,8 @@ function stream_supports_lock($stream): void function stream_wrapper_register(string $protocol, string $class, int $flags = 0): void { error_clear_last(); - $result = \stream_wrapper_register($protocol, $class, $flags); - if ($result === false) { + $safeResult = \stream_wrapper_register($protocol, $class, $flags); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } } @@ -737,8 +737,8 @@ function stream_wrapper_register(string $protocol, string $class, int $flags = 0 function stream_wrapper_restore(string $protocol): void { error_clear_last(); - $result = \stream_wrapper_restore($protocol); - if ($result === false) { + $safeResult = \stream_wrapper_restore($protocol); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } } @@ -757,8 +757,9 @@ function stream_wrapper_restore(string $protocol): void function stream_wrapper_unregister(string $protocol): void { error_clear_last(); - $result = \stream_wrapper_unregister($protocol); - if ($result === false) { + $safeResult = \stream_wrapper_unregister($protocol); + if ($safeResult === false) { throw StreamException::createFromPhpError(); } } + diff --git a/generated/strings.php b/generated/strings.php index 2aa72339..69d79ec9 100644 --- a/generated/strings.php +++ b/generated/strings.php @@ -15,11 +15,11 @@ function convert_uudecode(string $string): string { error_clear_last(); - $result = \convert_uudecode($string); - if ($result === false) { + $safeResult = \convert_uudecode($string); + if ($safeResult === false) { throw StringsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -34,11 +34,11 @@ function convert_uudecode(string $string): string function hex2bin(string $string): string { error_clear_last(); - $result = \hex2bin($string); - if ($result === false) { + $safeResult = \hex2bin($string); + if ($safeResult === false) { throw StringsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -59,11 +59,11 @@ function hex2bin(string $string): string function md5_file(string $filename, bool $binary = false): string { error_clear_last(); - $result = \md5_file($filename, $binary); - if ($result === false) { + $safeResult = \md5_file($filename, $binary); + if ($safeResult === false) { throw StringsException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -80,9 +80,10 @@ function md5_file(string $filename, bool $binary = false): string function sha1_file(string $filename, bool $binary = false): string { error_clear_last(); - $result = \sha1_file($filename, $binary); - if ($result === false) { + $safeResult = \sha1_file($filename, $binary); + if ($safeResult === false) { throw StringsException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/swoole.php b/generated/swoole.php index a9c3ff3e..819ba50f 100644 --- a/generated/swoole.php +++ b/generated/swoole.php @@ -17,8 +17,8 @@ function swoole_async_dns_lookup(string $hostname, callable $callback): void { error_clear_last(); - $result = \swoole_async_dns_lookup($hostname, $callback); - if ($result === false) { + $safeResult = \swoole_async_dns_lookup($hostname, $callback); + if ($safeResult === false) { throw SwooleException::createFromPhpError(); } } @@ -37,8 +37,8 @@ function swoole_async_dns_lookup(string $hostname, callable $callback): void function swoole_async_readfile(string $filename, string $callback): void { error_clear_last(); - $result = \swoole_async_readfile($filename, $callback); - if ($result === false) { + $safeResult = \swoole_async_readfile($filename, $callback); + if ($safeResult === false) { throw SwooleException::createFromPhpError(); } } @@ -58,13 +58,13 @@ function swoole_async_write(string $filename, string $content, int $offset = nul { error_clear_last(); if ($callback !== null) { - $result = \swoole_async_write($filename, $content, $offset, $callback); + $safeResult = \swoole_async_write($filename, $content, $offset, $callback); } elseif ($offset !== null) { - $result = \swoole_async_write($filename, $content, $offset); + $safeResult = \swoole_async_write($filename, $content, $offset); } else { - $result = \swoole_async_write($filename, $content); + $safeResult = \swoole_async_write($filename, $content); } - if ($result === false) { + if ($safeResult === false) { throw SwooleException::createFromPhpError(); } } @@ -84,13 +84,13 @@ function swoole_async_writefile(string $filename, string $content, callable $cal { error_clear_last(); if ($flags !== 0) { - $result = \swoole_async_writefile($filename, $content, $callback, $flags); + $safeResult = \swoole_async_writefile($filename, $content, $callback, $flags); } elseif ($callback !== null) { - $result = \swoole_async_writefile($filename, $content, $callback); + $safeResult = \swoole_async_writefile($filename, $content, $callback); } else { - $result = \swoole_async_writefile($filename, $content); + $safeResult = \swoole_async_writefile($filename, $content); } - if ($result === false) { + if ($safeResult === false) { throw SwooleException::createFromPhpError(); } } @@ -106,8 +106,8 @@ function swoole_async_writefile(string $filename, string $content, callable $cal function swoole_event_defer(callable $callback): void { error_clear_last(); - $result = \swoole_event_defer($callback); - if ($result === false) { + $safeResult = \swoole_event_defer($callback); + if ($safeResult === false) { throw SwooleException::createFromPhpError(); } } @@ -123,8 +123,8 @@ function swoole_event_defer(callable $callback): void function swoole_event_del(int $fd): void { error_clear_last(); - $result = \swoole_event_del($fd); - if ($result === false) { + $safeResult = \swoole_event_del($fd); + if ($safeResult === false) { throw SwooleException::createFromPhpError(); } } @@ -141,8 +141,9 @@ function swoole_event_del(int $fd): void function swoole_event_write(int $fd, string $data): void { error_clear_last(); - $result = \swoole_event_write($fd, $data); - if ($result === false) { + $safeResult = \swoole_event_write($fd, $data); + if ($safeResult === false) { throw SwooleException::createFromPhpError(); } } + diff --git a/generated/uodbc.php b/generated/uodbc.php index 6ac914bd..8c186720 100644 --- a/generated/uodbc.php +++ b/generated/uodbc.php @@ -27,11 +27,11 @@ function odbc_autocommit($odbc, bool $enable = false) { error_clear_last(); - $result = \odbc_autocommit($odbc, $enable); - if ($result === false) { + $safeResult = \odbc_autocommit($odbc, $enable); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -137,8 +137,8 @@ function odbc_autocommit($odbc, bool $enable = false) function odbc_binmode(int $statement, int $mode): void { error_clear_last(); - $result = \odbc_binmode($statement, $mode); - if ($result === false) { + $safeResult = \odbc_binmode($statement, $mode); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } } @@ -184,11 +184,11 @@ function odbc_binmode(int $statement, int $mode): void function odbc_columnprivileges($odbc, string $catalog, string $schema, string $table, string $column) { error_clear_last(); - $result = \odbc_columnprivileges($odbc, $catalog, $schema, $table, $column); - if ($result === false) { + $safeResult = \odbc_columnprivileges($odbc, $catalog, $schema, $table, $column); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -241,20 +241,20 @@ function odbc_columns($odbc, string $catalog = null, string $schema = null, stri { error_clear_last(); if ($column !== null) { - $result = \odbc_columns($odbc, $catalog, $schema, $table, $column); + $safeResult = \odbc_columns($odbc, $catalog, $schema, $table, $column); } elseif ($table !== null) { - $result = \odbc_columns($odbc, $catalog, $schema, $table); + $safeResult = \odbc_columns($odbc, $catalog, $schema, $table); } elseif ($schema !== null) { - $result = \odbc_columns($odbc, $catalog, $schema); + $safeResult = \odbc_columns($odbc, $catalog, $schema); } elseif ($catalog !== null) { - $result = \odbc_columns($odbc, $catalog); + $safeResult = \odbc_columns($odbc, $catalog); } else { - $result = \odbc_columns($odbc); + $safeResult = \odbc_columns($odbc); } - if ($result === false) { + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -269,8 +269,8 @@ function odbc_columns($odbc, string $catalog = null, string $schema = null, stri function odbc_commit($odbc): void { error_clear_last(); - $result = \odbc_commit($odbc); - if ($result === false) { + $safeResult = \odbc_commit($odbc); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } } @@ -311,11 +311,11 @@ function odbc_commit($odbc): void function odbc_connect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER) { error_clear_last(); - $result = \odbc_connect($dsn, $user, $password, $cursor_option); - if ($result === false) { + $safeResult = \odbc_connect($dsn, $user, $password, $cursor_option); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -330,11 +330,11 @@ function odbc_connect(string $dsn, string $user, string $password, int $cursor_o function odbc_cursor($statement): string { error_clear_last(); - $result = \odbc_cursor($statement); - if ($result === false) { + $safeResult = \odbc_cursor($statement); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -356,11 +356,11 @@ function odbc_cursor($statement): string function odbc_data_source($odbc, int $fetch_type): array { error_clear_last(); - $result = \odbc_data_source($odbc, $fetch_type); - if ($result === false) { + $safeResult = \odbc_data_source($odbc, $fetch_type); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -378,11 +378,11 @@ function odbc_data_source($odbc, int $fetch_type): array function odbc_exec($odbc, string $query) { error_clear_last(); - $result = \odbc_exec($odbc, $query); - if ($result === false) { + $safeResult = \odbc_exec($odbc, $query); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -405,8 +405,8 @@ function odbc_exec($odbc, string $query) function odbc_execute($statement, array $params = []): void { error_clear_last(); - $result = \odbc_execute($statement, $params); - if ($result === false) { + $safeResult = \odbc_execute($statement, $params); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } } @@ -429,11 +429,11 @@ function odbc_execute($statement, array $params = []): void function odbc_fetch_into($statement, ?array &$array, int $row = 0): int { error_clear_last(); - $result = \odbc_fetch_into($statement, $array, $row); - if ($result === false) { + $safeResult = \odbc_fetch_into($statement, $array, $row); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -450,11 +450,11 @@ function odbc_fetch_into($statement, ?array &$array, int $row = 0): int function odbc_field_len($statement, int $field): int { error_clear_last(); - $result = \odbc_field_len($statement, $field); - if ($result === false) { + $safeResult = \odbc_field_len($statement, $field); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -471,11 +471,11 @@ function odbc_field_len($statement, int $field): int function odbc_field_name($statement, int $field): string { error_clear_last(); - $result = \odbc_field_name($statement, $field); - if ($result === false) { + $safeResult = \odbc_field_name($statement, $field); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -493,11 +493,11 @@ function odbc_field_name($statement, int $field): string function odbc_field_num($statement, string $field): int { error_clear_last(); - $result = \odbc_field_num($statement, $field); - if ($result === false) { + $safeResult = \odbc_field_num($statement, $field); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -514,11 +514,11 @@ function odbc_field_num($statement, string $field): int function odbc_field_scale($statement, int $field): int { error_clear_last(); - $result = \odbc_field_scale($statement, $field); - if ($result === false) { + $safeResult = \odbc_field_scale($statement, $field); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -535,11 +535,11 @@ function odbc_field_scale($statement, int $field): int function odbc_field_type($statement, int $field): string { error_clear_last(); - $result = \odbc_field_type($statement, $field); - if ($result === false) { + $safeResult = \odbc_field_type($statement, $field); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -582,11 +582,11 @@ function odbc_field_type($statement, int $field): string function odbc_foreignkeys($odbc, string $pk_catalog, string $pk_schema, string $pk_table, string $fk_catalog, string $fk_schema, string $fk_table) { error_clear_last(); - $result = \odbc_foreignkeys($odbc, $pk_catalog, $pk_schema, $pk_table, $fk_catalog, $fk_schema, $fk_table); - if ($result === false) { + $safeResult = \odbc_foreignkeys($odbc, $pk_catalog, $pk_schema, $pk_table, $fk_catalog, $fk_schema, $fk_table); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -625,11 +625,11 @@ function odbc_foreignkeys($odbc, string $pk_catalog, string $pk_schema, string $ function odbc_gettypeinfo($odbc, int $data_type = 0) { error_clear_last(); - $result = \odbc_gettypeinfo($odbc, $data_type); - if ($result === false) { + $safeResult = \odbc_gettypeinfo($odbc, $data_type); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -648,8 +648,8 @@ function odbc_gettypeinfo($odbc, int $data_type = 0) function odbc_longreadlen($statement, int $length): void { error_clear_last(); - $result = \odbc_longreadlen($statement, $length); - if ($result === false) { + $safeResult = \odbc_longreadlen($statement, $length); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } } @@ -679,11 +679,11 @@ function odbc_longreadlen($statement, int $length): void function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_option = SQL_CUR_USE_DRIVER) { error_clear_last(); - $result = \odbc_pconnect($dsn, $user, $password, $cursor_option); - if ($result === false) { + $safeResult = \odbc_pconnect($dsn, $user, $password, $cursor_option); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -707,11 +707,11 @@ function odbc_pconnect(string $dsn, string $user, string $password, int $cursor_ function odbc_prepare($odbc, string $query) { error_clear_last(); - $result = \odbc_prepare($odbc, $query); - if ($result === false) { + $safeResult = \odbc_prepare($odbc, $query); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -742,11 +742,11 @@ function odbc_prepare($odbc, string $query) function odbc_primarykeys($odbc, string $catalog, string $schema, string $table) { error_clear_last(); - $result = \odbc_primarykeys($odbc, $catalog, $schema, $table); - if ($result === false) { + $safeResult = \odbc_primarykeys($odbc, $catalog, $schema, $table); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -802,20 +802,20 @@ function odbc_procedurecolumns($odbc, string $catalog = null, string $schema = n { error_clear_last(); if ($column !== null) { - $result = \odbc_procedurecolumns($odbc, $catalog, $schema, $procedure, $column); + $safeResult = \odbc_procedurecolumns($odbc, $catalog, $schema, $procedure, $column); } elseif ($procedure !== null) { - $result = \odbc_procedurecolumns($odbc, $catalog, $schema, $procedure); + $safeResult = \odbc_procedurecolumns($odbc, $catalog, $schema, $procedure); } elseif ($schema !== null) { - $result = \odbc_procedurecolumns($odbc, $catalog, $schema); + $safeResult = \odbc_procedurecolumns($odbc, $catalog, $schema); } elseif ($catalog !== null) { - $result = \odbc_procedurecolumns($odbc, $catalog); + $safeResult = \odbc_procedurecolumns($odbc, $catalog); } else { - $result = \odbc_procedurecolumns($odbc); + $safeResult = \odbc_procedurecolumns($odbc); } - if ($result === false) { + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -855,18 +855,18 @@ function odbc_procedures($odbc, string $catalog = null, string $schema = null, s { error_clear_last(); if ($procedure !== null) { - $result = \odbc_procedures($odbc, $catalog, $schema, $procedure); + $safeResult = \odbc_procedures($odbc, $catalog, $schema, $procedure); } elseif ($schema !== null) { - $result = \odbc_procedures($odbc, $catalog, $schema); + $safeResult = \odbc_procedures($odbc, $catalog, $schema); } elseif ($catalog !== null) { - $result = \odbc_procedures($odbc, $catalog); + $safeResult = \odbc_procedures($odbc, $catalog); } else { - $result = \odbc_procedures($odbc); + $safeResult = \odbc_procedures($odbc); } - if ($result === false) { + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -887,11 +887,11 @@ function odbc_procedures($odbc, string $catalog = null, string $schema = null, s function odbc_result_all($statement, string $format = ""): int { error_clear_last(); - $result = \odbc_result_all($statement, $format); - if ($result === false) { + $safeResult = \odbc_result_all($statement, $format); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -910,11 +910,11 @@ function odbc_result_all($statement, string $format = ""): int function odbc_result($statement, $field) { error_clear_last(); - $result = \odbc_result($statement, $field); - if ($result === false) { + $safeResult = \odbc_result($statement, $field); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -929,8 +929,8 @@ function odbc_result($statement, $field) function odbc_rollback($odbc): void { error_clear_last(); - $result = \odbc_rollback($odbc); - if ($result === false) { + $safeResult = \odbc_rollback($odbc); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } } @@ -969,8 +969,8 @@ function odbc_rollback($odbc): void function odbc_setoption($odbc, int $which, int $option, int $value): void { error_clear_last(); - $result = \odbc_setoption($odbc, $which, $option, $value); - if ($result === false) { + $safeResult = \odbc_setoption($odbc, $which, $option, $value); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } } @@ -1012,11 +1012,11 @@ function odbc_setoption($odbc, int $which, int $option, int $value): void function odbc_specialcolumns($odbc, int $type, string $catalog, string $schema, string $table, int $scope, int $nullable) { error_clear_last(); - $result = \odbc_specialcolumns($odbc, $type, $catalog, $schema, $table, $scope, $nullable); - if ($result === false) { + $safeResult = \odbc_specialcolumns($odbc, $type, $catalog, $schema, $table, $scope, $nullable); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1058,11 +1058,11 @@ function odbc_specialcolumns($odbc, int $type, string $catalog, string $schema, function odbc_statistics($odbc, string $catalog, string $schema, string $table, int $unique, int $accuracy) { error_clear_last(); - $result = \odbc_statistics($odbc, $catalog, $schema, $table, $unique, $accuracy); - if ($result === false) { + $safeResult = \odbc_statistics($odbc, $catalog, $schema, $table, $unique, $accuracy); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1100,11 +1100,11 @@ function odbc_statistics($odbc, string $catalog, string $schema, string $table, function odbc_tableprivileges($odbc, string $catalog, string $schema, string $table) { error_clear_last(); - $result = \odbc_tableprivileges($odbc, $catalog, $schema, $table); - if ($result === false) { + $safeResult = \odbc_tableprivileges($odbc, $catalog, $schema, $table); + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -1185,18 +1185,19 @@ function odbc_tables($odbc, string $catalog = null, string $schema = null, strin { error_clear_last(); if ($types !== null) { - $result = \odbc_tables($odbc, $catalog, $schema, $table, $types); + $safeResult = \odbc_tables($odbc, $catalog, $schema, $table, $types); } elseif ($table !== null) { - $result = \odbc_tables($odbc, $catalog, $schema, $table); + $safeResult = \odbc_tables($odbc, $catalog, $schema, $table); } elseif ($schema !== null) { - $result = \odbc_tables($odbc, $catalog, $schema); + $safeResult = \odbc_tables($odbc, $catalog, $schema); } elseif ($catalog !== null) { - $result = \odbc_tables($odbc, $catalog); + $safeResult = \odbc_tables($odbc, $catalog); } else { - $result = \odbc_tables($odbc); + $safeResult = \odbc_tables($odbc); } - if ($result === false) { + if ($safeResult === false) { throw UodbcException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/uopz.php b/generated/uopz.php index ae0ee8f8..55747d74 100644 --- a/generated/uopz.php +++ b/generated/uopz.php @@ -15,8 +15,8 @@ function uopz_extend(string $class, string $parent): void { error_clear_last(); - $result = \uopz_extend($class, $parent); - if ($result === false) { + $safeResult = \uopz_extend($class, $parent); + if ($safeResult === false) { throw UopzException::createFromPhpError(); } } @@ -33,8 +33,9 @@ function uopz_extend(string $class, string $parent): void function uopz_implement(string $class, string $interface): void { error_clear_last(); - $result = \uopz_implement($class, $interface); - if ($result === false) { + $safeResult = \uopz_implement($class, $interface); + if ($safeResult === false) { throw UopzException::createFromPhpError(); } } + diff --git a/generated/url.php b/generated/url.php index 5871e6dc..18589aec 100644 --- a/generated/url.php +++ b/generated/url.php @@ -20,11 +20,11 @@ function base64_decode(string $string, bool $strict = false): string { error_clear_last(); - $result = \base64_decode($string, $strict); - if ($result === false) { + $safeResult = \base64_decode($string, $strict); + if ($safeResult === false) { throw UrlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -47,14 +47,14 @@ function get_headers(string $url, bool $associative = false, $context = null): a { error_clear_last(); if ($context !== null) { - $result = \get_headers($url, $associative, $context); + $safeResult = \get_headers($url, $associative, $context); } else { - $result = \get_headers($url, $associative); + $safeResult = \get_headers($url, $associative); } - if ($result === false) { + if ($safeResult === false) { throw UrlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -97,11 +97,11 @@ function get_headers(string $url, bool $associative = false, $context = null): a function get_meta_tags(string $filename, bool $use_include_path = false): array { error_clear_last(); - $result = \get_meta_tags($filename, $use_include_path); - if ($result === false) { + $safeResult = \get_meta_tags($filename, $use_include_path); + if ($safeResult === false) { throw UrlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -196,9 +196,10 @@ function get_meta_tags(string $filename, bool $use_include_path = false): array function parse_url(string $url, int $component = -1) { error_clear_last(); - $result = \parse_url($url, $component); - if ($result === false) { + $safeResult = \parse_url($url, $component); + if ($safeResult === false) { throw UrlException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/var.php b/generated/var.php index 14609f22..3488603e 100644 --- a/generated/var.php +++ b/generated/var.php @@ -53,8 +53,9 @@ function settype(&$var, string $type): void { error_clear_last(); - $result = \settype($var, $type); - if ($result === false) { + $safeResult = \settype($var, $type); + if ($safeResult === false) { throw VarException::createFromPhpError(); } } + diff --git a/generated/xdiff.php b/generated/xdiff.php index 27feef39..73fae3dc 100644 --- a/generated/xdiff.php +++ b/generated/xdiff.php @@ -19,8 +19,8 @@ function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): void { error_clear_last(); - $result = \xdiff_file_bdiff($old_file, $new_file, $dest); - if ($result === false) { + $safeResult = \xdiff_file_bdiff($old_file, $new_file, $dest); + if ($safeResult === false) { throw XdiffException::createFromPhpError(); } } @@ -41,8 +41,8 @@ function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): voi function xdiff_file_bpatch(string $file, string $patch, string $dest): void { error_clear_last(); - $result = \xdiff_file_bpatch($file, $patch, $dest); - if ($result === false) { + $safeResult = \xdiff_file_bpatch($file, $patch, $dest); + if ($safeResult === false) { throw XdiffException::createFromPhpError(); } } @@ -65,8 +65,8 @@ function xdiff_file_bpatch(string $file, string $patch, string $dest): void function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest): void { error_clear_last(); - $result = \xdiff_file_diff_binary($old_file, $new_file, $dest); - if ($result === false) { + $safeResult = \xdiff_file_diff_binary($old_file, $new_file, $dest); + if ($safeResult === false) { throw XdiffException::createFromPhpError(); } } @@ -93,8 +93,8 @@ function xdiff_file_diff_binary(string $old_file, string $new_file, string $dest function xdiff_file_diff(string $old_file, string $new_file, string $dest, int $context = 3, bool $minimal = false): void { error_clear_last(); - $result = \xdiff_file_diff($old_file, $new_file, $dest, $context, $minimal); - if ($result === false) { + $safeResult = \xdiff_file_diff($old_file, $new_file, $dest, $context, $minimal); + if ($safeResult === false) { throw XdiffException::createFromPhpError(); } } @@ -117,8 +117,8 @@ function xdiff_file_diff(string $old_file, string $new_file, string $dest, int $ function xdiff_file_patch_binary(string $file, string $patch, string $dest): void { error_clear_last(); - $result = \xdiff_file_patch_binary($file, $patch, $dest); - if ($result === false) { + $safeResult = \xdiff_file_patch_binary($file, $patch, $dest); + if ($safeResult === false) { throw XdiffException::createFromPhpError(); } } @@ -144,8 +144,8 @@ function xdiff_file_patch_binary(string $file, string $patch, string $dest): voi function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): void { error_clear_last(); - $result = \xdiff_file_rabdiff($old_file, $new_file, $dest); - if ($result === false) { + $safeResult = \xdiff_file_rabdiff($old_file, $new_file, $dest); + if ($safeResult === false) { throw XdiffException::createFromPhpError(); } } @@ -165,11 +165,11 @@ function xdiff_file_rabdiff(string $old_file, string $new_file, string $dest): v function xdiff_string_bpatch(string $str, string $patch): string { error_clear_last(); - $result = \xdiff_string_bpatch($str, $patch); - if ($result === false) { + $safeResult = \xdiff_string_bpatch($str, $patch); + if ($safeResult === false) { throw XdiffException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -189,11 +189,11 @@ function xdiff_string_bpatch(string $str, string $patch): string function xdiff_string_patch_binary(string $str, string $patch): string { error_clear_last(); - $result = \xdiff_string_patch_binary($str, $patch); - if ($result === false) { + $safeResult = \xdiff_string_patch_binary($str, $patch); + if ($safeResult === false) { throw XdiffException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -223,14 +223,15 @@ function xdiff_string_patch(string $str, string $patch, int $flags = null, ?stri { error_clear_last(); if ($error !== null) { - $result = \xdiff_string_patch($str, $patch, $flags, $error); + $safeResult = \xdiff_string_patch($str, $patch, $flags, $error); } elseif ($flags !== null) { - $result = \xdiff_string_patch($str, $patch, $flags); + $safeResult = \xdiff_string_patch($str, $patch, $flags); } else { - $result = \xdiff_string_patch($str, $patch); + $safeResult = \xdiff_string_patch($str, $patch); } - if ($result === false) { + if ($safeResult === false) { throw XdiffException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/xml.php b/generated/xml.php index 6f2679dd..c6f71341 100644 --- a/generated/xml.php +++ b/generated/xml.php @@ -14,8 +14,8 @@ function xml_parser_free($parser): void { error_clear_last(); - $result = \xml_parser_free($parser); - if ($result === false) { + $safeResult = \xml_parser_free($parser); + if ($safeResult === false) { throw XmlException::createFromPhpError(); } } @@ -70,8 +70,8 @@ function xml_parser_free($parser): void function xml_set_character_data_handler($parser, callable $handler): void { error_clear_last(); - $result = \xml_set_character_data_handler($parser, $handler); - if ($result === false) { + $safeResult = \xml_set_character_data_handler($parser, $handler); + if ($safeResult === false) { throw XmlException::createFromPhpError(); } } @@ -128,8 +128,8 @@ function xml_set_character_data_handler($parser, callable $handler): void function xml_set_default_handler($parser, callable $handler): void { error_clear_last(); - $result = \xml_set_default_handler($parser, $handler); - if ($result === false) { + $safeResult = \xml_set_default_handler($parser, $handler); + if ($safeResult === false) { throw XmlException::createFromPhpError(); } } @@ -198,8 +198,8 @@ function xml_set_default_handler($parser, callable $handler): void function xml_set_element_handler($parser, callable $start_handler, callable $end_handler): void { error_clear_last(); - $result = \xml_set_element_handler($parser, $start_handler, $end_handler); - if ($result === false) { + $safeResult = \xml_set_element_handler($parser, $start_handler, $end_handler); + if ($safeResult === false) { throw XmlException::createFromPhpError(); } } @@ -255,8 +255,8 @@ function xml_set_element_handler($parser, callable $start_handler, callable $end function xml_set_end_namespace_decl_handler($parser, callable $handler): void { error_clear_last(); - $result = \xml_set_end_namespace_decl_handler($parser, $handler); - if ($result === false) { + $safeResult = \xml_set_end_namespace_decl_handler($parser, $handler); + if ($safeResult === false) { throw XmlException::createFromPhpError(); } } @@ -347,8 +347,8 @@ function xml_set_end_namespace_decl_handler($parser, callable $handler): void function xml_set_external_entity_ref_handler($parser, callable $handler): void { error_clear_last(); - $result = \xml_set_external_entity_ref_handler($parser, $handler); - if ($result === false) { + $safeResult = \xml_set_external_entity_ref_handler($parser, $handler); + if ($safeResult === false) { throw XmlException::createFromPhpError(); } } @@ -444,8 +444,8 @@ function xml_set_external_entity_ref_handler($parser, callable $handler): void function xml_set_notation_decl_handler($parser, callable $handler): void { error_clear_last(); - $result = \xml_set_notation_decl_handler($parser, $handler); - if ($result === false) { + $safeResult = \xml_set_notation_decl_handler($parser, $handler); + if ($safeResult === false) { throw XmlException::createFromPhpError(); } } @@ -465,8 +465,8 @@ function xml_set_notation_decl_handler($parser, callable $handler): void function xml_set_object($parser, object $object): void { error_clear_last(); - $result = \xml_set_object($parser, $object); - if ($result === false) { + $safeResult = \xml_set_object($parser, $object); + if ($safeResult === false) { throw XmlException::createFromPhpError(); } } @@ -539,8 +539,8 @@ function xml_set_object($parser, object $object): void function xml_set_processing_instruction_handler($parser, callable $handler): void { error_clear_last(); - $result = \xml_set_processing_instruction_handler($parser, $handler); - if ($result === false) { + $safeResult = \xml_set_processing_instruction_handler($parser, $handler); + if ($safeResult === false) { throw XmlException::createFromPhpError(); } } @@ -605,8 +605,8 @@ function xml_set_processing_instruction_handler($parser, callable $handler): voi function xml_set_start_namespace_decl_handler($parser, callable $handler): void { error_clear_last(); - $result = \xml_set_start_namespace_decl_handler($parser, $handler); - if ($result === false) { + $safeResult = \xml_set_start_namespace_decl_handler($parser, $handler); + if ($safeResult === false) { throw XmlException::createFromPhpError(); } } @@ -709,8 +709,9 @@ function xml_set_start_namespace_decl_handler($parser, callable $handler): void function xml_set_unparsed_entity_decl_handler($parser, callable $handler): void { error_clear_last(); - $result = \xml_set_unparsed_entity_decl_handler($parser, $handler); - if ($result === false) { + $safeResult = \xml_set_unparsed_entity_decl_handler($parser, $handler); + if ($safeResult === false) { throw XmlException::createFromPhpError(); } } + diff --git a/generated/xmlrpc.php b/generated/xmlrpc.php index 15364fb4..38ac3766 100644 --- a/generated/xmlrpc.php +++ b/generated/xmlrpc.php @@ -15,8 +15,9 @@ function xmlrpc_set_type(&$value, string $type): void { error_clear_last(); - $result = \xmlrpc_set_type($value, $type); - if ($result === false) { + $safeResult = \xmlrpc_set_type($value, $type); + if ($safeResult === false) { throw XmlrpcException::createFromPhpError(); } } + diff --git a/generated/yaml.php b/generated/yaml.php index fd297aad..f70c61ac 100644 --- a/generated/yaml.php +++ b/generated/yaml.php @@ -27,14 +27,14 @@ function yaml_parse_file(string $filename, int $pos = 0, ?int &$ndocs = null, ar { error_clear_last(); if ($callbacks !== null) { - $result = \yaml_parse_file($filename, $pos, $ndocs, $callbacks); + $safeResult = \yaml_parse_file($filename, $pos, $ndocs, $callbacks); } else { - $result = \yaml_parse_file($filename, $pos, $ndocs); + $safeResult = \yaml_parse_file($filename, $pos, $ndocs); } - if ($result === false) { + if ($safeResult === false) { throw YamlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -64,14 +64,14 @@ function yaml_parse_url(string $url, int $pos = 0, ?int &$ndocs = null, array $c { error_clear_last(); if ($callbacks !== null) { - $result = \yaml_parse_url($url, $pos, $ndocs, $callbacks); + $safeResult = \yaml_parse_url($url, $pos, $ndocs, $callbacks); } else { - $result = \yaml_parse_url($url, $pos, $ndocs); + $safeResult = \yaml_parse_url($url, $pos, $ndocs); } - if ($result === false) { + if ($safeResult === false) { throw YamlException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -98,12 +98,13 @@ function yaml_parse(string $input, int $pos = 0, ?int &$ndocs = null, array $cal { error_clear_last(); if ($callbacks !== null) { - $result = \yaml_parse($input, $pos, $ndocs, $callbacks); + $safeResult = \yaml_parse($input, $pos, $ndocs, $callbacks); } else { - $result = \yaml_parse($input, $pos, $ndocs); + $safeResult = \yaml_parse($input, $pos, $ndocs); } - if ($result === false) { + if ($safeResult === false) { throw YamlException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/yaz.php b/generated/yaz.php index 29c1d33c..d258d485 100644 --- a/generated/yaz.php +++ b/generated/yaz.php @@ -50,8 +50,8 @@ function yaz_ccl_parse($id, string $query, ?array &$result): void { error_clear_last(); - $result = \yaz_ccl_parse($id, $query, $result); - if ($result === false) { + $safeResult = \yaz_ccl_parse($id, $query, $result); + if ($safeResult === false) { throw YazException::createFromPhpError(); } } @@ -67,8 +67,8 @@ function yaz_ccl_parse($id, string $query, ?array &$result): void function yaz_close($id): void { error_clear_last(); - $result = \yaz_close($id); - if ($result === false) { + $safeResult = \yaz_close($id); + if ($safeResult === false) { throw YazException::createFromPhpError(); } } @@ -269,14 +269,14 @@ function yaz_connect(string $zurl, $options = null) { error_clear_last(); if ($options !== null) { - $result = \yaz_connect($zurl, $options); + $safeResult = \yaz_connect($zurl, $options); } else { - $result = \yaz_connect($zurl); + $safeResult = \yaz_connect($zurl); } - if ($result === false) { + if ($safeResult === false) { throw YazException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -295,8 +295,8 @@ function yaz_connect(string $zurl, $options = null) function yaz_database($id, string $databases): void { error_clear_last(); - $result = \yaz_database($id, $databases); - if ($result === false) { + $safeResult = \yaz_database($id, $databases); + if ($safeResult === false) { throw YazException::createFromPhpError(); } } @@ -318,8 +318,8 @@ function yaz_database($id, string $databases): void function yaz_element($id, string $elementset): void { error_clear_last(); - $result = \yaz_element($id, $elementset); - if ($result === false) { + $safeResult = \yaz_element($id, $elementset); + if ($safeResult === false) { throw YazException::createFromPhpError(); } } @@ -338,8 +338,8 @@ function yaz_element($id, string $elementset): void function yaz_present($id): void { error_clear_last(); - $result = \yaz_present($id); - if ($result === false) { + $safeResult = \yaz_present($id); + if ($safeResult === false) { throw YazException::createFromPhpError(); } } @@ -378,8 +378,8 @@ function yaz_present($id): void function yaz_search($id, string $type, string $query): void { error_clear_last(); - $result = \yaz_search($id, $type, $query); - if ($result === false) { + $safeResult = \yaz_search($id, $type, $query); + if ($safeResult === false) { throw YazException::createFromPhpError(); } } @@ -430,9 +430,10 @@ function yaz_search($id, string $type, string $query): void function yaz_wait(array &$options = null) { error_clear_last(); - $result = \yaz_wait($options); - if ($result === false) { + $safeResult = \yaz_wait($options); + if ($safeResult === false) { throw YazException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/zip.php b/generated/zip.php index d4097eb1..7ce2263b 100644 --- a/generated/zip.php +++ b/generated/zip.php @@ -14,8 +14,8 @@ function zip_entry_close($zip_entry): void { error_clear_last(); - $result = \zip_entry_close($zip_entry); - if ($result === false) { + $safeResult = \zip_entry_close($zip_entry); + if ($safeResult === false) { throw ZipException::createFromPhpError(); } } @@ -32,11 +32,11 @@ function zip_entry_close($zip_entry): void function zip_entry_compressedsize($zip_entry): int { error_clear_last(); - $result = \zip_entry_compressedsize($zip_entry); - if ($result === false) { + $safeResult = \zip_entry_compressedsize($zip_entry); + if ($safeResult === false) { throw ZipException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -52,11 +52,11 @@ function zip_entry_compressedsize($zip_entry): int function zip_entry_compressionmethod($zip_entry): string { error_clear_last(); - $result = \zip_entry_compressionmethod($zip_entry); - if ($result === false) { + $safeResult = \zip_entry_compressionmethod($zip_entry); + if ($safeResult === false) { throw ZipException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -71,11 +71,11 @@ function zip_entry_compressionmethod($zip_entry): string function zip_entry_filesize($zip_entry): int { error_clear_last(); - $result = \zip_entry_filesize($zip_entry); - if ($result === false) { + $safeResult = \zip_entry_filesize($zip_entry); + if ($safeResult === false) { throw ZipException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -90,11 +90,11 @@ function zip_entry_filesize($zip_entry): int function zip_entry_name($zip_entry): string { error_clear_last(); - $result = \zip_entry_name($zip_entry); - if ($result === false) { + $safeResult = \zip_entry_name($zip_entry); + if ($safeResult === false) { throw ZipException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -115,8 +115,8 @@ function zip_entry_name($zip_entry): string function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): void { error_clear_last(); - $result = \zip_entry_open($zip_dp, $zip_entry, $mode); - if ($result === false) { + $safeResult = \zip_entry_open($zip_dp, $zip_entry, $mode); + if ($safeResult === false) { throw ZipException::createFromPhpError(); } } @@ -136,9 +136,10 @@ function zip_entry_open($zip_dp, $zip_entry, string $mode = "rb"): void function zip_entry_read($zip_entry, int $len = 1024): string { error_clear_last(); - $result = \zip_entry_read($zip_entry, $len); - if ($result === false) { + $safeResult = \zip_entry_read($zip_entry, $len); + if ($safeResult === false) { throw ZipException::createFromPhpError(); } - return $result; + return $safeResult; } + diff --git a/generated/zlib.php b/generated/zlib.php index c365525e..07d00b37 100644 --- a/generated/zlib.php +++ b/generated/zlib.php @@ -25,11 +25,11 @@ function deflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string { error_clear_last(); - $result = \deflate_add($context, $data, $flush_mode); - if ($result === false) { + $safeResult = \deflate_add($context, $data, $flush_mode); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -126,11 +126,11 @@ function deflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): function deflate_init(int $encoding, array $options = []) { error_clear_last(); - $result = \deflate_init($encoding, $options); - if ($result === false) { + $safeResult = \deflate_init($encoding, $options); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -145,8 +145,8 @@ function deflate_init(int $encoding, array $options = []) function gzclose($stream): void { error_clear_last(); - $result = \gzclose($stream); - if ($result === false) { + $safeResult = \gzclose($stream); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } } @@ -173,11 +173,11 @@ function gzclose($stream): void function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_DEFLATE): string { error_clear_last(); - $result = \gzcompress($data, $level, $encoding); - if ($result === false) { + $safeResult = \gzcompress($data, $level, $encoding); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -194,11 +194,11 @@ function gzcompress(string $data, int $level = -1, int $encoding = ZLIB_ENCODING function gzdecode(string $data, int $max_length = 0): string { error_clear_last(); - $result = \gzdecode($data, $max_length); - if ($result === false) { + $safeResult = \gzdecode($data, $max_length); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -222,11 +222,11 @@ function gzdecode(string $data, int $max_length = 0): string function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_RAW): string { error_clear_last(); - $result = \gzdeflate($data, $level, $encoding); - if ($result === false) { + $safeResult = \gzdeflate($data, $level, $encoding); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -256,11 +256,11 @@ function gzdeflate(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_ function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_GZIP): string { error_clear_last(); - $result = \gzencode($data, $level, $encoding); - if ($result === false) { + $safeResult = \gzencode($data, $level, $encoding); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -278,11 +278,11 @@ function gzencode(string $data, int $level = -1, int $encoding = ZLIB_ENCODING_G function gzfile(string $filename, int $use_include_path = 0): array { error_clear_last(); - $result = \gzfile($filename, $use_include_path); - if ($result === false) { + $safeResult = \gzfile($filename, $use_include_path); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -302,14 +302,14 @@ function gzgets($stream, int $length = null): string { error_clear_last(); if ($length !== null) { - $result = \gzgets($stream, $length); + $safeResult = \gzgets($stream, $length); } else { - $result = \gzgets($stream); + $safeResult = \gzgets($stream); } - if ($result === false) { + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -331,14 +331,14 @@ function gzgetss($zp, int $length, string $allowable_tags = null): string { error_clear_last(); if ($allowable_tags !== null) { - $result = \gzgetss($zp, $length, $allowable_tags); + $safeResult = \gzgetss($zp, $length, $allowable_tags); } else { - $result = \gzgetss($zp, $length); + $safeResult = \gzgetss($zp, $length); } - if ($result === false) { + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -358,11 +358,11 @@ function gzgetss($zp, int $length, string $allowable_tags = null): string function gzinflate(string $data, int $max_length = 0): string { error_clear_last(); - $result = \gzinflate($data, $max_length); - if ($result === false) { + $safeResult = \gzinflate($data, $max_length); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -395,11 +395,11 @@ function gzinflate(string $data, int $max_length = 0): string function gzopen(string $filename, string $mode, int $use_include_path = 0) { error_clear_last(); - $result = \gzopen($filename, $mode, $use_include_path); - if ($result === false) { + $safeResult = \gzopen($filename, $mode, $use_include_path); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -417,11 +417,11 @@ function gzopen(string $filename, string $mode, int $use_include_path = 0) function gzpassthru($stream): int { error_clear_last(); - $result = \gzpassthru($stream); - if ($result === false) { + $safeResult = \gzpassthru($stream); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -441,11 +441,11 @@ function gzpassthru($stream): int function gzread($stream, int $length): string { error_clear_last(); - $result = \gzread($stream, $length); - if ($result === false) { + $safeResult = \gzread($stream, $length); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -461,8 +461,8 @@ function gzread($stream, int $length): string function gzrewind($stream): void { error_clear_last(); - $result = \gzrewind($stream); - if ($result === false) { + $safeResult = \gzrewind($stream); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } } @@ -484,11 +484,11 @@ function gzrewind($stream): void function gzuncompress(string $data, int $max_length = 0): string { error_clear_last(); - $result = \gzuncompress($data, $max_length); - if ($result === false) { + $safeResult = \gzuncompress($data, $max_length); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -512,14 +512,14 @@ function gzwrite($stream, string $data, int $length = null): int { error_clear_last(); if ($length !== null) { - $result = \gzwrite($stream, $data, $length); + $safeResult = \gzwrite($stream, $data, $length); } else { - $result = \gzwrite($stream, $data); + $safeResult = \gzwrite($stream, $data); } - if ($result === false) { + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -534,11 +534,11 @@ function gzwrite($stream, string $data, int $length = null): int function inflate_get_read_len($context): int { error_clear_last(); - $result = \inflate_get_read_len($context); - if ($result === false) { + $safeResult = \inflate_get_read_len($context); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -553,11 +553,11 @@ function inflate_get_read_len($context): int function inflate_get_status($context): int { error_clear_last(); - $result = \inflate_get_status($context); - if ($result === false) { + $safeResult = \inflate_get_status($context); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -585,11 +585,11 @@ function inflate_get_status($context): int function inflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): string { error_clear_last(); - $result = \inflate_add($context, $data, $flush_mode); - if ($result === false) { + $safeResult = \inflate_add($context, $data, $flush_mode); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -667,11 +667,11 @@ function inflate_add($context, string $data, int $flush_mode = ZLIB_SYNC_FLUSH): function inflate_init(int $encoding, array $options = []) { error_clear_last(); - $result = \inflate_init($encoding, $options); - if ($result === false) { + $safeResult = \inflate_init($encoding, $options); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -693,11 +693,11 @@ function inflate_init(int $encoding, array $options = []) function readgzfile(string $filename, int $use_include_path = 0): int { error_clear_last(); - $result = \readgzfile($filename, $use_include_path); - if ($result === false) { + $safeResult = \readgzfile($filename, $use_include_path); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } @@ -713,9 +713,10 @@ function readgzfile(string $filename, int $use_include_path = 0): int function zlib_decode(string $data, int $max_length = 0): string { error_clear_last(); - $result = \zlib_decode($data, $max_length); - if ($result === false) { + $safeResult = \zlib_decode($data, $max_length); + if ($safeResult === false) { throw ZlibException::createFromPhpError(); } - return $result; + return $safeResult; } + From 445f5eb0c86efdcdf55a3492109a0fbf204105f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Thu, 4 Aug 2022 16:44:19 +0000 Subject: [PATCH 3/3] Fix CS --- generated/apache.php | 1 - generated/apcu.php | 1 - generated/array.php | 1 - generated/bzip2.php | 1 - generated/calendar.php | 1 - generated/classobj.php | 1 - generated/com.php | 1 - generated/cubrid.php | 1 - generated/curl.php | 1 - generated/datetime.php | 1 - generated/dir.php | 1 - generated/eio.php | 67 ++++++++++++++++++++-------------------- generated/errorfunc.php | 1 - generated/exec.php | 1 - generated/fileinfo.php | 1 - generated/filesystem.php | 1 - generated/filter.php | 1 - generated/fpm.php | 1 - generated/ftp.php | 1 - generated/funchand.php | 3 +- generated/gettext.php | 1 - generated/gmp.php | 1 - generated/gnupg.php | 1 - generated/hash.php | 1 - generated/ibase.php | 1 - generated/ibmDb2.php | 1 - generated/iconv.php | 1 - generated/image.php | 1 - generated/imap.php | 1 - generated/info.php | 1 - generated/inotify.php | 1 - generated/json.php | 1 - generated/ldap.php | 1 - generated/libxml.php | 1 - generated/lzf.php | 1 - generated/mailparse.php | 1 - generated/mbstring.php | 1 - generated/misc.php | 3 +- generated/mysql.php | 39 ++++++++++++----------- generated/network.php | 1 - generated/oci8.php | 1 - generated/opcache.php | 1 - generated/openssl.php | 1 - generated/outcontrol.php | 1 - generated/pcntl.php | 1 - generated/pcre.php | 1 - generated/pgsql.php | 1 - generated/posix.php | 1 - generated/ps.php | 1 - generated/pspell.php | 1 - generated/readline.php | 1 - generated/rpminfo.php | 1 - generated/rrd.php | 1 - generated/sem.php | 1 - generated/session.php | 1 - generated/shmop.php | 1 - generated/sockets.php | 1 - generated/sodium.php | 1 - generated/solr.php | 1 - generated/spl.php | 1 - generated/sqlsrv.php | 1 - generated/ssdeep.php | 1 - generated/ssh2.php | 1 - generated/stream.php | 1 - generated/strings.php | 1 - generated/swoole.php | 1 - generated/uodbc.php | 1 - generated/uopz.php | 1 - generated/url.php | 1 - generated/var.php | 1 - generated/xdiff.php | 1 - generated/xml.php | 1 - generated/xmlrpc.php | 1 - generated/yaml.php | 1 - generated/yaz.php | 1 - generated/zip.php | 1 - generated/zlib.php | 1 - 77 files changed, 54 insertions(+), 131 deletions(-) diff --git a/generated/apache.php b/generated/apache.php index ca0bc01a..e6fd372c 100644 --- a/generated/apache.php +++ b/generated/apache.php @@ -197,4 +197,3 @@ function virtual(string $uri): void throw ApacheException::createFromPhpError(); } } - diff --git a/generated/apcu.php b/generated/apcu.php index ff774136..a8ec70b4 100644 --- a/generated/apcu.php +++ b/generated/apcu.php @@ -110,4 +110,3 @@ function apcu_sma_info(bool $limited = false): array } return $safeResult; } - diff --git a/generated/array.php b/generated/array.php index 8386e78e..6ef24195 100644 --- a/generated/array.php +++ b/generated/array.php @@ -57,4 +57,3 @@ function shuffle(array &$array): void throw ArrayException::createFromPhpError(); } } - diff --git a/generated/bzip2.php b/generated/bzip2.php index e012b3bb..df550e09 100644 --- a/generated/bzip2.php +++ b/generated/bzip2.php @@ -95,4 +95,3 @@ function bzwrite($bz, string $data, int $length = null): int } return $safeResult; } - diff --git a/generated/calendar.php b/generated/calendar.php index 26d3b1ca..c063ab06 100644 --- a/generated/calendar.php +++ b/generated/calendar.php @@ -28,4 +28,3 @@ function unixtojd(int $timestamp = null): int } return $safeResult; } - diff --git a/generated/classobj.php b/generated/classobj.php index 5ba3c507..06141e26 100644 --- a/generated/classobj.php +++ b/generated/classobj.php @@ -23,4 +23,3 @@ function class_alias(string $class, string $alias, bool $autoload = true): void throw ClassobjException::createFromPhpError(); } } - diff --git a/generated/com.php b/generated/com.php index 0272b6a8..fcbcc551 100644 --- a/generated/com.php +++ b/generated/com.php @@ -194,4 +194,3 @@ function variant_round($value, int $decimals) } return $safeResult; } - diff --git a/generated/cubrid.php b/generated/cubrid.php index af1b289e..4835f87b 100644 --- a/generated/cubrid.php +++ b/generated/cubrid.php @@ -2036,4 +2036,3 @@ function cubrid_set_query_timeout($req_identifier, int $timeout): void throw CubridException::createFromPhpError(); } } - diff --git a/generated/curl.php b/generated/curl.php index 9ec327b0..027ac28e 100644 --- a/generated/curl.php +++ b/generated/curl.php @@ -3275,4 +3275,3 @@ function curl_unescape(\CurlHandle $handle, string $string): string } return $safeResult; } - diff --git a/generated/datetime.php b/generated/datetime.php index 2ad55a07..25206709 100644 --- a/generated/datetime.php +++ b/generated/datetime.php @@ -1162,4 +1162,3 @@ function timezone_name_from_abbr(string $abbr, int $utcOffset = -1, int $isDST = } return $safeResult; } - diff --git a/generated/dir.php b/generated/dir.php index a1fb53da..9c2c40a8 100644 --- a/generated/dir.php +++ b/generated/dir.php @@ -132,4 +132,3 @@ function scandir(string $directory, int $sorting_order = SCANDIR_SORT_ASCENDING, } return $safeResult; } - diff --git a/generated/eio.php b/generated/eio.php index eeb84afb..c4dd39c6 100644 --- a/generated/eio.php +++ b/generated/eio.php @@ -19,7 +19,7 @@ * @throws EioException * */ -function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_busy($delay, $pri, $callback, $data); @@ -71,7 +71,7 @@ function eio_busy(int $delay, int $pri = EIO_PRI_DEFAULT, callable $callback = N * @throws EioException * */ -function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_chmod($path, $mode, $pri, $callback, $data); @@ -123,7 +123,7 @@ function eio_chmod(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable * @throws EioException * */ -function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_chown($path, $uid, $gid, $pri, $callback, $data); @@ -172,7 +172,7 @@ function eio_chown(string $path, int $uid, int $gid = -1, int $pri = EIO_PRI_DEF * @throws EioException * */ -function eio_close($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_close($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_close($fd, $pri, $callback, $data); @@ -231,7 +231,7 @@ function eio_close($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $ * @throws EioException * */ -function eio_custom(callable $execute, int $pri, callable $callback, $data = NULL) +function eio_custom(callable $execute, int $pri, callable $callback, $data = null) { error_clear_last(); $safeResult = \eio_custom($execute, $pri, $callback, $data); @@ -280,7 +280,7 @@ function eio_custom(callable $execute, int $pri, callable $callback, $data = NUL * @throws EioException * */ -function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_dup2($fd, $fd2, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_dup2($fd, $fd2, $pri, $callback, $data); @@ -352,7 +352,7 @@ function eio_event_loop(): void * @throws EioException * */ -function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_fallocate($fd, $mode, $offset, $length, $pri, $callback, $data); @@ -402,7 +402,7 @@ function eio_fallocate($fd, int $mode, int $offset, int $length, int $pri = EIO_ * @throws EioException * */ -function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_fchmod($fd, $mode, $pri, $callback, $data); @@ -453,7 +453,7 @@ function eio_fchmod($fd, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callba * @throws EioException * */ -function eio_fchown($fd, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_fchown($fd, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_fchown($fd, $uid, $gid, $pri, $callback, $data); @@ -501,7 +501,7 @@ function eio_fchown($fd, int $uid, int $gid = -1, int $pri = EIO_PRI_DEFAULT, ca * @throws EioException * */ -function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_fdatasync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_fdatasync($fd, $pri, $callback, $data); @@ -655,7 +655,7 @@ function eio_fstatvfs($fd, int $pri, callable $callback, $data = null) * @throws EioException * */ -function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_fsync($fd, $pri, $callback, $data); @@ -706,7 +706,7 @@ function eio_fsync($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $ * @throws EioException * */ -function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_ftruncate($fd, $offset, $pri, $callback, $data); @@ -757,7 +757,7 @@ function eio_ftruncate($fd, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callabl * @throws EioException * */ -function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_futime($fd, $atime, $mtime, $pri, $callback, $data); @@ -801,7 +801,7 @@ function eio_futime($fd, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, * @throws EioException * */ -function eio_grp(callable $callback, string $data = NULL) +function eio_grp(callable $callback, string $data = null) { error_clear_last(); $safeResult = \eio_grp($callback, $data); @@ -850,7 +850,7 @@ function eio_grp(callable $callback, string $data = NULL) * @throws EioException * */ -function eio_lstat(string $path, int $pri, callable $callback, $data = NULL) +function eio_lstat(string $path, int $pri, callable $callback, $data = null) { error_clear_last(); $safeResult = \eio_lstat($path, $pri, $callback, $data); @@ -900,7 +900,7 @@ function eio_lstat(string $path, int $pri, callable $callback, $data = NULL) * @throws EioException * */ -function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_mkdir($path, $mode, $pri, $callback, $data); @@ -965,7 +965,7 @@ function eio_mkdir(string $path, int $mode, int $pri = EIO_PRI_DEFAULT, callable * @throws EioException * */ -function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_mknod($path, $mode, $dev, $pri, $callback, $data); @@ -1013,7 +1013,7 @@ function eio_mknod(string $path, int $mode, int $dev, int $pri = EIO_PRI_DEFAULT * @throws EioException * */ -function eio_nop(int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_nop(int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_nop($pri, $callback, $data); @@ -1064,7 +1064,7 @@ function eio_nop(int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = * @throws EioException * */ -function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_readahead($fd, $offset, $length, $pri, $callback, $data); @@ -1368,7 +1368,7 @@ function eio_readahead($fd, int $offset, int $length, int $pri = EIO_PRI_DEFAULT * @throws EioException * */ -function eio_readdir(string $path, int $flags, int $pri, callable $callback, string $data = NULL) +function eio_readdir(string $path, int $flags, int $pri, callable $callback, string $data = null) { error_clear_last(); $safeResult = \eio_readdir($path, $flags, $pri, $callback, $data); @@ -1416,7 +1416,7 @@ function eio_readdir(string $path, int $flags, int $pri, callable $callback, str * @throws EioException * */ -function eio_readlink(string $path, int $pri, callable $callback, string $data = NULL) +function eio_readlink(string $path, int $pri, callable $callback, string $data = null) { error_clear_last(); $safeResult = \eio_readlink($path, $pri, $callback, $data); @@ -1465,7 +1465,7 @@ function eio_readlink(string $path, int $pri, callable $callback, string $data = * @throws EioException * */ -function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_rename($path, $new_path, $pri, $callback, $data); @@ -1513,7 +1513,7 @@ function eio_rename(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, * @throws EioException * */ -function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_rmdir($path, $pri, $callback, $data); @@ -1569,7 +1569,7 @@ function eio_rmdir(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback * @throws EioException * */ -function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_seek($fd, int $offset, int $whence, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_seek($fd, $offset, $whence, $pri, $callback, $data); @@ -1679,7 +1679,7 @@ function eio_sendfile($out_fd, $in_fd, int $offset, int $length, int $pri = null * @throws EioException * */ -function eio_stat(string $path, int $pri, callable $callback, $data = NULL) +function eio_stat(string $path, int $pri, callable $callback, $data = null) { error_clear_last(); $safeResult = \eio_stat($path, $pri, $callback, $data); @@ -1784,7 +1784,7 @@ function eio_statvfs(string $path, int $pri, callable $callback, $data = null) * @throws EioException * */ -function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_symlink($path, $new_path, $pri, $callback, $data); @@ -1843,7 +1843,7 @@ function eio_symlink(string $path, string $new_path, int $pri = EIO_PRI_DEFAULT, * @throws EioException * */ -function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_sync_file_range($fd, $offset, $nbytes, $flags, $pri, $callback, $data); @@ -1864,7 +1864,7 @@ function eio_sync_file_range($fd, int $offset, int $nbytes, int $flags, int $pri * @throws EioException * */ -function eio_sync(int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_sync(int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_sync($pri, $callback, $data); @@ -1912,7 +1912,7 @@ function eio_sync(int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = * @throws EioException * */ -function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_syncfs($fd, $pri, $callback, $data); @@ -1962,7 +1962,7 @@ function eio_syncfs($fd, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, * @throws EioException * */ -function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_truncate($path, $offset, $pri, $callback, $data); @@ -2010,7 +2010,7 @@ function eio_truncate(string $path, int $offset = 0, int $pri = EIO_PRI_DEFAULT, * @throws EioException * */ -function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_unlink($path, $pri, $callback, $data); @@ -2060,7 +2060,7 @@ function eio_unlink(string $path, int $pri = EIO_PRI_DEFAULT, callable $callback * @throws EioException * */ -function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_utime($path, $atime, $mtime, $pri, $callback, $data); @@ -2113,7 +2113,7 @@ function eio_utime(string $path, float $atime, float $mtime, int $pri = EIO_PRI_ * @throws EioException * */ -function eio_write($fd, string $str, int $length = 0, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = NULL, $data = NULL) +function eio_write($fd, string $str, int $length = 0, int $offset = 0, int $pri = EIO_PRI_DEFAULT, callable $callback = null, $data = null) { error_clear_last(); $safeResult = \eio_write($fd, $str, $length, $offset, $pri, $callback, $data); @@ -2122,4 +2122,3 @@ function eio_write($fd, string $str, int $length = 0, int $offset = 0, int $pri } return $safeResult; } - diff --git a/generated/errorfunc.php b/generated/errorfunc.php index 97365ccc..b693deca 100644 --- a/generated/errorfunc.php +++ b/generated/errorfunc.php @@ -80,4 +80,3 @@ function error_log(string $message, int $message_type = 0, string $destination = throw ErrorfuncException::createFromPhpError(); } } - diff --git a/generated/exec.php b/generated/exec.php index bc3a5af6..c6984a2d 100644 --- a/generated/exec.php +++ b/generated/exec.php @@ -152,4 +152,3 @@ function system(string $command, ?int &$result_code = null): string } return $safeResult; } - diff --git a/generated/fileinfo.php b/generated/fileinfo.php index 2532395c..dda07206 100644 --- a/generated/fileinfo.php +++ b/generated/fileinfo.php @@ -77,4 +77,3 @@ function mime_content_type($filename): string } return $safeResult; } - diff --git a/generated/filesystem.php b/generated/filesystem.php index a923d615..de1a704d 100644 --- a/generated/filesystem.php +++ b/generated/filesystem.php @@ -1649,4 +1649,3 @@ function unlink(string $filename, $context = null): void throw FilesystemException::createFromPhpError(); } } - diff --git a/generated/filter.php b/generated/filter.php index 647ef513..0508f8e7 100644 --- a/generated/filter.php +++ b/generated/filter.php @@ -79,4 +79,3 @@ function filter_var_array(array $array, $options = FILTER_DEFAULT, bool $add_emp } return $safeResult; } - diff --git a/generated/fpm.php b/generated/fpm.php index d0522306..7a9a98de 100644 --- a/generated/fpm.php +++ b/generated/fpm.php @@ -20,4 +20,3 @@ function fastcgi_finish_request(): void throw FpmException::createFromPhpError(); } } - diff --git a/generated/ftp.php b/generated/ftp.php index ca877207..0de5fcc4 100644 --- a/generated/ftp.php +++ b/generated/ftp.php @@ -545,4 +545,3 @@ function ftp_systype($ftp): string } return $safeResult; } - diff --git a/generated/funchand.php b/generated/funchand.php index 83744fdf..18750f1c 100644 --- a/generated/funchand.php +++ b/generated/funchand.php @@ -35,7 +35,7 @@ function create_function(string $args, string $code): string * @throws FunchandException * */ -function register_tick_function(callable $callback, ...$args): void +function register_tick_function(callable $callback, ...$args): void { error_clear_last(); if ($args !== []) { @@ -47,4 +47,3 @@ function register_tick_function(callable $callback, ...$args): void throw FunchandException::createFromPhpError(); } } - diff --git a/generated/gettext.php b/generated/gettext.php index 2a0095b7..5abd6cb6 100644 --- a/generated/gettext.php +++ b/generated/gettext.php @@ -25,4 +25,3 @@ function bindtextdomain(string $domain, string $directory): string } return $safeResult; } - diff --git a/generated/gmp.php b/generated/gmp.php index 4803c9d8..ed6ac20c 100644 --- a/generated/gmp.php +++ b/generated/gmp.php @@ -23,4 +23,3 @@ function gmp_random_seed($seed): void throw GmpException::createFromPhpError(); } } - diff --git a/generated/gnupg.php b/generated/gnupg.php index 0e33fe25..51055b8d 100644 --- a/generated/gnupg.php +++ b/generated/gnupg.php @@ -186,4 +186,3 @@ function gnupg_setsignmode($identifier, int $signmode): void throw GnupgException::createFromPhpError(); } } - diff --git a/generated/hash.php b/generated/hash.php index 8a3d544f..239cde00 100644 --- a/generated/hash.php +++ b/generated/hash.php @@ -63,4 +63,3 @@ function hash_update_file(\HashContext $context, string $filename, ?\HashContext throw HashException::createFromPhpError(); } } - diff --git a/generated/ibase.php b/generated/ibase.php index 113d9cc8..18c7206c 100644 --- a/generated/ibase.php +++ b/generated/ibase.php @@ -659,4 +659,3 @@ function ibase_service_detach($service_handle): void throw IbaseException::createFromPhpError(); } } - diff --git a/generated/ibmDb2.php b/generated/ibmDb2.php index 02154d6c..e84347b0 100644 --- a/generated/ibmDb2.php +++ b/generated/ibmDb2.php @@ -1219,4 +1219,3 @@ function db2_set_option($resource, array $options, int $type): void throw IbmDb2Exception::createFromPhpError(); } } - diff --git a/generated/iconv.php b/generated/iconv.php index f89c67c3..99da4c0e 100644 --- a/generated/iconv.php +++ b/generated/iconv.php @@ -93,4 +93,3 @@ function iconv(string $from_encoding, string $to_encoding, string $string): stri } return $safeResult; } - diff --git a/generated/image.php b/generated/image.php index 9c032f62..c9d4cb92 100644 --- a/generated/image.php +++ b/generated/image.php @@ -2973,4 +2973,3 @@ function png2wbmp(string $pngname, string $wbmpname, int $dest_height, int $dest throw ImageException::createFromPhpError(); } } - diff --git a/generated/imap.php b/generated/imap.php index 6cc70047..a654470d 100644 --- a/generated/imap.php +++ b/generated/imap.php @@ -2287,4 +2287,3 @@ function imap_utf8_to_mutf7(string $string): string } return $safeResult; } - diff --git a/generated/info.php b/generated/info.php index 4a556f6e..2d39b920 100644 --- a/generated/info.php +++ b/generated/info.php @@ -688,4 +688,3 @@ function set_time_limit(int $seconds): void throw InfoException::createFromPhpError(); } } - diff --git a/generated/inotify.php b/generated/inotify.php index 1a4f93ff..e5e632b1 100644 --- a/generated/inotify.php +++ b/generated/inotify.php @@ -42,4 +42,3 @@ function inotify_rm_watch($inotify_instance, int $watch_descriptor): void throw InotifyException::createFromPhpError(); } } - diff --git a/generated/json.php b/generated/json.php index ae58e2b7..875d8524 100644 --- a/generated/json.php +++ b/generated/json.php @@ -56,4 +56,3 @@ function json_encode($value, int $flags = 0, int $depth = 512): string } return $safeResult; } - diff --git a/generated/ldap.php b/generated/ldap.php index 15d673a3..5a322a87 100644 --- a/generated/ldap.php +++ b/generated/ldap.php @@ -1244,4 +1244,3 @@ function ldap_unbind($ldap): void throw LdapException::createFromPhpError(); } } - diff --git a/generated/libxml.php b/generated/libxml.php index c877bd1b..20d32408 100644 --- a/generated/libxml.php +++ b/generated/libxml.php @@ -76,4 +76,3 @@ function libxml_set_external_entity_loader(callable $resolver_function): void throw LibxmlException::createFromPhpError(); } } - diff --git a/generated/lzf.php b/generated/lzf.php index 77972779..7ea98c4d 100644 --- a/generated/lzf.php +++ b/generated/lzf.php @@ -42,4 +42,3 @@ function lzf_decompress(string $data): string } return $safeResult; } - diff --git a/generated/mailparse.php b/generated/mailparse.php index 4bdf4acd..b6fc0070 100644 --- a/generated/mailparse.php +++ b/generated/mailparse.php @@ -125,4 +125,3 @@ function mailparse_stream_encode($sourcefp, $destfp, string $encoding): void throw MailparseException::createFromPhpError(); } } - diff --git a/generated/mbstring.php b/generated/mbstring.php index aabca617..21203436 100644 --- a/generated/mbstring.php +++ b/generated/mbstring.php @@ -602,4 +602,3 @@ function mb_split(string $pattern, string $string, int $limit = -1): array } return $safeResult; } - diff --git a/generated/misc.php b/generated/misc.php index 37b1c253..b608509d 100644 --- a/generated/misc.php +++ b/generated/misc.php @@ -270,7 +270,7 @@ function hrtime(bool $as_number = false) * @throws MiscException * */ -function pack(string $format, ...$values): string +function pack(string $format, ...$values): string { error_clear_last(); if ($values !== []) { @@ -542,4 +542,3 @@ function unpack(string $format, string $string, int $offset = 0): array } return $safeResult; } - diff --git a/generated/mysql.php b/generated/mysql.php index e7bde90d..2f882444 100644 --- a/generated/mysql.php +++ b/generated/mysql.php @@ -26,7 +26,7 @@ * @throws MysqlException * */ -function mysql_close($link_identifier = NULL): void +function mysql_close($link_identifier = null): void { error_clear_last(); $safeResult = \mysql_close($link_identifier); @@ -111,7 +111,7 @@ function mysql_connect(string $server = null, string $username = null, string $p * @throws MysqlException * */ -function mysql_create_db(string $database_name, $link_identifier = NULL): void +function mysql_create_db(string $database_name, $link_identifier = null): void { error_clear_last(); $safeResult = \mysql_create_db($database_name, $link_identifier); @@ -165,7 +165,7 @@ function mysql_data_seek($result, int $row_number): void * @throws MysqlException * */ -function mysql_db_name($result, int $row, $field = NULL): string +function mysql_db_name($result, int $row, $field = null): string { error_clear_last(); $safeResult = \mysql_db_name($result, $row, $field); @@ -196,7 +196,7 @@ function mysql_db_name($result, int $row, $field = NULL): string * @throws MysqlException * */ -function mysql_db_query(string $database, string $query, $link_identifier = NULL) +function mysql_db_query(string $database, string $query, $link_identifier = null) { error_clear_last(); $safeResult = \mysql_db_query($database, $query, $link_identifier); @@ -224,7 +224,7 @@ function mysql_db_query(string $database, string $query, $link_identifier = NULL * @throws MysqlException * */ -function mysql_drop_db(string $database_name, $link_identifier = NULL): void +function mysql_drop_db(string $database_name, $link_identifier = null): void { error_clear_last(); $safeResult = \mysql_drop_db($database_name, $link_identifier); @@ -418,7 +418,7 @@ function mysql_free_result($result): void * @throws MysqlException * */ -function mysql_get_host_info($link_identifier = NULL): string +function mysql_get_host_info($link_identifier = null): string { error_clear_last(); $safeResult = \mysql_get_host_info($link_identifier); @@ -442,7 +442,7 @@ function mysql_get_host_info($link_identifier = NULL): string * @throws MysqlException * */ -function mysql_get_proto_info($link_identifier = NULL): int +function mysql_get_proto_info($link_identifier = null): int { error_clear_last(); $safeResult = \mysql_get_proto_info($link_identifier); @@ -466,7 +466,7 @@ function mysql_get_proto_info($link_identifier = NULL): int * @throws MysqlException * */ -function mysql_get_server_info($link_identifier = NULL): string +function mysql_get_server_info($link_identifier = null): string { error_clear_last(); $safeResult = \mysql_get_server_info($link_identifier); @@ -492,7 +492,7 @@ function mysql_get_server_info($link_identifier = NULL): string * @throws MysqlException * */ -function mysql_info($link_identifier = NULL): string +function mysql_info($link_identifier = null): string { error_clear_last(); $safeResult = \mysql_info($link_identifier); @@ -519,7 +519,7 @@ function mysql_info($link_identifier = NULL): string * @throws MysqlException * */ -function mysql_list_dbs($link_identifier = NULL) +function mysql_list_dbs($link_identifier = null) { error_clear_last(); $safeResult = \mysql_list_dbs($link_identifier); @@ -554,7 +554,7 @@ function mysql_list_dbs($link_identifier = NULL) * @throws MysqlException * */ -function mysql_list_fields(string $database_name, string $table_name, $link_identifier = NULL) +function mysql_list_fields(string $database_name, string $table_name, $link_identifier = null) { error_clear_last(); $safeResult = \mysql_list_fields($database_name, $table_name, $link_identifier); @@ -578,7 +578,7 @@ function mysql_list_fields(string $database_name, string $table_name, $link_iden * @throws MysqlException * */ -function mysql_list_processes($link_identifier = NULL) +function mysql_list_processes($link_identifier = null) { error_clear_last(); $safeResult = \mysql_list_processes($link_identifier); @@ -611,7 +611,7 @@ function mysql_list_processes($link_identifier = NULL) * @throws MysqlException * */ -function mysql_list_tables(string $database, $link_identifier = NULL) +function mysql_list_tables(string $database, $link_identifier = null) { error_clear_last(); $safeResult = \mysql_list_tables($database, $link_identifier); @@ -707,7 +707,7 @@ function mysql_num_rows($result): int * @throws MysqlException * */ -function mysql_query(string $query, $link_identifier = NULL) +function mysql_query(string $query, $link_identifier = null) { error_clear_last(); $safeResult = \mysql_query($query, $link_identifier); @@ -744,7 +744,7 @@ function mysql_query(string $query, $link_identifier = NULL) * @throws MysqlException * */ -function mysql_real_escape_string(string $unescaped_string, $link_identifier = NULL): string +function mysql_real_escape_string(string $unescaped_string, $link_identifier = null): string { error_clear_last(); $safeResult = \mysql_real_escape_string($unescaped_string, $link_identifier); @@ -807,7 +807,7 @@ function mysql_result($result, int $row, $field = 0): string * @throws MysqlException * */ -function mysql_select_db(string $database_name, $link_identifier = NULL): void +function mysql_select_db(string $database_name, $link_identifier = null): void { error_clear_last(); $safeResult = \mysql_select_db($database_name, $link_identifier); @@ -830,7 +830,7 @@ function mysql_select_db(string $database_name, $link_identifier = NULL): void * @throws MysqlException * */ -function mysql_set_charset(string $charset, $link_identifier = NULL): void +function mysql_set_charset(string $charset, $link_identifier = null): void { error_clear_last(); $safeResult = \mysql_set_charset($charset, $link_identifier); @@ -884,7 +884,7 @@ function mysql_tablename($result, int $i): string * @throws MysqlException * */ -function mysql_thread_id($link_identifier = NULL): int +function mysql_thread_id($link_identifier = null): int { error_clear_last(); $safeResult = \mysql_thread_id($link_identifier); @@ -927,7 +927,7 @@ function mysql_thread_id($link_identifier = NULL): int * @throws MysqlException * */ -function mysql_unbuffered_query(string $query, $link_identifier = NULL) +function mysql_unbuffered_query(string $query, $link_identifier = null) { error_clear_last(); $safeResult = \mysql_unbuffered_query($query, $link_identifier); @@ -936,4 +936,3 @@ function mysql_unbuffered_query(string $query, $link_identifier = NULL) } return $safeResult; } - diff --git a/generated/network.php b/generated/network.php index ecc77106..9b4e5965 100644 --- a/generated/network.php +++ b/generated/network.php @@ -818,4 +818,3 @@ function syslog(int $priority, string $message): void throw NetworkException::createFromPhpError(); } } - diff --git a/generated/oci8.php b/generated/oci8.php index 3d733bab..4dd35015 100644 --- a/generated/oci8.php +++ b/generated/oci8.php @@ -1653,4 +1653,3 @@ function oci_unregister_taf_callback($connection): void throw Oci8Exception::createFromPhpError(); } } - diff --git a/generated/opcache.php b/generated/opcache.php index ed8ccdd8..88d1c435 100644 --- a/generated/opcache.php +++ b/generated/opcache.php @@ -41,4 +41,3 @@ function opcache_get_status(bool $include_scripts = true): array } return $safeResult; } - diff --git a/generated/openssl.php b/generated/openssl.php index 95450126..ec2fbd2d 100644 --- a/generated/openssl.php +++ b/generated/openssl.php @@ -1434,4 +1434,3 @@ function openssl_x509_read($certificate) } return $safeResult; } - diff --git a/generated/outcontrol.php b/generated/outcontrol.php index 3255edd0..afea0f9c 100644 --- a/generated/outcontrol.php +++ b/generated/outcontrol.php @@ -249,4 +249,3 @@ function output_reset_rewrite_vars(): void throw OutcontrolException::createFromPhpError(); } } - diff --git a/generated/pcntl.php b/generated/pcntl.php index ba47d5e2..ee593f80 100644 --- a/generated/pcntl.php +++ b/generated/pcntl.php @@ -253,4 +253,3 @@ function pcntl_sigwaitinfo(array $signals, ?array &$info = []): int } return $safeResult; } - diff --git a/generated/pcre.php b/generated/pcre.php index cae4fa08..b62f0777 100644 --- a/generated/pcre.php +++ b/generated/pcre.php @@ -683,4 +683,3 @@ function preg_split(string $pattern, string $subject, ?int $limit = -1, int $fla } return $safeResult; } - diff --git a/generated/pgsql.php b/generated/pgsql.php index 7c5957d5..9968a5ae 100644 --- a/generated/pgsql.php +++ b/generated/pgsql.php @@ -1358,4 +1358,3 @@ function pg_update($connection, string $table_name, array $values, array $condit } return $safeResult; } - diff --git a/generated/posix.php b/generated/posix.php index 9866bc51..ea50d848 100644 --- a/generated/posix.php +++ b/generated/posix.php @@ -731,4 +731,3 @@ function posix_uname(): array } return $safeResult; } - diff --git a/generated/ps.php b/generated/ps.php index 2cc4fe6a..6ead054b 100644 --- a/generated/ps.php +++ b/generated/ps.php @@ -1810,4 +1810,3 @@ function ps_translate($psdoc, float $x, float $y): void throw PsException::createFromPhpError(); } } - diff --git a/generated/pspell.php b/generated/pspell.php index 294c5432..7ef3d259 100644 --- a/generated/pspell.php +++ b/generated/pspell.php @@ -499,4 +499,3 @@ function pspell_store_replacement(int $dictionary, string $misspelled, string $c throw PspellException::createFromPhpError(); } } - diff --git a/generated/readline.php b/generated/readline.php index 2613c3ee..d8b82181 100644 --- a/generated/readline.php +++ b/generated/readline.php @@ -123,4 +123,3 @@ function readline_write_history(string $filename = null): void throw ReadlineException::createFromPhpError(); } } - diff --git a/generated/rpminfo.php b/generated/rpminfo.php index 1a6ba986..2cd42fa6 100644 --- a/generated/rpminfo.php +++ b/generated/rpminfo.php @@ -19,4 +19,3 @@ function rpmaddtag(int $tag): void throw RpminfoException::createFromPhpError(); } } - diff --git a/generated/rrd.php b/generated/rrd.php index 3c44ced6..c119df9b 100644 --- a/generated/rrd.php +++ b/generated/rrd.php @@ -188,4 +188,3 @@ function rrd_xport(array $options): array } return $safeResult; } - diff --git a/generated/sem.php b/generated/sem.php index 9e6f60f9..86d0ae81 100644 --- a/generated/sem.php +++ b/generated/sem.php @@ -543,4 +543,3 @@ function shm_remove($shm): void throw SemException::createFromPhpError(); } } - diff --git a/generated/session.php b/generated/session.php index 5f514089..35e7f843 100644 --- a/generated/session.php +++ b/generated/session.php @@ -370,4 +370,3 @@ function session_write_close(): void throw SessionException::createFromPhpError(); } } - diff --git a/generated/shmop.php b/generated/shmop.php index ae7c992c..21bcd175 100644 --- a/generated/shmop.php +++ b/generated/shmop.php @@ -43,4 +43,3 @@ function shmop_read($shmop, int $offset, int $size): string } return $safeResult; } - diff --git a/generated/sockets.php b/generated/sockets.php index 3b8ad335..77d170f6 100644 --- a/generated/sockets.php +++ b/generated/sockets.php @@ -851,4 +851,3 @@ function socket_wsaprotocol_info_release(string $info_id): void throw SocketsException::createFromPhpError(); } } - diff --git a/generated/sodium.php b/generated/sodium.php index 3c515140..08cf8873 100644 --- a/generated/sodium.php +++ b/generated/sodium.php @@ -324,4 +324,3 @@ function sodium_crypto_sign_verify_detached(string $signature, string $message, throw SodiumException::createFromPhpError(); } } - diff --git a/generated/solr.php b/generated/solr.php index 6b036ee8..0c4260a0 100644 --- a/generated/solr.php +++ b/generated/solr.php @@ -20,4 +20,3 @@ function solr_get_version(): string } return $safeResult; } - diff --git a/generated/spl.php b/generated/spl.php index 8883e62d..2d692220 100644 --- a/generated/spl.php +++ b/generated/spl.php @@ -134,4 +134,3 @@ function spl_autoload_unregister($callback): void throw SplException::createFromPhpError(); } } - diff --git a/generated/sqlsrv.php b/generated/sqlsrv.php index ef2a27f6..33dd9124 100644 --- a/generated/sqlsrv.php +++ b/generated/sqlsrv.php @@ -427,4 +427,3 @@ function sqlsrv_rollback($conn): void throw SqlsrvException::createFromPhpError(); } } - diff --git a/generated/ssdeep.php b/generated/ssdeep.php index 59e17c13..240b83b3 100644 --- a/generated/ssdeep.php +++ b/generated/ssdeep.php @@ -68,4 +68,3 @@ function ssdeep_fuzzy_hash(string $to_hash): string } return $safeResult; } - diff --git a/generated/ssh2.php b/generated/ssh2.php index 10801c9d..edee699c 100644 --- a/generated/ssh2.php +++ b/generated/ssh2.php @@ -747,4 +747,3 @@ function ssh2_shell($session, string $term_type = "vanilla", array $env = null, } return $safeResult; } - diff --git a/generated/stream.php b/generated/stream.php index 52800c3f..e1337210 100644 --- a/generated/stream.php +++ b/generated/stream.php @@ -762,4 +762,3 @@ function stream_wrapper_unregister(string $protocol): void throw StreamException::createFromPhpError(); } } - diff --git a/generated/strings.php b/generated/strings.php index 69d79ec9..9d2db754 100644 --- a/generated/strings.php +++ b/generated/strings.php @@ -86,4 +86,3 @@ function sha1_file(string $filename, bool $binary = false): string } return $safeResult; } - diff --git a/generated/swoole.php b/generated/swoole.php index 819ba50f..510e6377 100644 --- a/generated/swoole.php +++ b/generated/swoole.php @@ -146,4 +146,3 @@ function swoole_event_write(int $fd, string $data): void throw SwooleException::createFromPhpError(); } } - diff --git a/generated/uodbc.php b/generated/uodbc.php index 8c186720..df6a9afa 100644 --- a/generated/uodbc.php +++ b/generated/uodbc.php @@ -1200,4 +1200,3 @@ function odbc_tables($odbc, string $catalog = null, string $schema = null, strin } return $safeResult; } - diff --git a/generated/uopz.php b/generated/uopz.php index 55747d74..17d2e760 100644 --- a/generated/uopz.php +++ b/generated/uopz.php @@ -38,4 +38,3 @@ function uopz_implement(string $class, string $interface): void throw UopzException::createFromPhpError(); } } - diff --git a/generated/url.php b/generated/url.php index 18589aec..96c37b95 100644 --- a/generated/url.php +++ b/generated/url.php @@ -202,4 +202,3 @@ function parse_url(string $url, int $component = -1) } return $safeResult; } - diff --git a/generated/var.php b/generated/var.php index 3488603e..70f048df 100644 --- a/generated/var.php +++ b/generated/var.php @@ -58,4 +58,3 @@ function settype(&$var, string $type): void throw VarException::createFromPhpError(); } } - diff --git a/generated/xdiff.php b/generated/xdiff.php index 73fae3dc..785b2278 100644 --- a/generated/xdiff.php +++ b/generated/xdiff.php @@ -234,4 +234,3 @@ function xdiff_string_patch(string $str, string $patch, int $flags = null, ?stri } return $safeResult; } - diff --git a/generated/xml.php b/generated/xml.php index c6f71341..26f3f01d 100644 --- a/generated/xml.php +++ b/generated/xml.php @@ -714,4 +714,3 @@ function xml_set_unparsed_entity_decl_handler($parser, callable $handler): void throw XmlException::createFromPhpError(); } } - diff --git a/generated/xmlrpc.php b/generated/xmlrpc.php index 38ac3766..3a1f5362 100644 --- a/generated/xmlrpc.php +++ b/generated/xmlrpc.php @@ -20,4 +20,3 @@ function xmlrpc_set_type(&$value, string $type): void throw XmlrpcException::createFromPhpError(); } } - diff --git a/generated/yaml.php b/generated/yaml.php index f70c61ac..ba518e9e 100644 --- a/generated/yaml.php +++ b/generated/yaml.php @@ -107,4 +107,3 @@ function yaml_parse(string $input, int $pos = 0, ?int &$ndocs = null, array $cal } return $safeResult; } - diff --git a/generated/yaz.php b/generated/yaz.php index d258d485..4730dd0b 100644 --- a/generated/yaz.php +++ b/generated/yaz.php @@ -436,4 +436,3 @@ function yaz_wait(array &$options = null) } return $safeResult; } - diff --git a/generated/zip.php b/generated/zip.php index 7ce2263b..d1a628eb 100644 --- a/generated/zip.php +++ b/generated/zip.php @@ -142,4 +142,3 @@ function zip_entry_read($zip_entry, int $len = 1024): string } return $safeResult; } - diff --git a/generated/zlib.php b/generated/zlib.php index 07d00b37..daa555ab 100644 --- a/generated/zlib.php +++ b/generated/zlib.php @@ -719,4 +719,3 @@ function zlib_decode(string $data, int $max_length = 0): string } return $safeResult; } -