Skip to content

Commit

Permalink
Automatically regenerate the files
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodingmachine authored Mar 24, 2021
1 parent 4cc05ad commit 5da53ec
Show file tree
Hide file tree
Showing 85 changed files with 1,547 additions and 1,141 deletions.
11 changes: 11 additions & 0 deletions generated/Exceptions/GettextException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php
namespace Safe\Exceptions;

class GettextException extends \ErrorException implements SafeExceptionInterface
{
public static function createFromPhpError(): self
{
$error = error_get_last();
return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
}
}
23 changes: 1 addition & 22 deletions generated/apache.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,28 +110,6 @@ function apache_request_headers(): array
}


/**
* apache_reset_timeout resets the Apache write timer,
* which defaults to 300 seconds. With set_time_limit(0);
* ignore_user_abort(true) and periodic
* apache_reset_timeout calls, Apache can theoretically
* run forever.
*
* This function requires Apache 1.
*
* @throws ApacheException
*
*/
function apache_reset_timeout(): void
{
error_clear_last();
$result = \apache_reset_timeout();
if ($result === false) {
throw ApacheException::createFromPhpError();
}
}


/**
* Fetch all HTTP response headers. Works in the
* Apache, FastCGI, CLI, and FPM webservers.
Expand Down Expand Up @@ -219,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 $result;
}

9 changes: 5 additions & 4 deletions generated/array.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function array_replace_recursive(array $array, array ...$replacements): array
error_clear_last();
if ($replacements !== []) {
$result = \array_replace_recursive($array, ...$replacements);
} else {
}else {
$result = \array_replace_recursive($array);
}
if ($result === null) {
Expand Down Expand Up @@ -123,7 +123,7 @@ function array_replace(array $array, array ...$replacements): array
error_clear_last();
if ($replacements !== []) {
$result = \array_replace($array, ...$replacements);
} else {
}else {
$result = \array_replace($array);
}
if ($result === null) {
Expand Down Expand Up @@ -155,12 +155,12 @@ function array_replace(array $array, array ...$replacements): array
* @throws ArrayException
*
*/
function array_walk_recursive(array &$array, callable $callback, $userdata = null): void
function array_walk_recursive(array &$array, callable $callback, $userdata = null): void
{
error_clear_last();
if ($userdata !== null) {
$result = \array_walk_recursive($array, $callback, $userdata);
} else {
}else {
$result = \array_walk_recursive($array, $callback);
}
if ($result === false) {
Expand Down Expand Up @@ -634,3 +634,4 @@ function usort(array &$array, callable $callback): void
throw ArrayException::createFromPhpError();
}
}

11 changes: 6 additions & 5 deletions generated/bzip2.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @throws Bzip2Exception
*
*/
function bzclose($bz): void
function bzclose( $bz): void
{
error_clear_last();
$result = \bzclose($bz);
Expand All @@ -32,7 +32,7 @@ function bzclose($bz): void
* @throws Bzip2Exception
*
*/
function bzflush($bz): void
function bzflush( $bz): void
{
error_clear_last();
$result = \bzflush($bz);
Expand All @@ -57,7 +57,7 @@ function bzflush($bz): void
* @throws Bzip2Exception
*
*/
function bzread($bz, int $length = 1024): string
function bzread( $bz, int $length = 1024): string
{
error_clear_last();
$result = \bzread($bz, $length);
Expand All @@ -82,16 +82,17 @@ 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) {
$result = \bzwrite($bz, $data, $length);
} else {
}else {
$result = \bzwrite($bz, $data);
}
if ($result === false) {
throw Bzip2Exception::createFromPhpError();
}
return $result;
}

3 changes: 2 additions & 1 deletion generated/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@ function unixtojd(int $timestamp = null): int
error_clear_last();
if ($timestamp !== null) {
$result = \unixtojd($timestamp);
} else {
}else {
$result = \unixtojd();
}
if ($result === false) {
throw CalendarException::createFromPhpError();
}
return $result;
}

1 change: 1 addition & 0 deletions generated/classobj.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ function class_alias(string $original, string $alias, bool $autoload = true): vo
throw ClassobjException::createFromPhpError();
}
}

