Skip to content

Commit

Permalink
regenerated files
Browse files Browse the repository at this point in the history
  • Loading branch information
Kharhamel committed Jun 24, 2019
1 parent 21e2ced commit 6df6b5a
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 0 deletions.
30 changes: 30 additions & 0 deletions generated/array.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,36 @@ function array_combine(array $keys, array $values): array
}


/**
* array_flip returns an array in flip
* order, i.e. keys from array become values and values
* from array become keys.
*
* Note that the values of array need to be valid
* keys, i.e. they need to be either integer or
* string. A warning will be emitted if a value has the wrong
* type, and the key/value pair in question will not be included
* in the result.
*
* If a value has several occurrences, the latest key will be
* used as its value, and all others will be lost.
*
* @param array $array An array of key/value pairs to be flipped.
* @return array Returns the flipped array on success and NULL on failure.
* @throws ArrayException
*
*/
function array_flip(array $array): array
{
error_clear_last();
$result = \array_flip($array);
if ($result === null) {
throw ArrayException::createFromPhpError();
}
return $result;
}


/**
* array_multisort can be used to sort several
* arrays at once, or a multi-dimensional array by one or more
Expand Down
5 changes: 5 additions & 0 deletions generated/functionsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'apcu_inc',
'apcu_sma_info',
'array_combine',
'array_flip',
'array_multisort',
'array_walk_recursive',
'arsort',
Expand Down Expand Up @@ -475,6 +476,7 @@
'define',
'highlight_file',
'highlight_string',
'sapi_windows_cp_conv',
'sapi_windows_cp_set',
'sapi_windows_vt100_support',
'sleep',
Expand Down Expand Up @@ -900,6 +902,8 @@
'simplexml_load_file',
'simplexml_load_string',
'socket_accept',
'socket_addrinfo_bind',
'socket_addrinfo_connect',
'socket_bind',
'socket_connect',
'socket_create_listen',
Expand All @@ -909,6 +913,7 @@
'socket_get_option',
'socket_getpeername',
'socket_getsockname',
'socket_import_stream',
'socket_listen',
'socket_read',
'socket_send',
Expand Down
24 changes: 24 additions & 0 deletions generated/misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,30 @@ function highlight_string(string $str, bool $return = false)
}


/**
* Convert string from one codepage to another.
*
* @param int|string $in_codepage The codepage of the subject string.
* Either the codepage name or identifier.
* @param int|string $out_codepage The codepage to convert the subject string to.
* Either the codepage name or identifier.
* @param string $subject The string to convert.
* @return string The subject string converted to
* out_codepage, or NULL on failure.
* @throws MiscException
*
*/
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) {
throw MiscException::createFromPhpError();
}
return $result;
}


/**
* Set the codepage of the current process.
*
Expand Down
59 changes: 59 additions & 0 deletions generated/sockets.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,46 @@ function socket_accept($socket)
}


/**
* Create a Socket resource, and bind it to the provided AddrInfo resource. The return
* value of this function may be used with socket_listen.
*
* @param resource $addr Resource created from socket_addrinfo_lookup().
* @return resource|null Returns a Socket resource on success or NULL on failure.
* @throws SocketsException
*
*/
function socket_addrinfo_bind($addr)
{
error_clear_last();
$result = \socket_addrinfo_bind($addr);
if ($result === null) {
throw SocketsException::createFromPhpError();
}
return $result;
}


/**
* Create a Socket resource, and connect it to the provided AddrInfo resource. The return
* value of this function may be used with the rest of the socket functions.
*
* @param resource $addr Resource created from socket_addrinfo_lookup()
* @return resource|null Returns a Socket resource on success or NULL on failure.
* @throws SocketsException
*
*/
function socket_addrinfo_connect($addr)
{
error_clear_last();
$result = \socket_addrinfo_connect($addr);
if ($result === null) {
throw SocketsException::createFromPhpError();
}
return $result;
}


/**
* Binds the name given in address to the socket
* described by socket. This has to be done before
Expand Down Expand Up @@ -336,6 +376,25 @@ function socket_getsockname($socket, ?string &$addr, ?int &$port = null): void
}


/**
* Imports a stream that encapsulates a socket into a socket extension resource.
*
* @param resource $stream The stream resource to import.
* @return resource Returns FALSE or NULL on failure.
* @throws SocketsException
*
*/
function socket_import_stream($stream)
{
error_clear_last();
$result = \socket_import_stream($stream);
if ($result === null) {
throw SocketsException::createFromPhpError();
}
return $result;
}


/**
* After the socket socket has been created
* using socket_create and bound to a name with
Expand Down
5 changes: 5 additions & 0 deletions rector-migrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ services:
apcu_inc: 'Safe\apcu_inc'
apcu_sma_info: 'Safe\apcu_sma_info'
array_combine: 'Safe\array_combine'
array_flip: 'Safe\array_flip'
array_multisort: 'Safe\array_multisort'
array_walk_recursive: 'Safe\array_walk_recursive'
arsort: 'Safe\arsort'
Expand Down Expand Up @@ -478,6 +479,7 @@ services:
define: 'Safe\define'
highlight_file: 'Safe\highlight_file'
highlight_string: 'Safe\highlight_string'
sapi_windows_cp_conv: 'Safe\sapi_windows_cp_conv'
sapi_windows_cp_set: 'Safe\sapi_windows_cp_set'
sapi_windows_vt100_support: 'Safe\sapi_windows_vt100_support'
sleep: 'Safe\sleep'
Expand Down Expand Up @@ -903,6 +905,8 @@ services:
simplexml_load_file: 'Safe\simplexml_load_file'
simplexml_load_string: 'Safe\simplexml_load_string'
socket_accept: 'Safe\socket_accept'
socket_addrinfo_bind: 'Safe\socket_addrinfo_bind'
socket_addrinfo_connect: 'Safe\socket_addrinfo_connect'
socket_bind: 'Safe\socket_bind'
socket_connect: 'Safe\socket_connect'
socket_create_listen: 'Safe\socket_create_listen'
Expand All @@ -912,6 +916,7 @@ services:
socket_get_option: 'Safe\socket_get_option'
socket_getpeername: 'Safe\socket_getpeername'
socket_getsockname: 'Safe\socket_getsockname'
socket_import_stream: 'Safe\socket_import_stream'
socket_listen: 'Safe\socket_listen'
socket_read: 'Safe\socket_read'
socket_send: 'Safe\socket_send'
Expand Down

0 comments on commit 6df6b5a

Please sign in to comment.