Add ArrayShape attributes for functions
This commit is contained in:
parent
878dd7f909
commit
03b75cef27
|
@ -1851,6 +1851,7 @@ class PDOStatement implements IteratorAggregate
|
|||
* or if no result set exists.
|
||||
*/
|
||||
#[TentativeType]
|
||||
#[ArrayShape(["name" => "string", "len" => "int", "precision" => "int", "native_type" => "string", "flags" => "array", "pdo_type" => "int"])]
|
||||
public function getColumnMeta(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $column): array|false {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
|
||||
/**
|
||||
* (PHP 5 >= 5.5.5, PECL ZendOpcache >= 7.0.2 )<br/>
|
||||
* Compiles and caches a PHP script without executing it
|
||||
|
@ -44,6 +46,19 @@ function opcache_reset(): bool {}
|
|||
* @return array|false <p>Returns an array of information, optionally containing script specific state information</p>
|
||||
* @since 5.5
|
||||
*/
|
||||
#[ArrayShape([
|
||||
'opcache_enabled' => 'bool',
|
||||
'file_cache' => 'string',
|
||||
'file_cache_only' => 'bool',
|
||||
'cache_full' => 'bool',
|
||||
'restart_pending' => 'bool',
|
||||
'restart_in_progress' => 'bool',
|
||||
'memory_usage' => 'array',
|
||||
'interned_strings_usage' => 'array',
|
||||
'opcache_statistics' => 'array',
|
||||
'preload_statistics' => 'array',
|
||||
'scripts' => 'array',
|
||||
])]
|
||||
function opcache_get_status(bool $include_scripts = true): array|false {}
|
||||
|
||||
/**
|
||||
|
@ -53,6 +68,7 @@ function opcache_get_status(bool $include_scripts = true): array|false {}
|
|||
* @return array|false <p>Returns an array of information, including ini, blacklist and version</p>
|
||||
* @since 5.5
|
||||
*/
|
||||
#[ArrayShape(["directives" => "array", "version" => "string[]", "blacklist" => "array"])]
|
||||
function opcache_get_configuration(): array|false {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
@ -117,6 +118,7 @@ function bzerrstr($bz) {}
|
|||
*/
|
||||
#[Pure]
|
||||
#[LanguageLevelTypeAware(['8.1' => 'array', '8.0' => 'array|false'], default: 'array')]
|
||||
#[ArrayShape(["errno" => "int", "errstr" => "string"])]
|
||||
function bzerror($bz) {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of calendar v.
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
|
||||
/**
|
||||
|
@ -247,6 +248,17 @@ function cal_to_jd(int $calendar, int $month, int $day, int $year): int {}
|
|||
* day of week, abbreviated and full names of weekday and month and the
|
||||
* date in string form "month/day/year".
|
||||
*/
|
||||
#[ArrayShape([
|
||||
"date" => "string",
|
||||
"month" => "int",
|
||||
"day" => "int",
|
||||
"year" => "int",
|
||||
"dow" => "int",
|
||||
"abbrevdayname" => "string",
|
||||
"dayname" => "string",
|
||||
"abbrevmonth" => "string",
|
||||
"monthname" => "string"
|
||||
])]
|
||||
function cal_from_jd(int $julian_day, int $calendar): array {}
|
||||
|
||||
/**
|
||||
|
@ -274,6 +286,7 @@ function cal_days_in_month(int $calendar, int $month, int $year): int {}
|
|||
* </p>
|
||||
* @return array
|
||||
*/
|
||||
#[ArrayShape(["months" => "array", "abbrevmonths" => "array", "maxdaysinmonth" => "int", "calname" => "string", "calsymbol" => "string"])]
|
||||
function cal_info(int $calendar = -1): array {}
|
||||
|
||||
define('CAL_GREGORIAN', 0);
|
||||
|
|
|
@ -2757,6 +2757,7 @@ function curl_multi_getcontent(#[LanguageLevelTypeAware(['8.0' => 'CurlHandle'],
|
|||
* @return array|false On success, returns an associative array for the message, false on failure.
|
||||
*/
|
||||
#[Pure]
|
||||
#[ArrayShape(["msg" => "string", "result" => "string", "handle" => "resource"])]
|
||||
function curl_multi_info_read(#[LanguageLevelTypeAware(['8.0' => 'CurlMultiHandle'], default: 'resource')] $multi_handle, &$queued_messages): array|false {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -830,6 +830,17 @@ function time(): int {}
|
|||
* @return array
|
||||
*/
|
||||
#[Pure(true)]
|
||||
#[ArrayShape([
|
||||
'tm_sec' => 'int',
|
||||
'tm_min' => 'int',
|
||||
'tm_hour' => 'int',
|
||||
'tm_mday' => 'int',
|
||||
'tm_mon' => 'int',
|
||||
'tm_year' => 'int',
|
||||
'tm_wday' => 'int',
|
||||
'tm_yday' => 'int',
|
||||
'tm_isdst' => 'int',
|
||||
])]
|
||||
function localtime(?int $timestamp, bool $associative = false): array {}
|
||||
|
||||
/**
|
||||
|
@ -912,6 +923,19 @@ function localtime(?int $timestamp, bool $associative = false): array {}
|
|||
* </table>
|
||||
*/
|
||||
#[Pure(true)]
|
||||
#[ArrayShape([
|
||||
'seconds' => 'int',
|
||||
'minutes' => 'int',
|
||||
'hours' => 'int',
|
||||
'mday' => 'int',
|
||||
'wday' => 'int',
|
||||
'mon' => 'int',
|
||||
'year' => 'int',
|
||||
'yday' => 'int',
|
||||
'weekday' => 'int',
|
||||
'month' => 'string',
|
||||
0 => 'int',
|
||||
])]
|
||||
function getdate(?int $timestamp): array {}
|
||||
|
||||
/**
|
||||
|
@ -984,6 +1008,26 @@ function date_create_from_format(string $format, string $datetime, ?DateTimeZone
|
|||
*/
|
||||
#[Pure(true)]
|
||||
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
|
||||
#[ArrayShape([
|
||||
"year" => "int",
|
||||
"month" => "int",
|
||||
"day" => "int",
|
||||
"hour" => "int",
|
||||
"minute" => "int",
|
||||
"second" => "int",
|
||||
"fraction" => "double",
|
||||
"is_localtime" => "bool",
|
||||
"zone_type" => "int",
|
||||
"zone" => "int",
|
||||
"is_dst" => "bool",
|
||||
"tz_abbr" => "string",
|
||||
"tz_id" => "string",
|
||||
"relative" => "array",
|
||||
"warning_count" => "int",
|
||||
"warnings" => "array",
|
||||
"error_count" => "int",
|
||||
"errors" => "array"
|
||||
])]
|
||||
function date_parse(string $datetime): false|array {}
|
||||
|
||||
/**
|
||||
|
@ -998,6 +1042,26 @@ function date_parse(string $datetime): false|array {}
|
|||
* @return array associative array with detailed info about given date.
|
||||
*/
|
||||
#[Pure(true)]
|
||||
#[ArrayShape([
|
||||
'year' => 'int',
|
||||
'month' => 'int',
|
||||
'day' => 'int',
|
||||
'hour' => 'int',
|
||||
'minute' => 'int',
|
||||
'second' => 'int',
|
||||
'fraction' => 'double',
|
||||
'is_localtime' => 'bool',
|
||||
'zone_type' => 'int',
|
||||
'zone' => 'int',
|
||||
'is_dst' => 'bool',
|
||||
'tz_abbr' => 'string',
|
||||
'tz_id' => 'string',
|
||||
'relative' => 'array',
|
||||
'warning_count' => 'int',
|
||||
'warnings' => 'array',
|
||||
'error_count' => 'int',
|
||||
'errors' => 'array'
|
||||
])]
|
||||
function date_parse_from_format(string $format, string $datetime): array {}
|
||||
|
||||
/**
|
||||
|
@ -1290,6 +1354,12 @@ function timezone_transitions_get(DateTimeZone $object, int $timestampBegin, int
|
|||
* @return array|false <p>Array containing location information about timezone.</p>
|
||||
*/
|
||||
#[Pure(true)]
|
||||
#[ArrayShape([
|
||||
'country_code' => 'string',
|
||||
'latitude' => 'double',
|
||||
'longitude' => 'double',
|
||||
'comments' => 'string',
|
||||
])]
|
||||
function timezone_location_get(DateTimeZone $object): array|false {}
|
||||
|
||||
/**
|
||||
|
@ -1518,6 +1588,17 @@ function date_sunset(int $timestamp, int $returnFormat = SUNFUNCS_RET_STRING, ?f
|
|||
*/
|
||||
#[Pure(true)]
|
||||
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
|
||||
#[ArrayShape([
|
||||
"sunrise" => "int",
|
||||
"sunset" => "int",
|
||||
"transit" => "int",
|
||||
"civil_twilight_begin" => "int",
|
||||
"civil_twilight_end" => "int",
|
||||
"nautical_twilight_begin" => "int",
|
||||
"nautical_twilight_end" => "int",
|
||||
"astronomical_twilight_begin" => "int",
|
||||
"astronomical_twilight_end" => "int"
|
||||
])]
|
||||
function date_sun_info(int $timestamp, float $latitude, float $longitude): array|false {}
|
||||
|
||||
// End of date v.5.3.2-0.dotdeb.1
|
||||
|
|
|
@ -779,6 +779,12 @@ class DateTimeZone
|
|||
* @link https://php.net/manual/en/datetimezone.getlocation.php
|
||||
*/
|
||||
#[TentativeType]
|
||||
#[ArrayShape([
|
||||
'country_code' => 'string',
|
||||
'latitude' => 'double',
|
||||
'longitude' => 'double',
|
||||
'comments' => 'string',
|
||||
])]
|
||||
public function getLocation(): array|false {}
|
||||
|
||||
/**
|
||||
|
|
18
gd/gd.php
18
gd/gd.php
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
|
@ -84,6 +85,22 @@ use JetBrains\PhpStorm\Pure;
|
|||
* </p>
|
||||
*/
|
||||
#[Pure]
|
||||
#[ArrayShape([
|
||||
"GD Version" => "string",
|
||||
"FreeType Support" => "bool",
|
||||
"GIF Read Support" => "bool",
|
||||
"GIF Create Support" => "bool",
|
||||
"JPEG Support" => "bool",
|
||||
"PNG Support" => "bool",
|
||||
"WBMP Support" => "bool",
|
||||
"XPM Support" => "bool",
|
||||
"XBM Support" => "bool",
|
||||
"WebP Support" => "bool",
|
||||
"BMP Support" => "bool",
|
||||
"TGA Read Support" => "bool",
|
||||
"AVIF Support" => "bool",
|
||||
"JIS-mapped Japanese Font Support" => "bool"
|
||||
])]
|
||||
function gd_info(): array {}
|
||||
|
||||
/**
|
||||
|
@ -372,6 +389,7 @@ function imagecolorstotal(GdImage $image): int {}
|
|||
*/
|
||||
#[Pure]
|
||||
#[LanguageLevelTypeAware(['8.0' => 'array'], default: 'array|false')]
|
||||
#[ArrayShape(["red" => "int", "green" => "int", "blue" => "int", "alpha" => "int"])]
|
||||
function imagecolorsforindex(GdImage $image, int $color) {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of gmp v.
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
|
@ -425,6 +426,7 @@ function gmp_gcd(GMP|string|int $num1, GMP|string|int $num2): GMP {}
|
|||
* @return array An array of GMP numbers.
|
||||
*/
|
||||
#[Pure]
|
||||
#[ArrayShape(["g" => "int", "s" => "int", "t" => "int"])]
|
||||
function gmp_gcdext(GMP|string|int $num1, GMP|string|int $num2): array {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of iconv v.
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -60,6 +61,7 @@ function ob_iconv_handler(string $contents, int $status): string {}
|
|||
* </p>
|
||||
*/
|
||||
#[Pure]
|
||||
#[ArrayShape(["input_encoding" => "string", "output_encoding" => "string", "internal_encoding" => "string"])]
|
||||
function iconv_get_encoding(string $type = "all"): array|string|false {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of imap v.
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
|
||||
|
@ -1218,6 +1219,7 @@ function imap_timeout(int $timeout_type, int $timeout = -1): int|bool {}
|
|||
* For backwards compatibility reasons, the original access methods are
|
||||
* still available for use, although it is suggested to update.
|
||||
*/
|
||||
#[ArrayShape(["usage" => "int", "limit" => "int"])]
|
||||
function imap_get_quota(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $quota_root): array|false {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of ldap v.
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware as PhpVersionAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable as Available;
|
||||
|
@ -624,6 +625,7 @@ function ldap_get_dn(
|
|||
* represents the number of returned values, next elements are numerically
|
||||
* indexed DN components.
|
||||
*/
|
||||
#[ArrayShape(["count" => "int"])]
|
||||
function ldap_explode_dn(string $dn, int $with_attrib): array|false {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
// Start of mbstring v.
|
||||
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
|
@ -907,6 +908,21 @@ function mb_send_mail(string $to, string $subject, string $message, array|string
|
|||
* is not specified, otherwise a specific type.
|
||||
*/
|
||||
#[Pure]
|
||||
#[ArrayShape([
|
||||
'internal_encoding' => 'string',
|
||||
'http_input' => 'string',
|
||||
'http_output' => 'string',
|
||||
'http_output_conv_mimetypes' => 'string',
|
||||
'mail_charset' => 'string',
|
||||
'mail_header_encoding' => 'string',
|
||||
'mail_body_encoding' => 'string',
|
||||
'illegal_chars' => 'string',
|
||||
'encoding_translation' => 'string',
|
||||
'language' => 'string',
|
||||
'detect_order' => 'string',
|
||||
'substitute_character' => 'string',
|
||||
'strict_detection' => 'string',
|
||||
])]
|
||||
function mb_get_info(string $type = 'all'): array|string|int|false {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* @link https://php.net/manual/en/book.mysqli.php
|
||||
*/
|
||||
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
|
@ -1827,6 +1828,11 @@ function mysqli_errno(mysqli $mysql): int {}
|
|||
* @return array A list of errors, each as an associative array containing the errno, error, and sqlstate.
|
||||
* @since 5.4
|
||||
*/
|
||||
#[ArrayShape([
|
||||
"errno" => "int",
|
||||
"sqlstate" => "string",
|
||||
"error" => "string",
|
||||
])]
|
||||
function mysqli_error_list(mysqli $mysql): array {}
|
||||
|
||||
/**
|
||||
|
@ -2121,6 +2127,7 @@ function mysqli_get_host_info(mysqli $mysql): string {}
|
|||
* </dl>
|
||||
* @since 5.6
|
||||
*/
|
||||
#[ArrayShape(["total" => "int", "active_plinks" => "int", "cached_plinks" => "int"])]
|
||||
function mysqli_get_links_stats(): array {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of oci8 v.2.0.7
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
|
||||
|
@ -1498,6 +1499,7 @@ function oci_pconnect($username, $password, $connection_string = null, $characte
|
|||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
#[ArrayShape(["code" => "int", "message" => "string", "offset" => "int", "sqltext" => "string"])]
|
||||
function oci_error($resource = null) {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of odbc v.1.0
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
|
||||
/**
|
||||
|
@ -159,6 +160,7 @@ function odbc_cursor($result_id) {}
|
|||
* </p>
|
||||
* @return array|false <b>FALSE</b> on error, and an array upon success.
|
||||
*/
|
||||
#[ArrayShape(["server" => "string", "description" => "string"])]
|
||||
function odbc_data_source($connection_id, $fetch_type) {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of openssl v.
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
|
@ -141,6 +142,7 @@ function openssl_pkey_get_public(#[LanguageLevelTypeAware(['8.0' => 'OpenSSLAsym
|
|||
* Depending on the key type used, additional details may be returned. Note that
|
||||
* some elements may not always be available.
|
||||
*/
|
||||
#[ArrayShape(["bits" => "int", "key" => "string", "rsa" => "array", "dsa" => "array", "dh" => "array", "type" => "int"])]
|
||||
function openssl_pkey_get_details(#[LanguageLevelTypeAware(["8.0" => "OpenSSLAsymmetricKey"], default: "resource")] $key): array|false {}
|
||||
|
||||
/**
|
||||
|
@ -278,6 +280,24 @@ function openssl_x509_free(#[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificat
|
|||
* @return array|false The structure of the returned data is (deliberately) not
|
||||
* yet documented, as it is still subject to change.
|
||||
*/
|
||||
#[ArrayShape([
|
||||
'name' => 'string',
|
||||
'subject' => 'string',
|
||||
'hash' => 'string',
|
||||
'version' => 'int',
|
||||
'serialNumber' => 'string',
|
||||
'serialNumberHex' => 'string',
|
||||
'validFrom' => 'string',
|
||||
'validTo' => 'string',
|
||||
'validFrom_time_t' => 'int',
|
||||
'validTo_time_t' => 'int',
|
||||
'alias' => 'string',
|
||||
'signatureTypeSN' => 'string',
|
||||
'signatureTypeLN' => 'string',
|
||||
'signatureTypeNID' => 'int',
|
||||
'purposes' => 'array',
|
||||
'extensions' => 'array'
|
||||
])]
|
||||
function openssl_x509_parse(
|
||||
#[LanguageLevelTypeAware(["8.0" => "OpenSSLCertificate|string"], default: "resource|string")] $certificate,
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.0')] bool $shortname,
|
||||
|
@ -1170,6 +1190,16 @@ function openssl_error_string(): string|false {}
|
|||
* @return array an array with the available certificate locations
|
||||
* @since 5.6
|
||||
*/
|
||||
#[ArrayShape([
|
||||
'default_cert_file' => 'string',
|
||||
'default_cert_file_env' => 'string',
|
||||
'default_cert_dir' => 'string',
|
||||
'default_cert_dir_env' => 'string',
|
||||
'default_private_dir' => 'string',
|
||||
'default_default_cert_area' => 'string',
|
||||
'ini_cafile' => 'string',
|
||||
'ini_capath' => 'string'
|
||||
])]
|
||||
function openssl_get_cert_locations(): array {}
|
||||
|
||||
function openssl_get_curve_names(): array|false {}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of pgsql v.
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
|
||||
|
@ -241,6 +242,7 @@ function pg_options(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'],
|
|||
* and server keys and values (if available). Returns
|
||||
* <b>FALSE</b> on error or invalid connection.
|
||||
*/
|
||||
#[ArrayShape(["client" => "string", "protocol" => "int", "server" => "string"])]
|
||||
function pg_version(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection|null'], default: 'resource')] $connection = null): array {}
|
||||
|
||||
/**
|
||||
|
@ -1025,6 +1027,7 @@ function pg_field_table(#[LanguageLevelTypeAware(['8.1' => 'PgSql\Result'], defa
|
|||
* @return array|false An array containing the NOTIFY message name and backend PID.
|
||||
* Otherwise if no NOTIFY is waiting, then <b>FALSE</b> is returned.
|
||||
*/
|
||||
#[ArrayShape(["message" => "string", "pid" => "int", "payload" => "string"])]
|
||||
function pg_get_notify(
|
||||
#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $connection = null,
|
||||
#[PhpStormStubsElementAvailable(from: '8.0')] #[LanguageLevelTypeAware(['8.1' => 'PgSql\Connection'], default: 'resource')] $connection,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of posix v.
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Pure;
|
||||
|
||||
/**
|
||||
|
@ -207,6 +208,14 @@ function posix_getsid(int $process_id): int|false {}
|
|||
* libc.
|
||||
*/
|
||||
#[Pure]
|
||||
#[ArrayShape([
|
||||
'sysname' => 'string',
|
||||
'nodename' => 'string',
|
||||
'release' => 'string',
|
||||
'version' => 'string',
|
||||
'machine' => 'string',
|
||||
'domainname' => 'string',
|
||||
])]
|
||||
function posix_uname(): array|false {}
|
||||
|
||||
/**
|
||||
|
@ -222,6 +231,13 @@ function posix_uname(): array|false {}
|
|||
* cstime - system time used by current process and children.
|
||||
*/
|
||||
#[Pure]
|
||||
#[ArrayShape([
|
||||
'ticks' => 'int',
|
||||
'utime' => 'int',
|
||||
'stime' => 'int',
|
||||
'cutime' => 'int',
|
||||
'cstime' => 'int'
|
||||
])]
|
||||
function posix_times(): array|false {}
|
||||
|
||||
/**
|
||||
|
@ -505,6 +521,15 @@ function posix_getgrgid(int $group_id): array|false {}
|
|||
* </table>
|
||||
*/
|
||||
#[Pure]
|
||||
#[ArrayShape([
|
||||
"name" => "string",
|
||||
"passwd" => "string",
|
||||
"uid" => "int",
|
||||
"gid" => "int",
|
||||
"gecos" => "string",
|
||||
"dir" => "string",
|
||||
"shell" => "string",
|
||||
])]
|
||||
function posix_getpwnam(string $username): array|false {}
|
||||
|
||||
/**
|
||||
|
@ -581,6 +606,15 @@ function posix_getpwnam(string $username): array|false {}
|
|||
* </table>
|
||||
*/
|
||||
#[Pure]
|
||||
#[ArrayShape([
|
||||
'name' => 'string',
|
||||
'passwd' => 'string',
|
||||
'uid' => 'int',
|
||||
'gid' => 'int',
|
||||
'gecos' => 'string',
|
||||
'dir' => 'string',
|
||||
'shell' => 'string',
|
||||
])]
|
||||
function posix_getpwuid(int $user_id): array|false {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of readline v.5.5.3-1ubuntu2.1
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
|
||||
/**
|
||||
* Reads a line
|
||||
|
@ -31,6 +32,22 @@ function readline(?string $prompt): string|false {}
|
|||
* <p>
|
||||
* If called with one or two parameters, the old value is returned.
|
||||
*/
|
||||
#[ArrayShape([
|
||||
'line_buffer' => 'string',
|
||||
'point' => 'int',
|
||||
'end' => 'int',
|
||||
'mark' => 'int',
|
||||
'done' => 'int',
|
||||
'pending_input' => 'int',
|
||||
'prompt' => 'string',
|
||||
'terminal_name' => 'string',
|
||||
'completion_append_character' => 'string',
|
||||
'completion_suppress_append' => 'bool',
|
||||
'erase_empty_line' => 'int',
|
||||
'library_version' => 'string',
|
||||
'readline_name' => 'string',
|
||||
'attempted_completion_over' => 'int',
|
||||
])]
|
||||
function readline_info(?string $var_name, $value): mixed {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of sockets v.
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Internal\PhpStormStubsElementAvailable;
|
||||
|
||||
/**
|
||||
|
@ -56,6 +57,14 @@ function socket_addrinfo_bind(AddressInfo $address): Socket|false {}
|
|||
* @return array containing the fields in the addrinfo structure.
|
||||
* @since 7.2
|
||||
*/
|
||||
#[ArrayShape([
|
||||
'ai_flags' => 'int',
|
||||
'ai_family' => 'int',
|
||||
'ai_socktype' => 'int',
|
||||
'ai_protocol' => 'int',
|
||||
'ai_canonname' => 'string',
|
||||
"ai_addr" => "array"
|
||||
])]
|
||||
function socket_addrinfo_explain(AddressInfo $address): array {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -216,6 +216,7 @@ function usleep(int $microseconds): void {}
|
|||
* remaining in the delay
|
||||
* </p>
|
||||
*/
|
||||
#[ArrayShape(["seconds" => "int", "nanoseconds" => "int"])]
|
||||
function time_nanosleep(int $seconds, int $nanoseconds): array|bool {}
|
||||
|
||||
/**
|
||||
|
@ -293,6 +294,17 @@ function time_sleep_until(float $timestamp): bool {}
|
|||
*/
|
||||
#[Pure(true)]
|
||||
#[Deprecated(since: '8.1')]
|
||||
#[ArrayShape([
|
||||
'tm_sec' => 'int',
|
||||
'tm_min' => 'int',
|
||||
'tm_hour' => 'int',
|
||||
'tm_mday' => 'int',
|
||||
'tm_mon' => 'int',
|
||||
'tm_year' => 'int',
|
||||
'tm_wday' => 'int',
|
||||
'tm_yday' => 'int',
|
||||
'unparsed' => 'string'
|
||||
])]
|
||||
function strptime(string $timestamp, string $format): array|false {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -260,6 +260,7 @@ function dirname(string $path, #[PhpStormStubsElementAvailable(from: '7.0')] int
|
|||
* string if not all elements are requested.
|
||||
*/
|
||||
#[Pure(true)]
|
||||
#[ArrayShape(['dirname' => 'string', 'basename' => 'string', 'extension' => 'string', 'filename' => 'string'])]
|
||||
function pathinfo(string $path, #[ExpectedValues(flags: [
|
||||
PATHINFO_DIRNAME,
|
||||
PATHINFO_BASENAME,
|
||||
|
|
|
@ -453,6 +453,7 @@ function ini_get(string $option): string|false {}
|
|||
* </p>
|
||||
*/
|
||||
#[Pure(true)]
|
||||
#[ArrayShape(["global_value" => "string", "local_value" => "string", "access" => "int"])]
|
||||
function ini_get_all(?string $extension, #[PhpStormStubsElementAvailable(from: '7.0')] bool $details = true): array|false {}
|
||||
|
||||
/**
|
||||
|
@ -879,6 +880,7 @@ function move_uploaded_file(string $from, string $to): bool {}
|
|||
* @since 7.3
|
||||
*/
|
||||
#[Pure]
|
||||
#[ArrayShape(["description" => "string", "mac" => "string", "mtu" => "int", "unicast" => "array", "up" => "bool"])]
|
||||
function net_get_interfaces(): array|false {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -133,6 +133,7 @@ function stream_context_set_params($context, array $params): bool {}
|
|||
* </p>
|
||||
* @return array an associate array containing all context options and parameters.
|
||||
*/
|
||||
#[ArrayShape(["notification" => "string", "options" => "array"])]
|
||||
function stream_context_get_params($context): array {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Deprecated;
|
||||
use JetBrains\PhpStorm\ExpectedValues;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
|
@ -101,6 +102,7 @@ function header_register_callback(callable $callback): bool {}
|
|||
* @link https://secure.php.net/manual/en/function.getimagesizefromstring.php
|
||||
* @since 5.4
|
||||
*/
|
||||
#[ArrayShape([0 => 'int', 1 => 'int', 2 => 'int', 3 => 'string', 'bits' => 'int', 'channels' => 'int', 'mime' => 'string'])]
|
||||
function getimagesizefromstring(string $string, &$image_info): array|false {}
|
||||
|
||||
/**
|
||||
|
@ -339,6 +341,16 @@ function ob_get_level(): int {}
|
|||
* <tr><td>blocksize</td><td>...</td></tr>
|
||||
* </table>
|
||||
*/
|
||||
#[ArrayShape([
|
||||
"level" => "int",
|
||||
"type" => "int",
|
||||
"status" => "int",
|
||||
"name" => "string",
|
||||
"del" => "int",
|
||||
"chunk_size" => "int",
|
||||
"buffer_size" => "int",
|
||||
"buffer_used" => "int",
|
||||
])]
|
||||
function ob_get_status(bool $full_status = false): array {}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
// Start of sysvmsg v.
|
||||
use JetBrains\PhpStorm\ArrayShape;
|
||||
use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
|
||||
|
||||
/**
|
||||
|
@ -227,6 +228,18 @@ function msg_remove_queue(#[LanguageLevelTypeAware(["8.0" => "SysvMessageQueue"]
|
|||
* </tr>
|
||||
* </table>
|
||||
*/
|
||||
#[ArrayShape([
|
||||
"msg_perm.uid" => "int",
|
||||
"msg_perm.gid" => "int",
|
||||
"msg_perm.mode" => "int",
|
||||
"msg_stime" => "int",
|
||||
"msg_rtime" => "int",
|
||||
"msg_ctime" => "int",
|
||||
"msg_qnum" => "int",
|
||||
"msg_qbytes" => "int",
|
||||
"msg_lspid" => "int",
|
||||
"msg_lrpid" => "int",
|
||||
])]
|
||||
function msg_stat_queue(#[LanguageLevelTypeAware(["8.0" => "SysvMessageQueue"], default: "resource")] $queue): array|false {}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue