Skip to content

Commit

Permalink
Automatically regenerate the files
Browse files Browse the repository at this point in the history
  • Loading branch information
Kharhamel authored Nov 9, 2024
1 parent 3a6e43b commit 6cf0e6c
Show file tree
Hide file tree
Showing 81 changed files with 1,724 additions and 5,706 deletions.
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
1 change: 1 addition & 0 deletions generated/apache.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,4 @@ function virtual(string $uri): void
throw ApacheException::createFromPhpError();
}
}

1 change: 1 addition & 0 deletions generated/apcu.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,4 @@ function apcu_sma_info(bool $limited = false): array
}
return $safeResult;
}

52 changes: 13 additions & 39 deletions generated/array.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,55 +5,29 @@
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.
* @return mixed
* @throws ArrayException
*
*/
function shuffle(array &$array): void
function array_all(array $array, callable $callback)
{
error_clear_last();
$safeResult = \shuffle($array);
$safeResult = \array_all($array, $callback);
if ($safeResult === false) {
throw ArrayException::createFromPhpError();
}
return $safeResult;
}

1 change: 1 addition & 0 deletions generated/bzip2.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,4 @@ function bzwrite($bz, string $data, int $length = null): int
}
return $safeResult;
}

1 change: 1 addition & 0 deletions generated/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ function unixtojd(int $timestamp = null): int
}
return $safeResult;
}

4 changes: 3 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 All @@ -23,3 +24,4 @@ function class_alias(string $class, string $alias, bool $autoload = true): void
throw ClassobjException::createFromPhpError();
}
}

1 change: 1 addition & 0 deletions generated/com.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,4 @@ function variant_round($value, int $decimals)
}
return $safeResult;
}

1 change: 1 addition & 0 deletions generated/cubrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -2036,3 +2036,4 @@ function cubrid_set_query_timeout($req_identifier, int $timeout): void
throw CubridException::createFromPhpError();
}
}

Loading

0 comments on commit 6cf0e6c

Please sign in to comment.