9 changes: 5 additions & 4 deletions generated/com.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ function com_create_guid(): string
* @throws ComException
*
*/
function com_event_sink(object $variant, object $sink_object, $sink_interface = null): void
function com_event_sink(object $variant, object $sink_object, $sink_interface = null): void
{
error_clear_last();
if ($sink_interface !== null) {
$result = \com_event_sink($variant, $sink_object, $sink_interface);
} else {
}else {
$result = \com_event_sink($variant, $sink_object);
}
if ($result === false) {
Expand Down Expand Up @@ -145,7 +145,7 @@ function com_print_typeinfo(object $variant, string $dispatch_interface = null,
$result = \com_print_typeinfo($variant, $dispatch_interface, $display_sink);
} elseif ($dispatch_interface !== null) {
$result = \com_print_typeinfo($variant, $dispatch_interface);
} else {
}else {
$result = \com_print_typeinfo($variant);
}
if ($result === false) {
Expand Down Expand Up @@ -185,7 +185,7 @@ function variant_date_to_timestamp(object $variant): int
* @throws ComException
*
*/
function variant_round($value, int $decimals)
function variant_round( $value, int $decimals)
{
error_clear_last();
$result = \variant_round($value, $decimals);
Expand All @@ -194,3 +194,4 @@ function variant_round($value, int $decimals)
}
return $result;
}

27 changes: 14 additions & 13 deletions generated/cubrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @throws CubridException
*
*/
function cubrid_free_result($req_identifier): void
function cubrid_free_result( $req_identifier): void
{
error_clear_last();
$result = \cubrid_free_result($req_identifier);
Expand All @@ -36,7 +36,7 @@ function cubrid_free_result($req_identifier): void
* @throws CubridException
*
*/
function cubrid_get_charset($conn_identifier): string
function cubrid_get_charset( $conn_identifier): string
{
error_clear_last();
$result = \cubrid_get_charset($conn_identifier);
Expand Down Expand Up @@ -183,7 +183,7 @@ function cubrid_get_client_info(): string
* @throws CubridException
*
*/
function cubrid_get_db_parameter($conn_identifier): array
function cubrid_get_db_parameter( $conn_identifier): array
{
error_clear_last();
$result = \cubrid_get_db_parameter($conn_identifier);
Expand All @@ -204,7 +204,7 @@ function cubrid_get_db_parameter($conn_identifier): array
* @throws CubridException
*
*/
function cubrid_get_server_info($conn_identifier): string
function cubrid_get_server_info( $conn_identifier): string
{
error_clear_last();
$result = \cubrid_get_server_info($conn_identifier);
Expand Down Expand Up @@ -232,12 +232,12 @@ function cubrid_get_server_info($conn_identifier): string
* @throws CubridException
*
*/
function cubrid_insert_id($conn_identifier = null): string
function cubrid_insert_id( $conn_identifier = null): string
{
error_clear_last();
if ($conn_identifier !== null) {
$result = \cubrid_insert_id($conn_identifier);
} else {
}else {
$result = \cubrid_insert_id();
}
if ($result === false) {
Expand All @@ -261,14 +261,14 @@ function cubrid_insert_id($conn_identifier = null): string
* @throws CubridException
*
*/
function cubrid_lob2_new($conn_identifier = null, string $type = "BLOB")
function cubrid_lob2_new( $conn_identifier = null, string $type = "BLOB")
{
error_clear_last();
if ($type !== "BLOB") {
$result = \cubrid_lob2_new($conn_identifier, $type);
} elseif ($conn_identifier !== null) {
$result = \cubrid_lob2_new($conn_identifier);
} else {
}else {
$result = \cubrid_lob2_new();
}
if ($result === false) {
Expand All @@ -288,7 +288,7 @@ function cubrid_lob2_new($conn_identifier = null, string $type = "BLOB")
* @throws CubridException
*
*/
function cubrid_lob2_size($lob_identifier): int
function cubrid_lob2_size( $lob_identifier): int
{
error_clear_last();
$result = \cubrid_lob2_size($lob_identifier);
Expand All @@ -312,7 +312,7 @@ function cubrid_lob2_size($lob_identifier): int
* @throws CubridException
*
*/
function cubrid_lob2_size64($lob_identifier): string
function cubrid_lob2_size64( $lob_identifier): string
{
error_clear_last();
$result = \cubrid_lob2_size64($lob_identifier);
Expand All @@ -333,7 +333,7 @@ function cubrid_lob2_size64($lob_identifier): string
* @throws CubridException
*
*/
function cubrid_lob2_tell($lob_identifier): int
function cubrid_lob2_tell( $lob_identifier): int
{
error_clear_last();
$result = \cubrid_lob2_tell($lob_identifier);
Expand All @@ -357,7 +357,7 @@ function cubrid_lob2_tell($lob_identifier): int
* @throws CubridException
*
*/
function cubrid_lob2_tell64($lob_identifier): string
function cubrid_lob2_tell64( $lob_identifier): string
{
error_clear_last();
$result = \cubrid_lob2_tell64($lob_identifier);
Expand Down Expand Up @@ -385,11 +385,12 @@ function cubrid_lob2_tell64($lob_identifier): string
* @throws CubridException
*
*/
function cubrid_set_db_parameter($conn_identifier, int $param_type, int $param_value): 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) {
throw CubridException::createFromPhpError();
}
}

Loading

0 comments on commit 5da53ec

Please sign in to comment.