From ee38c942549b0956939e23816b38cf8301def3e0 Mon Sep 17 00:00:00 2001
From: Lars Moelleken
* The key in string representation.
*
* The SimpleXMLElement node.
*
* The string being measured for length. It must be a valid UTF-8 string. *
- * @return int The length of the string on success, and 0 if the string is empty. + * @return int|false|null The length of the string on success, and 0 if the string is empty. */ function grapheme_strlen($input) { } @@ -4543,7 +4543,7 @@ function grapheme_stristr($haystack, $needle, $before_needle = false) { } * Reference to a value that will be set to the next starting position. * When the call returns, this may point to the first byte position past the end of the string. * - * @return string A string starting at offset $start and ending on a default grapheme cluster + * @return string|false A string starting at offset $start and ending on a default grapheme cluster * boundary that conforms to the $size and $extract_type specified. */ function grapheme_extract($haystack, $size, $extract_type = null, $start = 0, &$next = null) { } @@ -5740,7 +5740,7 @@ function resourcebundle_get_error_message(ResourceBundle $bundle) { } * May also be set to * Transliterator::REVERSE. * - * @return Transliterator a Transliterator object on success, + * @return Transliterator|null a Transliterator object on success, * or NULL on failure. */ function transliterator_create($id, $direction = null) { } diff --git a/mysqli/mysqli.php b/mysqli/mysqli.php index d118d506..6940af3b 100644 --- a/mysqli/mysqli.php +++ b/mysqli/mysqli.php @@ -1724,7 +1724,7 @@ function mysqli_fetch_lengths ($result) {} * @param mysqli_result $result A result set identifier returned by mysqli_query(), * mysqli_store_result() or mysqli_use_result(). * @param int $resulttype - * @return array|null Returns an array of associative or numeric arrays holding result rows. + * @return array Returns an array of associative or numeric arrays holding result rows. */ function mysqli_fetch_all ($result, $resulttype = MYSQLI_NUM) {} @@ -1743,7 +1743,7 @@ function mysqli_fetch_array ($result, $resulttype = MYSQLI_BOTH) {} * @link https://php.net/manual/en/mysqli-result.fetch-assoc.php * @param mysqli_result $result A result set identifier returned by mysqli_query(), * mysqli_store_result() or mysqli_use_result(). - * @return array|null Returns an associative array of strings representing the fetched row in the result set, + * @return string[]|null Returns an associative array of strings representing the fetched row in the result set, * where each key in the array represents the name of one of the result set's columns or NULL if there are no more rows in resultset. * If two or more columns of the result have the same field names, the last column will take precedence. * To access the other column(s) of the same name, @@ -2506,7 +2506,7 @@ function mysqli_stmt_store_result ($stmt) {} * Transfers a result set from the last query * @link https://php.net/manual/en/mysqli.store-result.php * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init() - * @return mysqli_result|bool + * @return mysqli_result|false */ function mysqli_store_result ($link) {} @@ -2529,7 +2529,7 @@ function mysqli_thread_safe () {} * Initiate a result set retrieval * @link https://php.net/manual/en/mysqli.use-result.php * @param mysqli $link A link identifier returned by mysqli_connect() or mysqli_init() - * @return mysqli_result|bool + * @return mysqli_result|false */ function mysqli_use_result ($link) {} diff --git a/openssl/openssl.php b/openssl/openssl.php index b6ef8f79..506100b2 100644 --- a/openssl/openssl.php +++ b/openssl/openssl.php @@ -273,7 +273,7 @@ function openssl_x509_free($x509cert) { } * fields will be indexed with the short name form, otherwise, the long name * form will be used - e.g.: CN is the shortname form of commonName. * - * @return array The structure of the returned data is (deliberately) not + * @return array|false The structure of the returned data is (deliberately) not * yet documented, as it is still subject to change. * @since 4.0.6 * @since 5.0 @@ -337,7 +337,7 @@ function openssl_x509_parse($x509cert, $shortnames = true) { } * certificates that can be used to help verify the certificate, although * no trust is placed in the certificates that come from that file. * - * @return int true if the certificate can be used for the intended purpose, + * @return int|bool true if the certificate can be used for the intended purpose, * false if it cannot, or -1 on error. * @since 4.0.6 * @since 5.0 @@ -532,7 +532,7 @@ function openssl_pkcs12_read($pkcs12, array &$certs, $pass) { } * extraattribs are associative arrays whose keys are * converted to OIDs and applied to the relevant part of the request. * - * @return mixed the CSR. + * @return false|resource the CSR. * @since 4.2.0 * @since 5.0 */ @@ -606,7 +606,7 @@ function openssl_csr_sign($csr, $cacert, $priv_key, $days, array $configargs = n * @link https://php.net/manual/en/function.openssl-csr-get-subject.php * @param mixed $csr * @param bool $use_shortnames [optional] - * @return array + * @return array|false * @since 5.2.0 */ function openssl_csr_get_subject($csr, $use_shortnames = true) { } @@ -616,7 +616,7 @@ function openssl_csr_get_subject($csr, $use_shortnames = true) { } * @link https://php.net/manual/en/function.openssl-csr-get-public-key.php * @param mixed $csr * @param bool $use_shortnames [optional] - * @return resource + * @return resource|false * @since 5.2.0 */ function openssl_csr_get_public_key($csr, $use_shortnames = true) { } @@ -822,7 +822,7 @@ function openssl_pbkdf2($password, $salt, $key_length, $iterations, $digest_algo * stripped. * @param string|null $pk7 [optional] * - * @return mixed true if the signature is verified, false if it is not correct + * @return bool|int true if the signature is verified, false if it is not correct * (the message has been tampered with, or the signing certificate is invalid), * or -1 on error. * @since 4.0.6 diff --git a/sockets/sockets.php b/sockets/sockets.php index dd49a237..470acb01 100644 --- a/sockets/sockets.php +++ b/sockets/sockets.php @@ -31,7 +31,7 @@ * socket_select can block indefinitely. * * @param int $tv_usec [optional] - * @return int On success socket_select returns the number of + * @return int|false On success socket_select returns the number of * socket resources contained in the modified arrays, which may be zero if * the timeout expires before anything interesting happens. On error FALSE * is returned. The error code can be retrieved with @@ -184,7 +184,7 @@ function socket_select (array &$read, array &$write, array &$except, $tv_sec, $t * * * - * @return resource socket_create returns a socket resource on success, + * @return resource|false socket_create returns a socket resource on success, * or FALSE on error. The actual error code can be retrieved by calling * socket_last_error. This error code may be passed to * socket_strerror to get a textual explanation of the @@ -212,7 +212,7 @@ function socket_export_stream($socket) {} * backlog parameter, see * socket_listen for more information. * - * @return resource socket_create_listen returns a new socket resource + * @return resource|false socket_create_listen returns a new socket resource * on success or FALSE on error. The error code can be retrieved with * socket_last_error. This code may be passed to * socket_strerror to get a textual explanation of the @@ -390,7 +390,7 @@ function socket_write ($socket, $buffer, $length = 0) {} * Optional type parameter is a named constant: * PHP_BINARY_READ (Default) - use the system * recv() function. Safe for reading binary data. - * @return string socket_read returns the data as a string on success, + * @return string|false socket_read returns the data as a string on success, * or FALSE on error (including if the remote host has closed the * connection). The error code can be retrieved with * socket_last_error. This code may be passed to @@ -607,7 +607,7 @@ function socket_bind ($socket, $address, $port = 0) {} * * * - * @return int socket_recv returns the number of bytes received, + * @return int|false socket_recv returns the number of bytes received, * or FALSE if there was an error. The actual error code can be retrieved by * calling socket_last_error. This error code may be * passed to socket_strerror to get a textual explanation @@ -678,7 +678,7 @@ function socket_send ($socket, $buf, $len, $flags) {} * @param resource $socket * @param array $message * @param int $flags - * @return int + * @return int|false * @since 5.5.0 */ function socket_sendmsg ($socket, array $message, $flags ) {} @@ -749,7 +749,7 @@ function socket_sendmsg ($socket, array $message, $flags ) {} * from which the data is received. If the socket is connection-oriented, * port will be NULL. * - * @return int socket_recvfrom returns the number of bytes received, + * @return int|false socket_recvfrom returns the number of bytes received, * or FALSE if there was an error. The actual error code can be retrieved by * calling socket_last_error. This error code may be * passed to socket_strerror to get a textual explanation @@ -765,10 +765,11 @@ function socket_recvfrom ($socket, &$buf, $len, $flags, &$name, &$port = null) { * @param resource $socket * @param string $message * @param int $flags [optional] - * @return int + * @return int|false * @since 5.5.0 */ function socket_recvmsg ($socket , $message, $flags) {} + /** * Sends a message to a socket, whether it is connected or not * @link https://php.net/manual/en/function.socket-sendto.php @@ -823,7 +824,7 @@ function socket_recvmsg ($socket , $message, $flags) {} * port is the remote port number at which the data * will be sent. * - * @return int socket_sendto returns the number of bytes sent to the + * @return int|false socket_sendto returns the number of bytes sent to the * remote host, or FALSE if an error occurred. * @since 4.1.0 * @since 5.0 @@ -1192,7 +1193,7 @@ function socket_sendto ($socket, $buf, $len, $flags, $addr, $port = 0) {} * * * - * @return mixed the value of the given option, or FALSE on errors. + * @return mixed|false the value of the given option, or FALSE on errors. * @since 4.3.0 * @since 5.0 */ diff --git a/sqlsrv/sqlsrv.php b/sqlsrv/sqlsrv.php index 1f5dda15..3a824390 100644 --- a/sqlsrv/sqlsrv.php +++ b/sqlsrv/sqlsrv.php @@ -1237,7 +1237,7 @@ function sqlsrv_query($conn, $tsql, $params=array(), $options=array()){} * {@link http://msdn.microsoft.com/en-us/library/ee376927.aspx Specifying a Cursor Type and Selecting Rows}. * @param int|null $offset [optional] Used with SQLSRV_SCROLL_ABSOLUTE and SQLSRV_SCROLL_RELATIVE to specify the row to * retrieve. The first record in the result set is 0. - * @return array|null|false If the next row of the result set was successfully retrieved, true is returned. If there are + * @return bool|null If the next row of the result set was successfully retrieved, true is returned. If there are * no more results in the result set, null is returned. If an error occurred, false is returned. */ function sqlsrv_fetch($stmt, $row=null, $offset=null){} @@ -1448,7 +1448,7 @@ function sqlsrv_rows_affected($stmt){} * * @link https://docs.microsoft.com/en-us/sql/connect/php/sqlsrv-client-info * @param resource $conn The connection resource by which the client is connected. - * @return array|null An associative array with keys described in the table below, or false if the connection resource + * @return array|false An associative array with keys described in the table below, or false if the connection resource * is null.