Skip to content

Commit

Permalink
Regenerate files based on latest code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shish committed Dec 2, 2024
1 parent 822cdae commit 9b21246
Show file tree
Hide file tree
Showing 65 changed files with 1,830 additions and 6,571 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"generated/ftp.php",
"generated/funchand.php",
"generated/gettext.php",
"generated/gmp.php",
"generated/gnupg.php",
"generated/hash.php",
"generated/ibase.php",
Expand Down Expand Up @@ -73,6 +72,7 @@
"generated/ps.php",
"generated/pspell.php",
"generated/readline.php",
"generated/rnp.php",
"generated/rpminfo.php",
"generated/rrd.php",
"generated/sem.php",
Expand Down Expand Up @@ -116,4 +116,4 @@
"cs-fix": "phpcbf",
"cs-check": "phpcs"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Safe\Exceptions;

class GmpException extends \ErrorException implements SafeExceptionInterface
class RnpException extends \ErrorException implements SafeExceptionInterface
{
public static function createFromPhpError(): self
{
Expand Down
60 changes: 0 additions & 60 deletions generated/apache.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,44 +91,6 @@ function apache_lookup_uri(string $filename): object
}


/**
* Fetches all HTTP request headers from the current request. Works in the
* Apache, FastCGI, CLI, and FPM webservers.
*
* @return array An associative array of all the HTTP headers in the current request.
* @throws ApacheException
*
*/
function apache_request_headers(): array
{
error_clear_last();
$safeResult = \apache_request_headers();
if ($safeResult === false) {
throw ApacheException::createFromPhpError();
}
return $safeResult;
}


/**
* Fetch all HTTP response headers. Works in the
* Apache, FastCGI, CLI, and FPM webservers.
*
* @return array An array of all Apache response headers on success.
* @throws ApacheException
*
*/
function apache_response_headers(): array
{
error_clear_last();
$safeResult = \apache_response_headers();
if ($safeResult === false) {
throw ApacheException::createFromPhpError();
}
return $safeResult;
}


/**
* apache_setenv sets the value of the Apache
* environment variable specified by
Expand All @@ -150,28 +112,6 @@ function apache_setenv(string $variable, string $value, bool $walk_to_top = fals
}


/**
* Fetches all HTTP headers from the current request.
*
* This function is an alias for apache_request_headers.
* Please read the apache_request_headers
* documentation for more information on how this function works.
*
* @return array An associative array of all the HTTP headers in the current request.
* @throws ApacheException
*
*/
function getallheaders(): array
{
error_clear_last();
$safeResult = \getallheaders();
if ($safeResult === false) {
throw ApacheException::createFromPhpError();
}
return $safeResult;
}


/**
* virtual is an Apache-specific function which
* is similar to &lt;!--#include virtual...--&gt; in
Expand Down
49 changes: 10 additions & 39 deletions generated/array.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,54 +5,25 @@
use Safe\Exceptions\ArrayException;

/**
* Applies the user-defined callback function to each
* element of the array. This function will recurse
* into deeper arrays.
*
* @param array|object $array The input array.
* @param callable $callback Typically, callback takes on two parameters.
* The array parameter's value being the first, and
* the key/index second.
*
* If callback needs to be working with the
* actual values of the array, specify the first parameter of
* callback as a
* reference. Then,
* any changes made to those elements will be made in the
* original array itself.
* @param mixed $arg If the optional arg parameter is supplied,
* it will be passed as the third parameter to the
* callback.
* @throws ArrayException
* @param array $array
* @param callable $callback The callback function to call to check each element, which must be
*
*/
function array_walk_recursive(&$array, callable $callback, $arg = null): void
{
error_clear_last();
if ($arg !== null) {
$safeResult = \array_walk_recursive($array, $callback, $arg);
} else {
$safeResult = \array_walk_recursive($array, $callback);
}
if ($safeResult === false) {
throw ArrayException::createFromPhpError();
}
}


/**
* This function shuffles (randomizes the order of the elements in) an array.
* It uses a pseudo random number generator that is not suitable for
* cryptographic purposes.
* boolcallback
* mixedvalue
* mixedkey
*
* @param array $array The array.
* If this function returns FALSE, FALSE is returned from
* array_all and the callback will not be called for
* further elements.
* @throws ArrayException
*
*/
function shuffle(array &$array): void
function array_all(array $array, callable $callback): void
{
error_clear_last();
$safeResult = \shuffle($array);
$safeResult = \array_all($array, $callback);
if ($safeResult === false) {
throw ArrayException::createFromPhpError();
}
Expand Down
2 changes: 1 addition & 1 deletion generated/bzip2.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function bzread($bz, int $length = 1024): string
* @throws Bzip2Exception
*
*/
function bzwrite($bz, string $data, int $length = null): int
function bzwrite($bz, string $data, ?int $length = null): int
{
error_clear_last();
if ($length !== null) {
Expand Down
2 changes: 1 addition & 1 deletion generated/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @throws CalendarException
*
*/
function unixtojd(int $timestamp = null): int
function unixtojd(?int $timestamp = null): int
{
error_clear_last();
if ($timestamp !== null) {
Expand Down
3 changes: 2 additions & 1 deletion generated/classobj.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
*
* @param string $class The original class.
* @param string $alias The alias name for the class.
* @param bool $autoload Whether to autoload if the original class is not found.
* @param bool $autoload Whether to autoload
* if the original class is not found.
* @throws ClassobjException
*
*/
Expand Down
2 changes: 1 addition & 1 deletion generated/com.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function com_load_typelib(string $typelib, bool $case_insensitive = true): void
* @throws ComException
*
*/
function com_print_typeinfo(object $variant, string $dispatch_interface = null, bool $display_sink = false): void
function com_print_typeinfo(object $variant, ?string $dispatch_interface = null, bool $display_sink = false): void
{
error_clear_last();
if ($display_sink !== false) {
Expand Down
16 changes: 8 additions & 8 deletions generated/cubrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
* @throws CubridException
*
*/
function cubrid_bind($req_identifier, int $bind_index, $bind_value, string $bind_value_type = null): void
function cubrid_bind($req_identifier, int $bind_index, $bind_value, ?string $bind_value_type = null): void
{
error_clear_last();
if ($bind_value_type !== null) {
Expand Down Expand Up @@ -303,7 +303,7 @@ function cubrid_commit($conn_identifier): void
* @throws CubridException
*
*/
function cubrid_connect_with_url(string $conn_url, string $userid = null, string $passwd = null, bool $new_link = false)
function cubrid_connect_with_url(string $conn_url, ?string $userid = null, ?string $passwd = null, bool $new_link = false)
{
error_clear_last();
if ($new_link !== false) {
Expand Down Expand Up @@ -347,7 +347,7 @@ function cubrid_connect_with_url(string $conn_url, string $userid = null, string
* @throws CubridException
*
*/
function cubrid_connect(string $host, int $port, string $dbname, string $userid = null, string $passwd = null, bool $new_link = false)
function cubrid_connect(string $host, int $port, string $dbname, ?string $userid = null, ?string $passwd = null, bool $new_link = false)
{
error_clear_last();
if ($new_link !== false) {
Expand Down Expand Up @@ -822,7 +822,7 @@ function cubrid_lob_size($lob_identifier): string
* @throws CubridException
*
*/
function cubrid_lob2_bind($req_identifier, int $bind_index, $bind_value, string $bind_value_type = null): void
function cubrid_lob2_bind($req_identifier, int $bind_index, $bind_value, ?string $bind_value_type = null): void
{
error_clear_last();
if ($bind_value_type !== null) {
Expand Down Expand Up @@ -1300,7 +1300,7 @@ function cubrid_next_result($result): void
* @throws CubridException
*
*/
function cubrid_pconnect_with_url(string $conn_url, string $userid = null, string $passwd = null)
function cubrid_pconnect_with_url(string $conn_url, ?string $userid = null, ?string $passwd = null)
{
error_clear_last();
if ($passwd !== null) {
Expand Down Expand Up @@ -1345,7 +1345,7 @@ function cubrid_pconnect_with_url(string $conn_url, string $userid = null, strin
* @throws CubridException
*
*/
function cubrid_pconnect(string $host, int $port, string $dbname, string $userid = null, string $passwd = null)
function cubrid_pconnect(string $host, int $port, string $dbname, ?string $userid = null, ?string $passwd = null)
{
error_clear_last();
if ($passwd !== null) {
Expand Down Expand Up @@ -1409,7 +1409,7 @@ function cubrid_prepare($conn_identifier, string $prepare_stmt, int $option = 0)
* @throws CubridException
*
*/
function cubrid_put($conn_identifier, string $oid, string $attr = null, $value = null): void
function cubrid_put($conn_identifier, string $oid, ?string $attr = null, $value = null): void
{
error_clear_last();
if ($value !== null) {
Expand Down Expand Up @@ -1837,7 +1837,7 @@ function cubrid_rollback($conn_identifier): void
* @throws CubridException
*
*/
function cubrid_schema($conn_identifier, int $schema_type, string $class_name = null, string $attr_name = null): array
function cubrid_schema($conn_identifier, int $schema_type, ?string $class_name = null, ?string $attr_name = null): array
{
error_clear_last();
if ($attr_name !== null) {
Expand Down
Loading

0 comments on commit 9b21246

Please sign in to comment.