[phpstorm-stubs] Updated parameters for some functions in gd.php, odbc.php and xdebug.php.

This commit is contained in:
LolGleb 2023-08-29 13:40:26 +02:00 committed by Gleb Sieemshchikov
parent beac237645
commit d0fd8b58da
3 changed files with 48 additions and 36 deletions

View File

@ -1038,7 +1038,7 @@ function imagepng(GdImage $image, $file = null, int $quality = -1, int $filters
* @return bool true on success or false on failure.
* @since 5.4
*/
function imagewebp($image, $to = null, $quality = 80): bool {}
function imagewebp($image, $to = null, $quality = -1): bool {}
/**
* Output image to browser or file
@ -1071,7 +1071,7 @@ function imagegif(GdImage $image, $file = null): bool {}
* </p>
* @return bool true on success or false on failure.
*/
function imagejpeg($image, $file = null, $quality = null): bool {}
function imagejpeg($image, $file = null, $quality = -1): bool {}
/**
* Output image to browser or file
@ -1121,7 +1121,7 @@ function imagegd(GdImage $image, ?string $file = null): bool {}
* </p>
* @return bool true on success or false on failure.
*/
function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = 128, int $mode = IMG_GD2_RAW): bool {}
function imagegd2(GdImage $image, ?string $file = null, int $chunk_size = null, int $mode = null): bool {}
/**
* Destroy an image
@ -1618,7 +1618,7 @@ function imagedashedline(GdImage $image, int $x1, int $y1, int $x2, int $y2, int
* corner seeing the text horizontally.
*/
#[Pure]
function imagettfbbox($size, $angle, $font_filename, $text) {}
function imagettfbbox($size, $angle, $font_filename, $text, array $options = []) {}
/**
* Write text to the image using TrueType fonts
@ -1729,10 +1729,10 @@ function imagettftext(GdImage $image, float $size, float $angle, int $x, int $y,
* search for files that do not begin with a leading '/' by appending
* '.ttf' to the filename and searching along a library-defined font path.
* </p>
* @param string $text <p>
* @param string $string <p>
* The string to be measured.
* </p>
* @param array $extrainfo [optional] <p>
* @param array $options [optional] <p>
* <table>
* Possible array indexes for extrainfo
* <tr valign="top">
@ -1790,7 +1790,7 @@ function imagettftext(GdImage $image, float $size, float $angle, int $x, int $y,
* Returns false on error.
*/
#[Pure]
function imageftbbox($size, $angle, $font_filename, $text, $extrainfo = null) {}
function imageftbbox($size, $angle, $font_filename, $string, $options = []) {}
/**
* Write text to the image using fonts using FreeType 2
@ -1855,10 +1855,10 @@ function imageftbbox($size, $angle, $font_filename, $text, $extrainfo = null) {}
* <strong>Note:</strong>
* <code>open_basedir</code> does <em>not</em> apply to font_filename.
* </p>
* @param string $text <p>
* @param string $string <p>
* Text to be inserted into image.
* </p>
* @param array $extrainfo [optional] <p>
* @param array $options [optional] <p>
* <table>
* Possible array indexes for extrainfo
* <tr valign="top">
@ -1908,7 +1908,7 @@ function imageftbbox($size, $angle, $font_filename, $text, $extrainfo = null) {}
* </tr>
* Returns false on error.
*/
function imagefttext($image, $size, $angle, $x, $y, $color, $font_filename, $text, $extrainfo = null) {}
function imagefttext($image, $size, $angle, $x, $y, $color, $font_filename, $string, $options = []) {}
/**
* Load a PostScript Type 1 font from file

View File

@ -124,7 +124,7 @@ function odbc_commit($connection_id) {}
* @param string $password <p>
* The password.
* </p>
* @param int $cursor_type [optional] <p>
* @param int $cursor_option [optional] <p>
* This sets the type of cursor to be used
* for this connection. This parameter is not normally needed, but
* can be useful for working around problems with some ODBC drivers.
@ -135,7 +135,7 @@ function odbc_commit($connection_id) {}
* </p>
* @return resource|false an ODBC connection or (<b>FALSE</b>) on error.
*/
function odbc_connect($dsn, $user, $password, $cursor_type = null) {}
function odbc_connect($dsn, $user, $password, $cursor_option = SQL_CUR_USE_DRIVER) {}
/**
* Get cursorname
@ -166,10 +166,10 @@ function odbc_data_source($connection_id, $fetch_type) {}
/**
* Execute a prepared statement
* @link https://php.net/manual/en/function.odbc-execute.php
* @param resource $result_id <p>
* @param resource $statement <p>
* The result id resource, from <b>odbc_prepare</b>.
* </p>
* @param array $parameters_array [optional] <p>
* @param array $params [optional] <p>
* Parameters in <i>parameter_array</i> will be
* substituted for placeholders in the prepared statement in order.
* Elements of this array will be converted to strings by calling this
@ -189,7 +189,7 @@ function odbc_data_source($connection_id, $fetch_type) {}
* executing the query directly with <b>odbc_exec</b>).
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function odbc_execute($result_id, array $parameters_array = null) {}
function odbc_execute($statement, array $params = []) {}
/**
* Get the last error code
@ -240,30 +240,30 @@ function odbc_exec($connection_id, $query_string, #[PhpStormStubsElementAvailabl
/**
* Fetch a result row as an associative array
* @link https://php.net/manual/en/function.odbc-fetch-array.php
* @param resource $result <p>
* @param resource $statement <p>
* The result resource from <b>odbc_exec</b>.
* </p>
* @param int $rownumber [optional] <p>
* @param int $row [optional] <p>
* Optionally choose which row number to retrieve.
* </p>
* @return array|false an array that corresponds to the fetched row, or <b>FALSE</b> if there
* are no more rows.
*/
function odbc_fetch_array($result, $rownumber = null) {}
function odbc_fetch_array($statement, $row = -1) {}
/**
* Fetch a result row as an object
* @link https://php.net/manual/en/function.odbc-fetch-object.php
* @param resource $result <p>
* @param resource $statement <p>
* The result resource from <b>odbc_exec</b>.
* </p>
* @param int $rownumber [optional] <p>
* @param int $row [optional] <p>
* Optionally choose which row number to retrieve.
* </p>
* @return object|false an object that corresponds to the fetched row, or <b>FALSE</b> if there
* are no more rows.
*/
function odbc_fetch_object($result, $rownumber = null) {}
function odbc_fetch_object($statement, $row = -1) {}
/**
* Fetch a row
@ -293,22 +293,22 @@ function odbc_fetch_row($result_id, $row_number = null) {}
/**
* Fetch one result row into array
* @link https://php.net/manual/en/function.odbc-fetch-into.php
* @param resource $result_id <p>
* @param resource $statement <p>
* The result resource.
* </p>
* @param array &$result_array <p>
* @param array &$array <p>
* The result array
* that can be of any type since it will be converted to type
* array. The array will contain the column values starting at array
* index 0.
* </p>
* @param int $rownumber [optional] <p>
* @param int $row [optional] <p>
* The row number.
* </p>
* @return int the number of columns in the result;
* <b>FALSE</b> on error.
*/
function odbc_fetch_into($result_id, array &$result_array, $rownumber = null) {}
function odbc_fetch_into($statement, array &$array, $row = 0) {}
/**
* Get the length (precision) of a field
@ -389,7 +389,7 @@ function odbc_free_result($result_id) {}
/**
* Retrieves information about data types supported by the data source
* @link https://php.net/manual/en/function.odbc-gettypeinfo.php
* @param resource $connection_id <p>The ODBC connection identifier,
* @param resource $odbc <p>The ODBC connection identifier,
* see <b>odbc_connect</b> for details.</p>
* @param int $data_type [optional] <p>
* The data type, which can be used to restrict the information to a
@ -419,7 +419,7 @@ function odbc_free_result($result_id) {}
* The result set is ordered by DATA_TYPE and TYPE_NAME.
* </p>
*/
function odbc_gettypeinfo($connection_id, $data_type = null) {}
function odbc_gettypeinfo($odbc, $data_type = 0) {}
/**
* Handling of LONG columns
@ -473,11 +473,11 @@ function odbc_num_rows($result_id) {}
* @param string $dsn
* @param string $user
* @param string $password
* @param int $cursor_type [optional]
* @param int $cursor_option [optional]
* @return resource|false an ODBC connection id or 0 (<b>FALSE</b>) on
* error.
*/
function odbc_pconnect($dsn, $user, $password, $cursor_type = null) {}
function odbc_pconnect($dsn, $user, $password, $cursor_option = SQL_CUR_USE_DRIVER) {}
/**
* Prepares a statement for execution
@ -511,7 +511,7 @@ function odbc_result($result_id, $field) {}
/**
* Print result as HTML table
* @link https://php.net/manual/en/function.odbc-result-all.php
* @param resource $result_id <p>
* @param resource $statement <p>
* The result identifier.
* </p>
* @param string $format [optional] <p>
@ -520,7 +520,7 @@ function odbc_result($result_id, $field) {}
* @return int|false the number of rows in the result or <b>FALSE</b> on error.
* @deprecated 8.1
*/
function odbc_result_all($result_id, $format = null) {}
function odbc_result_all($statement, $format = '') {}
/**
* Rollback a transaction
@ -827,8 +827,13 @@ function odbc_foreignkeys($connection_id, $pk_qualifier, $pk_owner, $pk_table, $
/**
* Get the list of procedures stored in a specific data source
* @link https://php.net/manual/en/function.odbc-procedures.php
* @param resource $connection_id <p>The ODBC connection identifier,
* @param resource $odbc <p>The ODBC connection identifier,
* see <b>odbc_connect</b> for details.</p>
* @param string|null $catalog <p>The catalog ('qualifier' in ODBC 2 parlance).</p>
* @param string|null $schema <p>The schema ('owner' in ODBC 2 parlance). This parameter accepts the
* following search patterns: % to match zero or more characters, and _ to match a single character.</p>
* @param string|null $procedure <p>The proc. This parameter accepts the following search patterns:
* % to match zero or more characters, and _ to match a single character.</p>
* @return resource|false <p>an ODBC
* result identifier containing the information or <b>FALSE</b> on failure.
* </p>
@ -844,13 +849,20 @@ function odbc_foreignkeys($connection_id, $pk_qualifier, $pk_owner, $pk_table, $
* PROCEDURE_TYPE
* </p>
*/
function odbc_procedures($connection_id) {}
function odbc_procedures($odbc, $catalog = null, $schema = null, $procedure = null) {}
/**
* Retrieve information about parameters to procedures
* @link https://php.net/manual/en/function.odbc-procedurecolumns.php
* @param resource $connection_id <p>The ODBC connection identifier,
* @param resource $odbc <p>The ODBC connection identifier,
* see <b>odbc_connect</b> for details.</p>
* @param string|null $catalog <p>The catalog ('qualifier' in ODBC 2 parlance).</p>
* @param string|null $schema <p>The schema ('owner' in ODBC 2 parlance). This parameter accepts the
* following search patterns: % to match zero or more characters, and _ to match a single character.</p>
* @param string|null $procedure <p>The proc. This parameter accepts the following search patterns:
* % to match zero or more characters, and _ to match a single character.</p>
* @param string|null $column <p>The column. This parameter accepts the following search patterns:
* % to match zero or more characters, and _ to match a single character.</p>
* @return resource|false <p>the list of input and output parameters, as well as the
* columns that make up the result set for the specified procedures.
* Returns an ODBC result identifier or <b>FALSE</b> on failure.
@ -872,7 +884,7 @@ function odbc_procedures($connection_id) {}
* REMARKS
* </p>
*/
function odbc_procedurecolumns($connection_id) {}
function odbc_procedurecolumns($odbc, $catalog = null, $schema = null, $procedure = null, $column = null) {}
/**
* Alias of <b>odbc_exec</b>

View File

@ -3,7 +3,7 @@
/**
* Show diagnostic information
*/
function xdebug_info(string $category = '') {}
function xdebug_info(string $category = 'null') {}
/**
* Returns an array of ALL valid ini options with values and is not the same as ini_get_all() which returns only