From bba4b6c8f97cd94a74e4aa879f6efdd48a9e9302 Mon Sep 17 00:00:00 2001
From: Steven Lehn
* The value of the second node being compared.
*
* Having multiple elements with the same value in a Heap is not recommended. They will end up in an arbitrary relative position. @@ -1612,7 +1612,7 @@ class SplMaxHeap extends SplHeap * @param TValue $value2
* The value of the second node being compared. *
- * @return void Result of the comparison, positive integer if value1 is greater than value2, 0 if they are equal, negative integer otherwise. + * @return int Result of the comparison, positive integer if value1 is greater than value2, 0 if they are equal, negative integer otherwise. * *
* Having multiple elements with the same value in a Heap is not recommended. They will end up in an arbitrary relative position.
diff --git a/iconv/iconv.php b/iconv/iconv.php
index 5cd45372e..229d102c2 100644
--- a/iconv/iconv.php
+++ b/iconv/iconv.php
@@ -419,7 +419,7 @@ function iconv_mime_decode_headers(string $headers, int $mode = 0, ?string $enco
* string
* @link https://php.net/manual/en/iconv.constants.php
*/
-define('ICONV_IMPL', "unknown");
+define('ICONV_IMPL', "libiconv");
/**
* string
diff --git a/tests/BaseStubsTest.php b/tests/BaseStubsTest.php
index 9b9029c20..bb6d1b6e6 100644
--- a/tests/BaseStubsTest.php
+++ b/tests/BaseStubsTest.php
@@ -90,8 +90,7 @@ public static function getStringRepresentationOfDefaultParameterValue(mixed $def
$value = "null";
} elseif (is_array($defaultValue) || $defaultValue instanceof Array_) {
$value = '[]';
- }
- else {
+ } else {
$value = strval($defaultValue);
}
return $value;
diff --git a/tests/Model/PHPDocElement.php b/tests/Model/PHPDocElement.php
index 3210ae39a..91cba38a5 100644
--- a/tests/Model/PHPDocElement.php
+++ b/tests/Model/PHPDocElement.php
@@ -73,7 +73,8 @@ trait PHPDocElement
public $hasInternalMetaTag = false;
public $templateTypes = null;
- protected function collectTags(Node $node) {
+ protected function collectTags(Node $node)
+ {
if ($node->getDocComment() !== null) {
try {
$text = $node->getDocComment()->getText();
diff --git a/tests/TestData/mutedProblems.json b/tests/TestData/mutedProblems.json
index fe3c4268a..32732ef4b 100644
--- a/tests/TestData/mutedProblems.json
+++ b/tests/TestData/mutedProblems.json
@@ -977,7 +977,8 @@
{
"description": "parameter mismatch",
"versions": [
- 8.0, 8.1
+ 8.0,
+ 8.1
]
}
]
diff --git a/tests/Tools/generate-stub-map b/tests/Tools/generate-stub-map
index df26dc024..07a4c18b8 100644
--- a/tests/Tools/generate-stub-map
+++ b/tests/Tools/generate-stub-map
@@ -97,8 +97,7 @@ use const PHP_EOL;
$phpStormStubsDirectory = __DIR__ . '/../../';
- $fileVisitor = new class() extends NodeVisitorAbstract
- {
+ $fileVisitor = new class() extends NodeVisitorAbstract {
/** @var string[] */
private $classNames = [];
@@ -248,10 +247,10 @@ use const PHP_EOL;
}
}
- $mapWithRelativeFilePaths = array_map(static function (array $files) use ($phpStormStubsDirectory) : array {
+ $mapWithRelativeFilePaths = array_map(static function (array $files) use ($phpStormStubsDirectory): array {
ksort($files);
- return array_map(static function (string $filePath) use ($phpStormStubsDirectory) : string {
+ return array_map(static function (string $filePath) use ($phpStormStubsDirectory): string {
return str_replace('\\', '/', substr($filePath, strlen($phpStormStubsDirectory)));
}, $files);
}, $map);
From 90461cd8f895b0112b2804b1a8cc578b4af27f24 Mon Sep 17 00:00:00 2001
From: Christian Sciberras If matches are found, the new subject will be returned, otherwise subject will be returned unchanged. If matches are found, the new subject will be returned, otherwise subject will be returned unchanged.
* The string being measured for length.
*
* The return value is cast to an integer.
*
- * $redis->info();
- *
- */
- public function info() {}
-}
diff --git a/redis/RedisArray.php b/redis/RedisArray.php
new file mode 100644
index 000000000..94ea0b525
--- /dev/null
+++ b/redis/RedisArray.php
@@ -0,0 +1,213 @@
+
+ * @link https://github.com/akalongman/phpstorm-stubs
+ */
+class RedisArray
+{
+ /**
+ * Constructor
+ *
+ * @param string|string[] $hosts Name of the redis array from redis.ini or array of hosts to construct the array with
+ * @param null|array $opts Array of options
+ *
+ * @link https://github.com/phpredis/phpredis/blob/develop/redis_array.stub.php
+ */
+ public function __construct(string|array $hosts, ?array $opts = null) {}
+
+ /**
+ * @return bool|array returns a list of points on continuum; may be useful with custom distributor function.
+ */
+ public function _continuum(): bool|array {}
+
+ /**
+ * @return bool|array returns a custom distributor function.
+ */
+ public function _distributor(): bool|callable {}
+
+ /**
+ * @return bool|callable the name of the function used to extract key parts during consistent hashing.
+ */
+ public function _function(): bool|callable {}
+
+ /**
+ * @return bool|array list of hosts for the selected array or false
+ */
+ public function _hosts(): bool|array {}
+
+ /**
+ * @param string $host The host you want to retrieve the instance for
+ *
+ * @return bool|null|\Redis a redis instance connected to a specific node
+ */
+ public function _instance(string $host): bool|null|Redis {}
+
+ /**
+ * Use this function when a new node is added and keys need to be rehashed.
+ *
+ * @return bool|null rehash result
+ */
+ public function _rehash(callable $fn = null): bool|null {}
+
+ /**
+ * @param string $key The key for which you want to lookup the host
+ *
+ * @return bool|string|null the host to be used for a certain key
+ */
+ public function _target(string $key): bool|string|null {}
+
+ /**
+ * @param string $host Host
+ * @param int $mode \Redis::MULTI|\Redis::PIPELINE
+ *
+ * @return bool|string|null the host to be used for a certain key
+ */
+ public function multi(string $host, int $mode = Redis::MULTI): bool|RedisArray {}
+
+ /**
+ * Returns a hosts array of associative array of strings and integers, with the following keys:
+ * - redis_version
+ * - redis_git_sha1
+ * - redis_git_dirty
+ * - redis_build_id
+ * - redis_mode
+ * - os
+ * - arch_bits
+ * - multiplexing_api
+ * - atomicvar_api
+ * - gcc_version
+ * - process_id
+ * - run_id
+ * - tcp_port
+ * - uptime_in_seconds
+ * - uptime_in_days
+ * - hz
+ * - lru_clock
+ * - executable
+ * - config_file
+ * - connected_clients
+ * - client_longest_output_list
+ * - client_biggest_input_buf
+ * - blocked_clients
+ * - used_memory
+ * - used_memory_human
+ * - used_memory_rss
+ * - used_memory_rss_human
+ * - used_memory_peak
+ * - used_memory_peak_human
+ * - used_memory_peak_perc
+ * - used_memory_peak
+ * - used_memory_overhead
+ * - used_memory_startup
+ * - used_memory_dataset
+ * - used_memory_dataset_perc
+ * - total_system_memory
+ * - total_system_memory_human
+ * - used_memory_lua
+ * - used_memory_lua_human
+ * - maxmemory
+ * - maxmemory_human
+ * - maxmemory_policy
+ * - mem_fragmentation_ratio
+ * - mem_allocator
+ * - active_defrag_running
+ * - lazyfree_pending_objects
+ * - mem_fragmentation_ratio
+ * - loading
+ * - rdb_changes_since_last_save
+ * - rdb_bgsave_in_progress
+ * - rdb_last_save_time
+ * - rdb_last_bgsave_status
+ * - rdb_last_bgsave_time_sec
+ * - rdb_current_bgsave_time_sec
+ * - rdb_last_cow_size
+ * - aof_enabled
+ * - aof_rewrite_in_progress
+ * - aof_rewrite_scheduled
+ * - aof_last_rewrite_time_sec
+ * - aof_current_rewrite_time_sec
+ * - aof_last_bgrewrite_status
+ * - aof_last_write_status
+ * - aof_last_cow_size
+ * - changes_since_last_save
+ * - aof_current_size
+ * - aof_base_size
+ * - aof_pending_rewrite
+ * - aof_buffer_length
+ * - aof_rewrite_buffer_length
+ * - aof_pending_bio_fsync
+ * - aof_delayed_fsync
+ * - loading_start_time
+ * - loading_total_bytes
+ * - loading_loaded_bytes
+ * - loading_loaded_perc
+ * - loading_eta_seconds
+ * - total_connections_received
+ * - total_commands_processed
+ * - instantaneous_ops_per_sec
+ * - total_net_input_bytes
+ * - total_net_output_bytes
+ * - instantaneous_input_kbps
+ * - instantaneous_output_kbps
+ * - rejected_connections
+ * - maxclients
+ * - sync_full
+ * - sync_partial_ok
+ * - sync_partial_err
+ * - expired_keys
+ * - evicted_keys
+ * - keyspace_hits
+ * - keyspace_misses
+ * - pubsub_channels
+ * - pubsub_patterns
+ * - latest_fork_usec
+ * - migrate_cached_sockets
+ * - slave_expires_tracked_keys
+ * - active_defrag_hits
+ * - active_defrag_misses
+ * - active_defrag_key_hits
+ * - active_defrag_key_misses
+ * - role
+ * - master_replid
+ * - master_replid2
+ * - master_repl_offset
+ * - second_repl_offset
+ * - repl_backlog_active
+ * - repl_backlog_size
+ * - repl_backlog_first_byte_offset
+ * - repl_backlog_histlen
+ * - master_host
+ * - master_port
+ * - master_link_status
+ * - master_last_io_seconds_ago
+ * - master_sync_in_progress
+ * - slave_repl_offset
+ * - slave_priority
+ * - slave_read_only
+ * - master_sync_left_bytes
+ * - master_sync_last_io_seconds_ago
+ * - master_link_down_since_seconds
+ * - connected_slaves
+ * - min-slaves-to-write
+ * - min-replicas-to-write
+ * - min_slaves_good_slaves
+ * - used_cpu_sys
+ * - used_cpu_user
+ * - used_cpu_sys_children
+ * - used_cpu_user_children
+ * - cluster_enabled
+ *
+ * @link https://redis.io/commands/info
+ * @return bool|array
+ * @example
+ *
+ * $redis->info();
+ *
+ */
+ public function info(): bool|array {}
+}
From e1d6b91a0450878092fd6c12dbed352fabd07ecf Mon Sep 17 00:00:00 2001
From: Avtandil Kikabidze
+ *
* @return mixed Returns the result of the C call.
*/
function dio_fcntl($fd, int $cmd, ...$args) {}
/**
+ * Opens a file (creating it if necessary) at a lower level than theC library input/ouput stream functions allow
+ *
* dio_open ( string $filename , int $flags [, int $mode = 0 ] ) : resource
- * The function dio_close() closes the file descriptor fd.
+ *
* @link https://www.php.net/manual/en/function.dio-open.php
* @param string $filename The pathname of the file to open.
- * @param int $flags
- * The flags parameter is a bitwise-ORed value comprising flags from the following list. This value must include one of O_RDONLY, O_WRONLY, or O_RDWR. Additionally, it may include any combination of the other flags from this list.
- * O_RDONLY - opens the file for read access.
- * O_WRONLY - opens the file for write access.
- * O_RDWR - opens the file for both reading and writing.
- * O_CREAT - creates the file, if it doesn't already exist.
- * O_EXCL - if both O_CREAT and O_EXCL are set and the file already exists, dio_open() will fail.
- * O_TRUNC - if the file exists and is opened for write access, the file will be truncated to zero length.
- * O_APPEND - write operations write data at the end of the file.
- * O_NONBLOCK - sets non blocking mode.
- * O_NOCTTY - prevent the OS from assigning the opened file as the process's controlling terminal when opening a TTY device file.
- * @param int $mode If flags contains O_CREAT, mode will set the permissions of the file (creation permissions). mode is required for correct operation when O_CREAT is specified in flags and is ignored otherwise.
- * The actual permissions assigned to the created file will be affected by the process's umask setting as per usual.
+ * @param int $flags The flags parameter is a bitwise-ORed value comprising flags from the following list.
+ *
+ *
+ * @param int $mode If flags contains O_CREAT, mode will set the permissions of the file (creation permissions).
* @return resource|false A file descriptor or FALSE on error.
*/
function dio_open(string $filename, int $flags, int $mode = 0) {}
/**
+ * Reads bytes from a file descriptor.
+ *
* dio_read ( resource $fd [, int $len = 1024 ] ) : string
- * The function dio_read() reads and returns len bytes from file with descriptor fd.
+ *
* @param resource $fd The file descriptor returned by dio_open().
- * @param int $len The number of bytes to read. If not specified, dio_read() reads 1K sized block.
- * @return int The bytes read from fd.
+ * @param int $len The number of bytes to read. If not specified, dio_read() reads 1k sized block.
+ * @return string The bytes read from fd.
* @link https://www.php.net/manual/en/function.dio-read.php
*/
-function dio_read($fd, int $len = 1024) {}
+function dio_read($fd, int $len = 1024) { }
/**
- * dio_seek — Seeks to pos on fd from whence
+ * Seeks to pos on fd from whence
+ *
+ * dio_seek ( resource $fd , int $pos [, int $whence = SEEK_SET ] ): int
+ *
* @param resource $fd The file descriptor returned by dio_open().
* @param int $pos The new position.
* @param int $whence Specifies how the position pos should be interpreted:
- * SEEK_SET (default) - specifies that pos is specified from the beginning of the file.
- * SEEK_CUR - Specifies that pos is a count of characters from the current file position. This count may be positive or negative.
- * SEEK_END - Specifies that pos is a count of characters from the end of the file. A negative count specifies a position within the current extent of the file; a positive count specifies a position past the current end. If you set the position past the current end, and actually write data, you will extend the file with zeros up to that position.
+ *
+ *
* @return int
* @link https://www.php.net/manual/en/function.dio-seek.php
*/
function dio_seek($fd, int $pos, int $whence = SEEK_SET) {}
/**
- * dio_stat — Gets stat information about the file descriptor fd
- * @param resource $fd
+ * Gets stat information about the file descriptor fd
+ *
+ * dio_stat ( resource $fd ) : array
+ *
+ * @param resource $fd The file descriptor returned by dio_open().
* @return array|null Returns an associative array with the following keys:
- * "device" - device
- * "inode" - inode
- * "mode" - mode
- * "nlink" - number of hard links
- * "uid" - user id
- * "gid" - group id
- * "device_type" - device type (if inode device)
- * "size" - total size in bytes
- * "blocksize" - blocksize
- * "blocks" - number of blocks allocated
- * "atime" - time of last access
- * "mtime" - time of last modification
- * "ctime" - time of last change
+ *
+ *
* On error dio_stat() returns NULL.
* @link https://www.php.net/manual/en/function.dio-stat.php
*/
function dio_stat($fd) {}
/**
+ * Sets terminal attributes and baud rate for a serial port
+ *
* dio_tcsetattr ( resource $fd , array $options ) : bool
- * dio_tcsetattr — Sets terminal attributes and baud rate for a serial port
+ *
* @param resource $fd The file descriptor returned by dio_open().
* @param array $options The currently available options are:
- * 'baud' - baud rate of the port - can be 38400,19200,9600,4800,2400,1800, 1200,600,300,200,150,134,110,75 or 50, default value is 9600.
- * 'bits' - data bits - can be 8,7,6 or 5. Default value is 8.
- * 'stop' - stop bits - can be 1 or 2. Default value is 1.
- * 'parity' - can be 0,1 or 2. Default value is 0.
+ *
+ *
* @return void
* @link https://www.php.net/manual/en/function.dio-tcsetattr.php
*/
function dio_tcsetattr($fd, array $options) {}
/**
+ * Truncates a file to at most offset bytes in size.
+ *
* dio_truncate ( resource $fd , int $offset ) : bool
- * dio_truncate() truncates a file to at most offset bytes in size.
+ *
* If the file previously was larger than this size, the extra data is lost.
* If the file previously was shorter, it is unspecified whether the file is left unchanged or is extended.
* In the latter case the extended part reads as zero bytes.
@@ -134,8 +162,10 @@ function dio_tcsetattr($fd, array $options) {}
function dio_truncate($fd, int $offset) {}
/**
+ * Writes data to fd with optional truncation at length
+ *
* dio_write ( resource $fd , string $data [, int $len = 0 ] ) : int
- * dio_write — Writes data to fd with optional truncation at length
+ *
* @link https://www.php.net/manual/en/function.dio-write.php
* @param resource $fd The file descriptor returned by dio_open().
* @param string $data The written data.
@@ -143,3 +173,43 @@ function dio_truncate($fd, int $offset) {}
* @return int Returns the number of bytes written to fd.
*/
function dio_write($fd, string $data, int $len = 0) {}
+
+/**
+ * Opens a raw direct IO stream.
+ *
+ * dio_raw ( string filename , string mode [, array options] ) : ?resource
+ *
+ * @param string $filename The pathname of the file to open.
+ * @param string $mode The mode parameter specifies the type of access you require to the stream (as fopen()).
+ * @param array|null $options The currently available options are:
+ *
+ *
+ * @return resource|null A stream resource or null on error.
+ */
+function dio_raw(string $filename, string $mode, ?array $options) {}
+
+/**
+ * Opens a serial direct IO stream.
+ *
+ * dio_serial ( string $filename , string $mode [, array $options = null] ) : ?resource
+ *
+ * @param string $filename The pathname of the file to open.
+ * @param string $mode The mode parameter specifies the type of access you require to the stream (as fopen()).
+ * @param array|null $options The currently available options are:
+ *
+ *
+ * @return resource|null A stream resource or null on error.
+ */
+function dio_serial(string $filename, string $mode, ?array $options) {}
diff --git a/dio/dio_d.php b/dio/dio_d.php
new file mode 100644
index 000000000..c396a5c91
--- /dev/null
+++ b/dio/dio_d.php
@@ -0,0 +1,141 @@
+
Date: Thu, 24 Mar 2022 18:25:38 +0100
Subject: [PATCH 022/419] CS Fixer fixes
---
dio/dio.php | 4 ++--
dio/dio_d.php | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dio/dio.php b/dio/dio.php
index fdad08aba..4bf112b00 100644
--- a/dio/dio.php
+++ b/dio/dio.php
@@ -25,7 +25,7 @@
* @param resource $fd The file descriptor returned by dio_open()
* @return void
*/
-function dio_close($fd) : void {}
+function dio_close($fd): void {}
/**
* The dio_fcntl() function performs the operation specified by cmd on the file descriptor fd.
@@ -81,7 +81,7 @@ function dio_open(string $filename, int $flags, int $mode = 0) {}
* @return string The bytes read from fd.
* @link https://www.php.net/manual/en/function.dio-read.php
*/
-function dio_read($fd, int $len = 1024) { }
+function dio_read($fd, int $len = 1024) {}
/**
* Seeks to pos on fd from whence
diff --git a/dio/dio_d.php b/dio/dio_d.php
index c396a5c91..97c47e79f 100644
--- a/dio/dio_d.php
+++ b/dio/dio_d.php
@@ -41,9 +41,6 @@
* F_WRLCK -
*/
-/**
- */
-
/**
* O_RDONLY - opens the file for read access.
*/
From 9b04acc83c0e45c32866aac4555dfb80909ae6f9 Mon Sep 17 00:00:00 2001
From: "Dmitry.Tronin" <33625946+DmitryTronin@users.noreply.github.com>
Date: Mon, 28 Mar 2022 16:35:49 +0200
Subject: [PATCH 023/419] added new GD functions
---
gd/gd.php | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/gd/gd.php b/gd/gd.php
index c7292c2d4..1fe888ee7 100644
--- a/gd/gd.php
+++ b/gd/gd.php
@@ -862,6 +862,15 @@ function imagesetstyle(GdImage $image, array $style): bool {}
*/
function imagecreatefrompng(string $filename): GdImage|false {}
+/**
+ * Create a new image from file or URL
+ * @link https://www.php.net/manual/function.imagecreatefromavif.php
+ * @param string $filename Path to the AVIF raster image.
+ * @return GdImage|false returns an image object representing the image obtained from the given filename
+ * @since 8.1.0
+ */
+function imagecreatefromavif(string $filename): GdImage|false {}
+
/**
* Create a new image from file or URL
* @link https://php.net/manual/en/function.imagecreatefromgif.php
@@ -2904,6 +2913,19 @@ function imagegetinterpolation(GdImage $image): int {}
* @since 8.1
*/
define('IMG_WEBP_LOSSLESS', 101);
+
+/**
+ * Outputs or saves a AVIF Raster image from the given image
+ * @link https://www.php.net/manual/function.imageavif.php
+ * @param GdImage $image A GdImage object, returned by one of the image creation functions, such as imagecreatetruecolor().
+ * @param resource|string|null $file The path or an open stream resource (which is automatically closed after this function returns) to save the file to. If not set or null, the raw image stream will be output directly.
+ * @param int $quality quality is optional, and ranges from 0 (worst quality, smaller file) to 100 (best quality, larger file). If -1 is provided, the default value 30 is used.
+ * @param int $speed speed is optional, and ranges from 0 (slow, smaller file) to 10 (fast, larger file). If -1 is provided, the default value 6 is used.
+ * @return bool Returns true on success or false on failure. However, if libgd fails to output the image, this function returns true.
+ * @sine 8.1.0
+ */
+function imageavif(GdImage $image, string|null $file = null, int $quality = -1, int $speed = -1): bool {}
+
/**
* Return an image containing the affine tramsformed src image, using an optional clipping area
* @link https://secure.php.net/manual/en/function.imageaffine.php
From aa9ea181d703814bbd3d258873b0a784593f33d6 Mon Sep 17 00:00:00 2001
From: "Dmitry.Tronin" <33625946+DmitryTronin@users.noreply.github.com>
Date: Mon, 28 Mar 2022 16:48:54 +0200
Subject: [PATCH 024/419] fixed typos
---
gd/gd.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gd/gd.php b/gd/gd.php
index 1fe888ee7..a0a5b53c8 100644
--- a/gd/gd.php
+++ b/gd/gd.php
@@ -867,7 +867,7 @@ function imagecreatefrompng(string $filename): GdImage|false {}
* @link https://www.php.net/manual/function.imagecreatefromavif.php
* @param string $filename Path to the AVIF raster image.
* @return GdImage|false returns an image object representing the image obtained from the given filename
- * @since 8.1.0
+ * @since 8.1
*/
function imagecreatefromavif(string $filename): GdImage|false {}
@@ -2922,7 +2922,7 @@ function imagegetinterpolation(GdImage $image): int {}
* @param int $quality quality is optional, and ranges from 0 (worst quality, smaller file) to 100 (best quality, larger file). If -1 is provided, the default value 30 is used.
* @param int $speed speed is optional, and ranges from 0 (slow, smaller file) to 10 (fast, larger file). If -1 is provided, the default value 6 is used.
* @return bool Returns true on success or false on failure. However, if libgd fails to output the image, this function returns true.
- * @sine 8.1.0
+ * @since 8.1
*/
function imageavif(GdImage $image, string|null $file = null, int $quality = -1, int $speed = -1): bool {}
From 4b53de38a1e06cc8b0e6fc2e3c4770d161568b3d Mon Sep 17 00:00:00 2001
From: "Dmitry.Tronin" <33625946+DmitryTronin@users.noreply.github.com>
Date: Mon, 28 Mar 2022 17:11:42 +0200
Subject: [PATCH 025/419] updated stubs map
---
PhpStormStubsMap.php | 2 ++
1 file changed, 2 insertions(+)
diff --git a/PhpStormStubsMap.php b/PhpStormStubsMap.php
index df73d6553..3a60e4512 100644
--- a/PhpStormStubsMap.php
+++ b/PhpStormStubsMap.php
@@ -2932,6 +2932,7 @@ final class PhpStormStubsMap
'imagealphablending' => 'gd/gd.php',
'imageantialias' => 'gd/gd.php',
'imagearc' => 'gd/gd.php',
+ 'imageavif' => 'gd/gd.php',
'imagebmp' => 'gd/gd.php',
'imagechar' => 'gd/gd.php',
'imagecharup' => 'gd/gd.php',
@@ -2958,6 +2959,7 @@ final class PhpStormStubsMap
'imagecopyresampled' => 'gd/gd.php',
'imagecopyresized' => 'gd/gd.php',
'imagecreate' => 'gd/gd.php',
+ 'imagecreatefromavif' => 'gd/gd.php',
'imagecreatefrombmp' => 'gd/gd.php',
'imagecreatefromgd' => 'gd/gd.php',
'imagecreatefromgd2' => 'gd/gd.php',
From de420f6463dbf431e7fa1c187ac8d31ceaa74ea9 Mon Sep 17 00:00:00 2001
From: Ivan Fedorov
* $redis->connect('127.0.0.1', 6379);
@@ -155,6 +157,8 @@ public function connect(
* @param float $readTimeout value in seconds (optional, default is 0 meaning unlimited)
*
* @return bool TRUE on success, FALSE on error
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->connect(%parametersList%)')]
public function open(
@@ -170,6 +174,8 @@ public function open(
* A method to determine if a phpredis object thinks it's connected to a server
*
* @return bool Returns TRUE if phpredis thinks it's connected and FALSE if not
+ *
+ * @throws RedisException
*/
public function isConnected() {}
@@ -177,6 +183,8 @@ public function isConnected() {}
* Retrieve our host or unix socket that we're connected to
*
* @return string|false The host or unix socket we're connected to or FALSE if we're not connected
+ *
+ * @throws RedisException
*/
public function getHost() {}
@@ -184,6 +192,8 @@ public function getHost() {}
* Get the port we're connected to
*
* @return int|false Returns the port we're connected to or FALSE if we're not connected
+ *
+ * @throws RedisException
*/
public function getPort() {}
@@ -192,6 +202,8 @@ public function getPort() {}
*
* @return int|bool Returns the database number (int) phpredis thinks it's pointing to
* or FALSE if we're not connected
+ *
+ * @throws RedisException
*/
public function getDbNum() {}
@@ -199,6 +211,8 @@ public function getDbNum() {}
* Get the (write) timeout in use for phpredis
*
* @return float|false The timeout (DOUBLE) specified in our connect call or FALSE if we're not connected
+ *
+ * @throws RedisException
*/
public function getTimeout() {}
@@ -207,6 +221,8 @@ public function getTimeout() {}
*
* @return float|bool Returns the read timeout (which can be set using setOption and Redis::OPT_READ_TIMEOUT)
* or FALSE if we're not connected
+ *
+ * @throws RedisException
*/
public function getReadTimeout() {}
@@ -217,6 +233,8 @@ public function getReadTimeout() {}
* (which will only be set if connected with pconnect),
* NULL if we're not using a persistent ID,
* and FALSE if we're not connected
+ *
+ * @throws RedisException
*/
public function getPersistentID() {}
@@ -225,6 +243,8 @@ public function getPersistentID() {}
*
* @return string|null|bool Returns the password used to authenticate a phpredis session or NULL if none was used,
* and FALSE if we're not connected
+ *
+ * @throws RedisException
*/
public function getAuth() {}
@@ -250,6 +270,8 @@ public function getAuth() {}
*
* @return bool TRUE on success, FALSE on ertcnror.
*
+ * @throws RedisException
+ *
* @example
*
* $redis->pconnect('127.0.0.1', 6379);
@@ -285,6 +307,8 @@ public function pconnect(
* @param float $readTimeout
*
* @return bool
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->pconnect(%parametersList%)')]
public function popen(
@@ -304,6 +328,8 @@ public function popen(
* @since >= 4.2 Closing a persistent connection requires PhpRedis
*
* @return bool TRUE on success, FALSE on error
+ *
+ * @throws RedisException
*/
public function close() {}
@@ -317,6 +343,8 @@ public function close() {}
*
* @return bool TRUE on success and FALSE on failure
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/swapdb
* @since >= 4.0
* @example
@@ -335,6 +363,8 @@ public function swapdb(int $db1, int $db2) {}
*
* @return bool TRUE on success, FALSE on error
*
+ * @throws RedisException
+ *
* @example
*
* $redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_NONE); // don't serialize data
@@ -363,6 +393,8 @@ public function setOption($option, $value) {}
*
* @return mixed|null Parameter value
*
+ * @throws RedisException
+ *
* @see setOption()
* @example
* // return option value
@@ -389,6 +421,8 @@ public function ping($message = null) {}
*
* @return string|Redis Returns message or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/echo
*/
public function echo($message) {}
@@ -401,6 +435,8 @@ public function echo($message) {}
* @return string|mixed|false|Redis If key didn't exist, FALSE is returned or Redis if in multi mode
* Otherwise, the value related to this key is returned
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/get
* @example
*
@@ -451,6 +487,8 @@ public function get($key) {}
*
* @return bool|Redis TRUE if the command is successful or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/set
*/
public function set($key, $value, $timeout = null) {}
@@ -464,6 +502,8 @@ public function set($key, $value, $timeout = null) {}
*
* @return bool|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/setex
* @example $redis->setex('key', 3600, 'value'); // sets key → value, with 1h TTL.
*/
@@ -479,6 +519,8 @@ public function setex($key, $expire, $value) {}
*
* @return bool|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/psetex
* @example $redis->psetex('key', 1000, 'value'); // sets key → value, with 1sec TTL.
*/
@@ -492,6 +534,8 @@ public function psetex($key, $expire, $value) {}
*
* @return bool|array|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/setnx
* @example
*
@@ -509,6 +553,8 @@ public function setnx($key, $value) {}
*
* @return int|Redis Number of keys deleted or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/del
* @example
*
@@ -529,6 +575,8 @@ public function del($key1, ...$otherKeys) {}
* @param string $key3
*
* @return int|Redis Number of keys deleted or Redis if in multi mode
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: "%class%->del(%parametersList%)")]
public function delete($key1, $key2 = null, $key3 = null) {}
@@ -543,6 +591,8 @@ public function delete($key1, $key2 = null, $key3 = null) {}
*
* @return int|Redis Number of keys unlinked or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/unlink
* @example
*
@@ -568,6 +618,8 @@ public function unlink($key1, $key2 = null, $key3 = null) {}
* @return static|Redis returns the Redis instance and enters multi-mode or Redis if in multi mode
* Once in multi-mode, all subsequent method calls return the same object until exec() is called.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/multi
* @example
*
@@ -595,6 +647,8 @@ public function multi($mode = Redis::MULTI) {}
* Pay attention, that Pipeline is not a transaction, so you can get unexpected
* results in case of big pipelines and small read/write timeouts.
*
+ * @throws RedisException
+ *
* @link https://redis.io/topics/pipelining
* @example
*
@@ -619,12 +673,16 @@ public function pipeline() {}
/**
* @return void|array|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @see multi()
* @link https://redis.io/commands/exec
*/
public function exec() {}
/**
+ * @throws RedisException
+ *
* @see multi()
* @link https://redis.io/commands/discard
*/
@@ -637,6 +695,8 @@ public function discard() {}
*
* @return void|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/watch
* @example
*
@@ -651,6 +711,8 @@ public function discard() {}
public function watch($key) {}
/**
+ * @throws RedisException
+ *
* @see watch()
* @link https://redis.io/commands/unwatch
*/
@@ -667,6 +729,8 @@ public function unwatch() {}
*
* @return mixed|null|Redis Any non-null return value in the callback will be returned to the caller or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/subscribe
* @example
*
@@ -699,6 +763,8 @@ public function subscribe($channels, $callback) {}
* The callback will get four arguments ($redis, $pattern, $channel, $message)
* @return mixed|Redis Any non-null return value in the callback will be returned to the caller or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/psubscribe
* @example
*
@@ -721,6 +787,8 @@ public function psubscribe($patterns, $callback) {}
*
* @return int|Redis Number of clients that received the message or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/publish
* @example $redis->publish('chan-1', 'hello, world!'); // send message.
*/
@@ -740,6 +808,8 @@ public function publish($channel, $message) {}
* values are their counts.
* - numpat Integer return containing the number active pattern subscriptions
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/pubsub
* @example
*
@@ -756,6 +826,8 @@ public function pubsub($keyword, $argument) {}
*
* @param array $channels an array of channels to usubscribe
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/unsubscribe
*/
public function unsubscribe($channels = null) {}
@@ -765,6 +837,8 @@ public function unsubscribe($channels = null) {}
*
* @param array $patterns an array of glob-style patterns to unsubscribe
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/punsubscribe
*/
public function punsubscribe($patterns = null) {}
@@ -780,6 +854,8 @@ public function punsubscribe($patterns = null) {}
*
* @return int|bool|Redis The number of keys tested that do exist or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/exists
* @link https://github.com/phpredis/phpredis#exists
* @example
@@ -801,6 +877,8 @@ public function exists($key) {}
*
* @return int|Redis the new value or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/incr
* @example
*
@@ -820,6 +898,8 @@ public function incr($key) {}
*
* @return float|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/incrbyfloat
* @example
*
@@ -839,6 +919,8 @@ public function incrByFloat($key, $increment) {}
*
* @return int|Redis the new value or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/incrby
* @example
*
@@ -858,6 +940,8 @@ public function incrBy($key, $value) {}
*
* @return int|Redis the new value or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/decr
* @example
*
@@ -877,6 +961,8 @@ public function decr($key) {}
*
* @return int|Redis the new value or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/decrby
* @example
*
@@ -898,6 +984,8 @@ public function decrBy($key, $value) {}
*
* @return int|false|Redis The new length of the list in case of success, FALSE in case of Failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/lpush
* @example
*
@@ -924,6 +1012,8 @@ public function lPush($key, ...$value1) {}
*
* @return int|false|Redis The new length of the list in case of success, FALSE in case of Failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/rpush
* @example
*
@@ -948,6 +1038,8 @@ public function rPush($key, ...$value1) {}
*
* @return int|false|Redis The new length of the list in case of success, FALSE in case of Failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/lpushx
* @example
*
@@ -969,6 +1061,8 @@ public function lPushx($key, $value) {}
*
* @return int|false|Redis The new length of the list in case of success, FALSE in case of Failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/rpushx
* @example
*
@@ -989,6 +1083,8 @@ public function rPushx($key, $value) {}
*
* @return mixed|bool|Redis if command executed successfully BOOL FALSE in case of failure (empty list) or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/lpop
* @example
*
@@ -1007,6 +1103,8 @@ public function lPop($key) {}
*
* @return mixed|bool|Redis if command executed successfully BOOL FALSE in case of failure (empty list) or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/rpop
* @example
*
@@ -1029,6 +1127,8 @@ public function rPop($key) {}
*
* @return array|Redis ['listName', 'element'] or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/blpop
* @example
*
@@ -1072,6 +1172,8 @@ public function blPop($keys, $timeout) {}
*
* @return array|Redis ['listName', 'element'] or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/brpop
* @example
*
@@ -1112,6 +1214,8 @@ public function brPop(array $keys, $timeout) {}
* @return int|bool|Redis The size of the list identified by Key exists or Redis if in multi mode
* bool FALSE if the data type identified by Key is not list
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/llen
* @example
*
@@ -1131,6 +1235,8 @@ public function lLen($key) {}
* @param string $key
*
* @return int|Redis The size of the list identified by Key exists or Redis if in multi mode
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->lLen(%parametersList%)')]
public function lSize($key) {}
@@ -1145,6 +1251,8 @@ public function lSize($key) {}
*
* @return mixed|bool|Redis the element at this index or Redis if in multi mode
*
+ * @throws RedisException
+ *
* Bool FALSE if the key identifies a non-string data type, or no value corresponds to this index in the list Key.
*
* @link https://redis.io/commands/lindex
@@ -1166,6 +1274,8 @@ public function lIndex($key, $index) {}
* @param string $key
* @param int $index
* @return mixed|bool|Redis the element at this index or Redis if in multi mode
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->lIndex(%parametersList%)')]
public function lGet($key, $index) {}
@@ -1180,6 +1290,8 @@ public function lGet($key, $index) {}
* @return bool|Redis TRUE if the new value is setted or Redis if in multi mode
* FALSE if the index is out of range, or data type identified by key is not a list.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/lset
* @example
*
@@ -1204,6 +1316,8 @@ public function lSet($key, $index, $value) {}
*
* @return array|Redis containing the values in specified range or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/lrange
* @example
*
@@ -1222,6 +1336,8 @@ public function lRange($key, $start, $end) {}
* @param int $start
* @param int $end
* @return array|Redis returns Redis if in multi mode
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->lRange(%parametersList%)')]
public function lGetRange($key, $start, $end) {}
@@ -1235,6 +1351,8 @@ public function lGetRange($key, $start, $end) {}
*
* @return array|false|Redis Bool return FALSE if the key identify a non-list value or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/ltrim
* @example
*
@@ -1254,6 +1372,8 @@ public function lTrim($key, $start, $stop) {}
* @param string $key
* @param int $start
* @param int $stop
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->lTrim(%parametersList%)')]
public function listTrim($key, $start, $stop) {}
@@ -1270,6 +1390,8 @@ public function listTrim($key, $start, $stop) {}
* @return int|bool|Redis the number of elements to remove or Redis if in multi mode
* bool FALSE if the value identified by key is not a list.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/lrem
* @example
*
@@ -1292,6 +1414,8 @@ public function lRem($key, $value, $count) {}
* @param string $key
* @param string $value
* @param int $count
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->lRem(%parametersList%)')]
public function lRemove($key, $value, $count) {}
@@ -1308,6 +1432,8 @@ public function lRemove($key, $value, $count) {}
*
* @return int|Redis The number of the elements in the list, -1 if the pivot didn't exists or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/linsert
* @example
*
@@ -1338,6 +1464,8 @@ public function lInsert($key, $position, $pivot, $value) {}
* @return int|bool|Redis The number of elements added to the set or Redis if in multi mode
* If this value is already in the set, FALSE is returned
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/sadd
* @example
*
@@ -1355,6 +1483,8 @@ public function sAdd($key, ...$value1) {}
*
* @return int|Redis The number of elements removed from the set or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/srem
* @example
*
@@ -1374,6 +1504,8 @@ public function sRem($key, ...$member1) {}
*
* @param string $key
* @param string|mixed ...$member1
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->sRem(%parametersList%)')]
public function sRemove($key, ...$member1) {}
@@ -1388,6 +1520,8 @@ public function sRemove($key, ...$member1) {}
* @return bool|Redis If the operation is successful, return TRUE or Redis if in multi mode
* If the srcKey and/or dstKey didn't exist, and/or the member didn't exist in srcKey, FALSE is returned.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/smove
* @example
*
@@ -1410,6 +1544,8 @@ public function sMove($srcKey, $dstKey, $member) {}
*
* @return bool|Redis TRUE if value is a member of the set at key key, FALSE otherwise or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/sismember
* @example
*
@@ -1428,6 +1564,8 @@ public function sIsMember($key, $value) {}
*
* @param string $key
* @param string|mixed $value
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->sIsMember(%parametersList%)')]
public function sContains($key, $value) {}
@@ -1439,6 +1577,8 @@ public function sContains($key, $value) {}
*
* @return int|Redis the cardinality of the set identified by key, 0 if the set doesn't exist or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/scard
* @example
*
@@ -1460,6 +1600,8 @@ public function sCard($key) {}
* @return string|mixed|array|bool|Redis "popped" values or Redis if in multi mode
* bool FALSE if set identified by key is empty or doesn't exist.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/spop
* @example
*
@@ -1491,6 +1633,8 @@ public function sPop($key, $count = 1) {}
* @return string|mixed|array|bool|Redis value(s) from the set or Redis if in multi mode
* bool FALSE if set identified by key is empty or doesn't exist and count argument isn't passed.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/srandmember
* @example
*
@@ -1523,6 +1667,8 @@ public function sRandMember($key, $count = 1) {}
* @return array|false|Redis contain the result of the intersection between those keys or Redis if in multi mode
* If the intersection between the different sets is empty, the return value will be empty array.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/sinter
* @example
*
@@ -1558,6 +1704,8 @@ public function sInter($key1, ...$otherKeys) {}
*
* @return int|false|Redis The cardinality of the resulting set, or FALSE in case of a missing key or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/sinterstore
* @example
*
@@ -1595,6 +1743,8 @@ public function sInterStore($dstKey, $key1, ...$otherKeys) {}
*
* @return array|Redis string[] The union of all these sets or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/sunionstore
* @example
*
@@ -1630,6 +1780,8 @@ public function sUnion($key1, ...$otherKeys) {}
*
* @return int|Redis Any number of keys corresponding to sets in redis or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/sunionstore
* @example
*
@@ -1668,6 +1820,8 @@ public function sUnionStore($dstKey, $key1, ...$otherKeys) {}
*
* @return array|Redis string[] The difference of the first set will all the others or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/sdiff
* @example
*
@@ -1702,6 +1856,8 @@ public function sDiff($key1, ...$otherKeys) {}
*
* @return int|false|Redis The cardinality of the resulting set, or FALSE in case of a missing key or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/sdiffstore
* @example
*
@@ -1736,6 +1892,8 @@ public function sDiffStore($dstKey, $key1, ...$otherKeys) {}
*
* @return array|Redis An array of elements, the contents of the set or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/smembers
* @example
*
@@ -1764,6 +1922,8 @@ public function sMembers($key) {}
*
* @param string $key
* @return array|Redis An array of elements, the contents of the set or Redis if in multi mode
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->sMembers(%parametersList%)')]
public function sGetMembers($key) {}
@@ -1778,6 +1938,8 @@ public function sGetMembers($key) {}
*
* @return array|false|Redis PHPRedis will return an array of keys or FALSE when we're done iterating or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/sscan
* @example
*
@@ -1799,6 +1961,8 @@ public function sScan($key, &$iterator, $pattern = null, $count = 0) {}
*
* @return string|mixed|Redis A string (mixed, if used serializer), the previous value located at this key or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/getset
* @example
*
@@ -1814,6 +1978,8 @@ public function getSet($key, $value) {}
*
* @return string|Redis an existing key in redis or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/randomkey
* @example
*
@@ -1830,6 +1996,8 @@ public function randomKey() {}
*
* @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/select
* @example
*
@@ -1850,6 +2018,8 @@ public function select($dbIndex) {}
*
* @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/move
* @example
*
@@ -1870,6 +2040,8 @@ public function move($key, $dbIndex) {}
*
* @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/rename
* @example
*
@@ -1886,6 +2058,8 @@ public function rename($srcKey, $dstKey) {}
*
* @param string $srcKey
* @param string $dstKey
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->rename(%parametersList%)')]
public function renameKey($srcKey, $dstKey) {}
@@ -1901,6 +2075,8 @@ public function renameKey($srcKey, $dstKey) {}
*
* @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/renamenx
* @example
*
@@ -1920,6 +2096,8 @@ public function renameNx($srcKey, $dstKey) {}
*
* @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/expire
* @example
*
@@ -1939,6 +2117,8 @@ public function expire($key, $ttl) {}
*
* @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/pexpire
* @example
*
@@ -1956,6 +2136,8 @@ public function pExpire($key, $ttl) {}
* @param string $key
* @param int $ttl
* @return bool|Redis returns Redis if in multi mode
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->expire(%parametersList%)')]
public function setTimeout($key, $ttl) {}
@@ -1968,6 +2150,8 @@ public function setTimeout($key, $ttl) {}
*
* @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/expireat
* @example
*
@@ -1988,6 +2172,8 @@ public function expireAt($key, $timestamp) {}
*
* @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/pexpireat
* @example
*
@@ -2006,6 +2192,8 @@ public function pExpireAt($key, $timestamp) {}
*
* @return array|Redis string[] The keys that match a certain pattern or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/keys
* @example
*
@@ -2017,6 +2205,8 @@ public function keys($pattern) {}
/**
* @param string $pattern
+ *
+ * @throws RedisException
* @link https://redis.io/commands/keys
*/
#[Deprecated(replacement: '%class%->keys(%parametersList%)')]
@@ -2027,6 +2217,8 @@ public function getKeys($pattern) {}
*
* @return int|Redis DB size, in number of keys or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/dbsize
* @example
*
@@ -2044,6 +2236,8 @@ public function dbSize() {}
*
* @return bool|Redis TRUE if the connection is authenticated, FALSE otherwise or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/auth
* @example $redis->auth('foobared');
*/
@@ -2054,6 +2248,8 @@ public function auth($password) {}
*
* @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/bgrewriteaof
* @example $redis->bgrewriteaof();
*/
@@ -2068,6 +2264,8 @@ public function bgrewriteaof() {}
*
* @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/slaveof
* @example
*
@@ -2089,6 +2287,8 @@ public function slaveof($host = '127.0.0.1', $port = 6379) {}
* - SLOGLOG LEN: Integer, the length of the slowLog
* - SLOWLOG RESET: Boolean, depending on success
*
+ * @throws RedisException
+ *
* @example
*
* // Get ten slowLog entries
@@ -2120,6 +2320,8 @@ public function slowLog(string $operation, int $length = null) {}
*
* @return string|int|false|Redis for "encoding", int for "refcount" and "idletime", FALSE if the key doesn't exist or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/object
* @example
*
@@ -2137,6 +2339,8 @@ public function object($string = '', $key = '') {}
* @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multi mode
* If a save is already running, this command will fail and return FALSE.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/save
* @example $redis->save();
*/
@@ -2148,6 +2352,8 @@ public function save() {}
* @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multi mode
* If a save is already running, this command will fail and return FALSE
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/bgsave
* @example $redis->bgSave();
*/
@@ -2158,6 +2364,8 @@ public function bgsave() {}
*
* @return int|Redis timestamp or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/lastsave
* @example $redis->lastSave();
*/
@@ -2173,6 +2381,8 @@ public function lastSave() {}
* @return int|Redis The command returns the number of slaves reached by all the writes performed in the or Redis if in multi mode
* context of the current connection
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/wait
* @example $redis->wait(2, 1000);
*/
@@ -2193,6 +2403,8 @@ public function wait($numSlaves, $timeout) {}
* - hash: Redis::REDIS_HASH
* - other: Redis::REDIS_NOT_FOUND
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/type
* @example $redis->type('key');
*/
@@ -2206,6 +2418,8 @@ public function type($key) {}
*
* @return int|Redis Size of the value after the append or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/append
* @example
*
@@ -2225,6 +2439,8 @@ public function append($key, $value) {}
*
* @return string|Redis the substring or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/getrange
* @example
*
@@ -2241,6 +2457,8 @@ public function getRange($key, $start, $end) {}
* @param string $key
* @param int $start
* @param int $end
+ *
+ * @throws RedisException
*/
#[Deprecated]
public function substr($key, $start, $end) {}
@@ -2254,6 +2472,8 @@ public function substr($key, $start, $end) {}
*
* @return int|Redis the length of the string after it was modified or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/setrange
* @example
*
@@ -2270,6 +2490,8 @@ public function setRange($key, $offset, $value) {}
* @param string $key
* @return int|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/strlen
* @example
*
@@ -2300,6 +2522,8 @@ public function strlen($key) {}
* specify a range with both start and end. If no clear bit is found in the specified range, the
* function returns -1 as the user specified a clear range and there are no 0 bits in that range.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/bitpos
* @example
*
@@ -2322,6 +2546,8 @@ public function bitpos($key, $bit, $start = 0, $end = null) {}
*
* @return int|Redis the bit value (0 or 1) or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/getbit
* @example
*
@@ -2341,6 +2567,8 @@ public function getBit($key, $offset) {}
*
* @return int|Redis 0 or 1, the value of the bit before it was set or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/setbit
* @example
*
@@ -2359,6 +2587,8 @@ public function setBit($key, $offset, $value) {}
*
* @return int|Redis The number of bits set to 1 in the value behind the input key or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/bitcount
* @example
*
@@ -2381,6 +2611,8 @@ public function bitCount($key) {}
*
* @return int|Redis The size of the string stored in the destination key or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/bitop
* @example
*
@@ -2399,6 +2631,7 @@ public function bitOp($operation, $retKey, $key1, ...$otherKeys) {}
* Removes all entries from the current database.
*
* @return bool|Redis Always TRUE or Redis if in multi mode
+ * @throws RedisException
* @link https://redis.io/commands/flushdb
* @example $redis->flushDB();
*/
@@ -2409,6 +2642,8 @@ public function flushDB() {}
*
* @return bool|Redis Always TRUE or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/flushall
* @example $redis->flushAll();
*/
@@ -2429,6 +2664,8 @@ public function flushAll() {}
* @return array|Redis returns Redis if in multi mode
* An array of values, or a number corresponding to the number of elements stored if that was used
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/sort
* @example
*
@@ -2498,6 +2735,8 @@ public function sort($key, $option = null) {}
*
* @return array|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/info
* @example
*
@@ -2516,6 +2755,8 @@ public function info($option = null) {}
*
* @return array|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/role
* @example
*
@@ -2535,6 +2776,8 @@ public function role() {}
*
* @return bool|Redis `TRUE` in case of success, `FALSE` in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @example $redis->resetStat();
* @link https://redis.io/commands/config-resetstat
*/
@@ -2547,6 +2790,8 @@ public function resetStat() {}
*
* @return int|bool|Redis the time left to live in seconds or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/ttl
* @example
*
@@ -2565,6 +2810,8 @@ public function ttl($key) {}
*
* @return int|bool|Redis the time left to live in milliseconds or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/pttl
* @example
*
@@ -2581,6 +2828,8 @@ public function pttl($key) {}
*
* @return bool|Redis TRUE if a timeout was removed, FALSE if the key didn’t exist or didn’t have an expiration timer or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/persist
* @example $redis->persist('key');
*/
@@ -2594,6 +2843,8 @@ public function persist($key) {}
*
* @return bool|Redis TRUE in case of success, FALSE in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/mset
* @example
*
@@ -2615,6 +2866,8 @@ public function mset(array $array) {}
*
* @return array|Redis Array containing the values related to keys in argument or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @example
*
* $redis->set('key1', 'value1');
@@ -2637,6 +2890,8 @@ public function getMultiple(array $keys) {}
*
* @return array|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/mget
* @example
*
@@ -2660,6 +2915,8 @@ public function mGet(array $array) {}
* @param array $array
* @return int|Redis 1 (if the keys were set) or 0 (no key was set) or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/msetnx
*/
public function msetnx(array $array) {}
@@ -2675,6 +2932,8 @@ public function msetnx(array $array) {}
*
* @return string|mixed|false|Redis The element that was moved in case of success, FALSE in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/rpoplpush
* @example
*
@@ -2718,6 +2977,8 @@ public function rPopLPush($srcKey, $dstKey) {}
*
* @return string|mixed|bool|Redis The element that was moved in case of success, FALSE in case of timeout or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/brpoplpush
*/
public function bRPopLPush($srcKey, $dstKey, $timeout) {}
@@ -2736,6 +2997,8 @@ public function bRPopLPush($srcKey, $dstKey, $timeout) {}
*
* @return int|Redis Number of values added or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zadd
* @example
*
@@ -2781,6 +3044,8 @@ public function zAdd($key, $options, $score1, $value1 = null, $score2 = null, $v
*
* @return array|Redis Array containing the values in specified range or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zrange
* @example
*
@@ -2803,6 +3068,8 @@ public function zRange($key, $start, $end, $withscores = null) {}
*
* @return int|Redis Number of deleted values or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zrem
* @example
*
@@ -2826,6 +3093,8 @@ public function zRem($key, $member1, ...$otherMembers) {}
* @param string|mixed ...$otherMembers
*
* @return int|Redis Number of deleted values or Redis if in multi mode
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->zRem(%parametersList%)')]
public function zDelete($key, $member1, ...$otherMembers) {}
@@ -2845,6 +3114,8 @@ public function zDelete($key, $member1, ...$otherMembers) {}
*
* @return array|Redis Array containing the values in specified range or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zrevrange
* @example
*
@@ -2875,6 +3146,8 @@ public function zRevRange($key, $start, $end, $withscore = null) {}
*
* @return array|Redis Array containing the values in specified range or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zrangebyscore
* @example
*
@@ -2897,6 +3170,8 @@ public function zRangeByScore($key, $start, $end, array $options = []) {}
* @param array $options
*
* @return array|Redis returns Redis if in multi mode
+ *
+ * @throws RedisException
*/
public function zRevRangeByScore($key, $start, $end, array $options = []) {}
@@ -2914,6 +3189,8 @@ public function zRevRangeByScore($key, $start, $end, array $options = []) {}
*
* @return array|false|Redis Array containing the values in the specified range or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zrangebylex
* @example
*
@@ -2938,6 +3215,8 @@ public function zRangeByLex($key, $min, $max, $offset = null, $limit = null) {}
*
* @return array|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zrevrangebylex
*/
public function zRevRangeByLex($key, $min, $max, $offset = null, $limit = null) {}
@@ -2953,6 +3232,8 @@ public function zRevRangeByLex($key, $min, $max, $offset = null, $limit = null)
*
* @return int|Redis the size of a corresponding zRangeByScore or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zcount
* @example
*
@@ -2973,6 +3254,8 @@ public function zCount($key, $start, $end) {}
*
* @return int|Redis The number of values deleted from the sorted set or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zremrangebyscore
* @example
*
@@ -2988,6 +3271,8 @@ public function zRemRangeByScore($key, $start, $end) {}
* @param string $key
* @param float $start
* @param float $end
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->zRemRangeByScore(%parametersList%)')]
public function zDeleteRangeByScore($key, $start, $end) {}
@@ -3001,6 +3286,8 @@ public function zDeleteRangeByScore($key, $start, $end) {}
*
* @return int|Redis The number of values deleted from the sorted set or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zremrangebyrank
* @example
*
@@ -3019,6 +3306,8 @@ public function zRemRangeByRank($key, $start, $end) {}
* @param string $key
* @param int $start
* @param int $end
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->zRemRangeByRank(%parametersList%)')]
public function zDeleteRangeByRank($key, $start, $end) {}
@@ -3030,6 +3319,8 @@ public function zDeleteRangeByRank($key, $start, $end) {}
*
* @return int|Redis the set's cardinality or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zsize
* @example
*
@@ -3044,6 +3335,8 @@ public function zCard($key) {}
/**
* @param string $key
* @return int|Redis returns Redis if in multi mode
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->zCard(%parametersList%)')]
public function zSize($key) {}
@@ -3056,6 +3349,8 @@ public function zSize($key) {}
*
* @return float|bool|Redis false if member or key not exists or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zscore
* @example
*
@@ -3074,6 +3369,8 @@ public function zScore($key, $member) {}
*
* @return int|false|Redis the item's score, or false if key or member is not exists or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zrank
* @example
*
@@ -3095,6 +3392,8 @@ public function zRank($key, $member) {}
*
* @return int|false|Redis the item's score, false - if key or member is not exists or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zrevrank
*/
public function zRevRank($key, $member) {}
@@ -3108,6 +3407,8 @@ public function zRevRank($key, $member) {}
*
* @return float|Redis the new value or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zincrby
* @example
*
@@ -3135,6 +3436,8 @@ public function zIncrBy($key, $value, $member) {}
*
* @return int|Redis The number of values in the new sorted set or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zunionstore
* @example
*
@@ -3165,6 +3468,8 @@ public function zUnionStore($output, $zSetKeys, ?array $weights = null, $aggrega
* @param array $ZSetKeys
* @param array|null $Weights
* @param string $aggregateFunction
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->zUnionStore(%parametersList%)')]
public function zUnion($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') {}
@@ -3185,6 +3490,8 @@ public function zUnion($Output, $ZSetKeys, array $Weights = null, $aggregateFunc
*
* @return int|Redis The number of values in the new sorted set or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zinterstore
* @example
*
@@ -3219,6 +3526,7 @@ public function zInterStore($output, $zSetKeys, array $weights = null, $aggregat
* @param $ZSetKeys
* @param array|null $Weights
* @param string $aggregateFunction
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->zInterStore(%parametersList%)')]
public function zInter($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') {}
@@ -3233,6 +3541,8 @@ public function zInter($Output, $ZSetKeys, array $Weights = null, $aggregateFunc
*
* @return array|false|Redis PHPRedis will return matching keys from Redis, or FALSE when iteration is complete or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/zscan
* @example
*
@@ -3257,6 +3567,8 @@ public function zScan($key, &$iterator, $pattern = null, $count = 0) {}
* @return array|Redis Either an array with the key member and score of the highest or lowest element or an empty array or Redis if in multi mode
* if the timeout was reached without an element to pop.
*
+ * @throws RedisException
+ *
* @since >= 5.0
* @link https://redis.io/commands/bzpopmax
* @example
@@ -3280,6 +3592,8 @@ public function bzPopMax($key1, $key2, $timeout) {}
* @return array|Redis Either an array with the key member and score of the highest or lowest element or an empty array or Redis if in multi mode
* if the timeout was reached without an element to pop.
*
+ * @throws RedisException
+ *
* @see bzPopMax
* @since >= 5.0
* @link https://redis.io/commands/bzpopmin
@@ -3295,6 +3609,8 @@ public function bzPopMin($key1, $key2, $timeout) {}
* @return array|Redis Either an array with the key member and score of the highest element or an empty array or Redis if in multi mode
* if there is no element to pop.
*
+ * @throws RedisException
+ *
* @since >= 5.0
* @link https://redis.io/commands/zpopmax
* @example
@@ -3316,6 +3632,8 @@ public function zPopMax($key, $count = 1) {}
* @return array|Redis Either an array with the key member and score of the lowest element or an empty array or Redis if in multi mode
* if there is no element to pop.
*
+ * @throws RedisException
+ *
* @since >= 5.0
* @link https://redis.io/commands/zpopmin
* @example
@@ -3339,6 +3657,8 @@ public function zPopMin($key, $count = 1) {}
* - 1 if value didn't exist and was added successfully,
* - 0 if the value was already present and was replaced, FALSE if there was an error.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hset
* @example
*
@@ -3361,6 +3681,8 @@ public function hSet($key, $hashKey, $value) {}
*
* @return bool|Redis TRUE if the field was set, FALSE if it was already present or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hsetnx
* @example
*
@@ -3381,6 +3703,8 @@ public function hSetNx($key, $hashKey, $value) {}
*
* @return string|false|Redis The value, if the command executed successfully BOOL FALSE in case of failure or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hget
*/
public function hGet($key, $hashKey) {}
@@ -3392,6 +3716,8 @@ public function hGet($key, $hashKey) {}
*
* @return int|false|Redis the number of items in a hash, FALSE if the key doesn't exist or isn't a hash or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hlen
* @example
*
@@ -3413,6 +3739,8 @@ public function hLen($key) {}
*
* @return int|bool|Redis Number of deleted fields or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hdel
* @example
*
@@ -3443,6 +3771,8 @@ public function hDel($key, $hashKey1, ...$otherHashKeys) {}
*
* @return array|Redis An array of elements, the keys of the hash. This works like PHP's array_keys() or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hkeys
* @example
*
@@ -3476,6 +3806,8 @@ public function hKeys($key) {}
*
* @return array|Redis An array of elements, the values of the hash. This works like PHP's array_values() or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hvals
* @example
*
@@ -3509,6 +3841,8 @@ public function hVals($key) {}
*
* @return array|Redis An array of elements, the contents of the hash or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hgetall
* @example
*
@@ -3543,6 +3877,8 @@ public function hGetAll($key) {}
*
* @return bool|Redis If the member exists in the hash table, return TRUE, otherwise return FALSE or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hexists
* @example
*
@@ -3562,6 +3898,8 @@ public function hExists($key, $hashKey) {}
*
* @return int|Redis the new value or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hincrby
* @example
*
@@ -3581,6 +3919,8 @@ public function hIncrBy($key, $hashKey, $value) {}
*
* @return float|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hincrbyfloat
* @example
*
@@ -3612,6 +3952,8 @@ public function hIncrByFloat($key, $field, $increment) {}
*
* @return bool|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hmset
* @example
*
@@ -3631,6 +3973,8 @@ public function hMSet($key, $hashKeys) {}
* @return array|Redis Array An array of elements, the values of the specified fields in the hash, or Redis if in multi mode
* with the hash keys as array keys.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hmget
* @example
*
@@ -3652,6 +3996,8 @@ public function hMGet($key, $hashKeys) {}
*
* @return array|Redis An array of members that match our pattern or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hscan
* @example
*
@@ -3674,6 +4020,8 @@ public function hScan($key, &$iterator, $pattern = null, $count = 0) {}
* @return int|Redis the string length of the value associated with field, or zero when field is not present in the hash or Redis if in multi mode
* or key does not exist at all.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/hstrlen
* @since >= 3.2
*/
@@ -3690,6 +4038,8 @@ public function hStrLen(string $key, string $field) {}
*
* @return int|Redis The number of elements added to the geospatial key or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/geoadd
* @since >= 3.2
*
@@ -3715,6 +4065,8 @@ public function geoAdd($key, $longitude, $latitude, $member) {}
*
* @return array|Redis One or more Redis Geohash encoded strings or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/geohash
* @since >= 3.2
*
@@ -3740,6 +4092,8 @@ public function geoHash($key, ...$member) {}
* @param string $member
* @return array|Redis One or more longitude/latitude positions or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/geopos
* @since >= 3.2
*
@@ -3780,6 +4134,8 @@ public function geoPos(string $key, string $member) {}
*
* @return float|Redis The distance between the two passed members in the units requested (meters by default) or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/geodist
* @since >= 3.2
*
@@ -3843,6 +4199,8 @@ public function geoDist($key, $member1, $member2, $unit = null) {}
* @return mixed|Redis When no STORE option is passed, this function returns an array of results or Redis if in multi mode
* If it is passed this function returns the number of stored entries.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/georadius
* @since >= 3.2
* @example
@@ -3927,6 +4285,8 @@ public function geoRadius($key, $longitude, $latitude, $radius, $unit, array $op
*
* @return array|Redis The zero or more entries that are close enough to the member given the distance and radius specified or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/georadiusbymember
* @since >= 3.2
* @see georadius
@@ -3964,6 +4324,8 @@ public function geoRadiusByMember($key, $member, $radius, $units, array $options
*
* @return array|Redis Associative array for `GET`, key -> value or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/config-get
* @example
*
@@ -3985,6 +4347,8 @@ public function config($operation, $key, $value) {}
* your LUA script. If there is an error executing the LUA script, the getLastError() function can tell you the
* message that came back from Redis (e.g. compile error).
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/eval
* @example
*
@@ -4005,6 +4369,8 @@ public function eval($script, $args = [], $numKeys = 0) {}
* @param array $args
* @param int $numKeys
* @return mixed|Redis @see eval() , returns Redis if in multi mode
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->eval(%parametersList%)')]
public function evaluate($script, $args = [], $numKeys = 0) {}
@@ -4020,6 +4386,8 @@ public function evaluate($script, $args = [], $numKeys = 0) {}
*
* @return mixed|Redis @see eval() , returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @see eval()
* @link https://redis.io/commands/evalsha
* @example
@@ -4035,6 +4403,8 @@ public function evalSha($scriptSha, $args = [], $numKeys = 0) {}
* @param string $scriptSha
* @param array $args
* @param int $numKeys
+ *
+ * @throws RedisException
*/
#[Deprecated(replacement: '%class%->evalSha(%parametersList%)')]
public function evaluateSha($scriptSha, $args = [], $numKeys = 0) {}
@@ -4046,6 +4416,8 @@ public function evaluateSha($scriptSha, $args = [], $numKeys = 0) {}
*
* @return mixed|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/script-load
* @link https://redis.io/commands/script-kill
* @link https://redis.io/commands/script-flush
@@ -4070,6 +4442,8 @@ public function script($command, $script) {}
*
* @return string|null A string with the last returned script based error message, or NULL if there is no error
*
+ * @throws RedisException
+ *
* @example
*
* $redis->eval('this-is-not-lua');
@@ -4084,6 +4458,8 @@ public function getLastError() {}
*
* @return bool true
*
+ * @throws RedisException
+ *
* @example
*
* $redis->set('x', 'a');
@@ -4113,6 +4489,8 @@ public function clearLastError() {}
* - CLIENT SETNAME will return true if it can be set and false if not
* - CLIENT KILL will return true if the client can be killed, and false if not
*
+ * @throws RedisException
+ *
* Note: phpredis will attempt to reconnect so you can actually kill your own connection but may not notice losing it!
*
* @link https://redis.io/commands/client-list
@@ -4138,6 +4516,8 @@ public function client($command, $value = '') {}
* @return string If a prefix is set up, the value now prefixed
* If there is no prefix, the value will be returned unchanged.
*
+ * @throws RedisException
+ *
* @example
*
* $redis->setOption(Redis::OPT_PREFIX, 'my-prefix:');
@@ -4192,6 +4572,8 @@ public function _serialize($value) {}
*
* @return string|false The Redis encoded value of the key, or FALSE if the key doesn't exist
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/dump
* @example
*
@@ -4210,6 +4592,8 @@ public function dump($key) {}
*
* @return bool
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/restore
* @example
*
@@ -4233,6 +4617,8 @@ public function restore($key, $ttl, $value) {}
*
* @return bool
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/migrate
* @example
*
@@ -4247,6 +4633,8 @@ public function migrate($host, $port, $key, $db, $timeout, $copy = false, $repla
* @return array If successful, the time will come back as an associative array with element zero being the
* unix timestamp, and element one being microseconds.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/time
* @example
*
@@ -4268,6 +4656,8 @@ public function time() {}
*
* @return array|false|Redis This function will return an array of keys or FALSE if there are no more keys or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/scan
* @example
*
@@ -4289,6 +4679,8 @@ public function scan(&$iterator, $pattern = null, $count = 0) {}
*
* @return bool|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/pfadd
* @example $redis->pfAdd('key', array('elem1', 'elem2'))
*/
@@ -4302,6 +4694,8 @@ public function pfAdd($key, array $elements) {}
*
* @return int|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/pfcount
* @example
*
@@ -4322,6 +4716,8 @@ public function pfCount($key) {}
*
* @return bool|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/pfmerge
* @example
*
@@ -4341,6 +4737,8 @@ public function pfMerge($destKey, array $sourceKeys) {}
*
* @return mixed|Redis returns Redis if in multi mode
*
+ * @throws RedisException
+ *
* @example
*
* $redis->rawCommand('SET', 'key', 'value'); // bool(true)
@@ -4354,6 +4752,8 @@ public function rawCommand($command, $arguments) {}
*
* @return int|Redis Either Redis::ATOMIC, Redis::MULTI or Redis::PIPELINE or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @example $redis->getMode();
*/
public function getMode() {}
@@ -4367,6 +4767,8 @@ public function getMode() {}
*
* @return int|Redis The number of messages Redis reports as acknowledged or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/xack
* @example
*
@@ -4386,6 +4788,8 @@ public function xAck($stream, $group, $messages) {}
*
* @return string|Redis The added message ID or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/xadd
* @example
*
@@ -4409,6 +4813,8 @@ public function xAdd($key, $id, $messages, $maxLen = 0, $isApproximate = false)
* @return array|Redis Either an array of message IDs along with corresponding data, or just an array of IDs or Redis if in multi mode
* (if the 'JUSTID' option was passed).
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/xclaim
* @example
*
@@ -4439,6 +4845,8 @@ public function xClaim($key, $group, $consumer, $minIdleTime, $ids, $options = [
*
* @return int|Redis The number of messages removed or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/xdel
* @example
*
@@ -4456,6 +4864,8 @@ public function xDel($key, $ids) {}
*
* @return mixed|Redis This command returns different types depending on the specific XGROUP command executed or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/xgroup
* @example
*
@@ -4475,6 +4885,8 @@ public function xGroup($operation, $key, $group, $msgId = '', $mkStream = false)
*
* @return mixed|Redis This command returns different types depending on which subcommand is used or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/xinfo
* @example
*
@@ -4490,6 +4902,8 @@ public function xInfo($operation, $stream, $group) {}
*
* @return int|Redis The number of messages in the stream or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/xlen
* @example
*
@@ -4511,6 +4925,8 @@ public function xLen($stream) {}
* @return array|Redis Information about the pending messages, in various forms depending on or Redis if in multi mode
* the specific invocation of XPENDING.
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/xpending
* @example
*
@@ -4530,6 +4946,8 @@ public function xPending($stream, $group, $start = null, $end = null, $count = n
*
* @return array|Redis The messages in the stream within the requested range or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/xrange
* @example
*
@@ -4550,6 +4968,8 @@ public function xRange($stream, $start, $end, $count = null) {}
*
* @return array|Redis The messages in the stream newer than the IDs passed to Redis (if any) or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/xread
* @example
*
@@ -4569,6 +4989,8 @@ public function xRead($streams, $count = null, $block = null) {}
*
* @return array|Redis The messages delivered to this consumer group (if any) or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/xreadgroup
* @example
*
@@ -4591,6 +5013,8 @@ public function xReadGroup($group, $consumer, $streams, $count = null, $block =
*
* @return array|Redis The messages in the range specified or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/xrevrange
* @example
*
@@ -4610,6 +5034,8 @@ public function xRevRange($stream, $end, $start, $count = null) {}
*
* @return int|Redis The number of messages trimed from the stream or Redis if in multi mode
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/xtrim
* @example
*
@@ -4630,6 +5056,8 @@ public function xTrim($stream, $maxLen, $isApproximate) {}
* @return int|bool|Redis The number of elements added to the set or Redis if in multi mode
* If this value is already in the set, FALSE is returned
*
+ * @throws RedisException
+ *
* @link https://redis.io/commands/sadd
* @link https://github.com/phpredis/phpredis/commit/3491b188e0022f75b938738f7542603c7aae9077
* @since phpredis 2.2.8
From 444c307b4498b8efc1019c92aac0db3dde81b30b Mon Sep 17 00:00:00 2001
From: Andrew Menino-Barlow
* Returns the actual size of the file (with compression) inside the Phar archive
* @link https://php.net/manual/en/pharfileinfo.getcompressedsize.php
- * @return int The size in bytes of the file within the Phar archive on disk.
+ * @return int<0, max> The size in bytes of the file within the Phar archive on disk.
*/
#[TentativeType]
public function getCompressedSize(): int {}
diff --git a/SPL/SPL.php b/SPL/SPL.php
index 856efaf04..ce905c2cd 100644
--- a/SPL/SPL.php
+++ b/SPL/SPL.php
@@ -1919,7 +1919,7 @@ public function getArrayCopy(): array {}
/**
* Count elements
* @link https://php.net/manual/en/arrayiterator.count.php
- * @return int The number of elements or public properties in the associated
+ * @return int<0,max> The number of elements or public properties in the associated
* array or object, respectively.
*/
#[TentativeType]
diff --git a/SPL/SPL_c1.php b/SPL/SPL_c1.php
index 54ac9cbef..696792111 100644
--- a/SPL/SPL_c1.php
+++ b/SPL/SPL_c1.php
@@ -586,7 +586,7 @@ public function __construct(
/**
* Get the number of directories and files
* @link https://php.net/manual/en/globiterator.count.php
- * @return int The number of returned directories and files, as an
+ * @return int<0,max> The number of returned directories and files, as an
* integer.
*/
#[TentativeType]
@@ -975,7 +975,7 @@ public function setMaxLineLen(#[LanguageLevelTypeAware(['8.0' => 'int'], default
/**
* Get maximum line length
* @link https://php.net/manual/en/splfileobject.getmaxlinelen.php
- * @return int the maximum line length if one has been set with
+ * @return int<0, max> the maximum line length if one has been set with
* SplFileObject::setMaxLineLen, default is 0.
*/
#[TentativeType]
diff --git a/SimpleXML/SimpleXML.php b/SimpleXML/SimpleXML.php
index 90a90458a..7781391dc 100644
--- a/SimpleXML/SimpleXML.php
+++ b/SimpleXML/SimpleXML.php
@@ -257,7 +257,7 @@ public function __toString(): string {}
/**
* Counts the children of an element
* @link https://php.net/manual/en/simplexmlelement.count.php
- * @return int the number of elements of an element.
+ * @return int<0,max> the number of elements of an element.
*/
#[Pure]
#[TentativeType]
diff --git a/bz2/bz2.php b/bz2/bz2.php
index 6b722182c..f469d9a26 100644
--- a/bz2/bz2.php
+++ b/bz2/bz2.php
@@ -28,7 +28,7 @@ function bzopen($file, string $mode) {}
* The file pointer. It must be valid and must point to a file
* successfully opened by bzopen.
*
+ * @param int<1024, 8192> $length [optional]
* If not specified, bzread will read 1024 * (uncompressed) bytes at a time. A maximum of 8192 * uncompressed bytes will be read at a time. diff --git a/dom/dom_c.php b/dom/dom_c.php index 9db0a1f57..9b1db4c07 100644 --- a/dom/dom_c.php +++ b/dom/dom_c.php @@ -1278,6 +1278,7 @@ class DOMNodeList implements IteratorAggregate, Countable public function item(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index) {} /** + * @return int<0, max> * @since 7.2 */ #[TentativeType] @@ -1367,7 +1368,7 @@ public function setNamedItemNS(DOMNode $arg) {} public function removeNamedItemNS($namespace, $localName) {} /** - * @return int + * @return int<0,max> * @since 7.2 */ #[TentativeType] diff --git a/hash/hash.php b/hash/hash.php index 592e4e73f..27e87e4dd 100644 --- a/hash/hash.php +++ b/hash/hash.php @@ -345,7 +345,7 @@ function mhash_get_hash_name(int $algo): string|false {} /** * Gets the highest available hash ID * @link https://php.net/manual/en/function.mhash-count.php - * @return int the highest available hash ID. Hashes are numbered from 0 to this + * @return int<0, max> the highest available hash ID. Hashes are numbered from 0 to this * hash ID. * @deprecated 8.1 */ diff --git a/iconv/iconv.php b/iconv/iconv.php index 229d102c2..78c928ce9 100644 --- a/iconv/iconv.php +++ b/iconv/iconv.php @@ -167,7 +167,7 @@ function iconv_substr(string $string, int $offset, ?int $length, ?string $encodi * string are assumed to be encoded in * iconv.internal_encoding. *
- * @return int|false the numeric position of the first occurrence of + * @return int<0,max>|false the numeric position of the first occurrence of * needle in haystack. *
* If needle is not found,
diff --git a/intl/intl.php b/intl/intl.php
index 25f028a1a..624a18ae6 100644
--- a/intl/intl.php
+++ b/intl/intl.php
@@ -2286,7 +2286,7 @@ public function get($index, #[TypeAware(['8.0' => 'bool'], default: '')] $fallba
* (PHP >= 5.3.2, PECL intl >= 2.0.0)
* Get number of elements in the bundle
* @link https://php.net/manual/en/resourcebundle.count.php
- * @return int number of elements in the bundle.
+ * @return int<0,max> number of elements in the bundle.
*/
#[Pure]
#[TentativeType]
diff --git a/mbstring/mbstring.php b/mbstring/mbstring.php
index a51a63b6d..1e6b79f16 100644
--- a/mbstring/mbstring.php
+++ b/mbstring/mbstring.php
@@ -267,11 +267,11 @@ function mb_strlen(string $string, #[LanguageLevelTypeAware(['8.0' => 'string|nu
* @param string $needle
* The position counted from the beginning of haystack. *
- * @param int $offset [optional]+ * @param int<0,max> $offset [optional]
* The search offset. If it is not specified, 0 is used. *
* @param string|null $encoding [optional] - * @return int|false the numeric position of + * @return int<0,max>|false the numeric position of * the first occurrence of needle in the * haystack string. If * needle is not found, it returns false. diff --git a/standard/standard_0.php b/standard/standard_0.php index ee2b0c385..0898fcc83 100644 --- a/standard/standard_0.php +++ b/standard/standard_0.php @@ -1300,7 +1300,7 @@ function strnatcasecmp(string $string1, string $string2): int {} * substring. It outputs a warning if the offset plus the length is * greater than the haystack length. * - * @return int This functions returns an integer. + * @return int<0,max> This functions returns an integer. */ #[Pure] function substr_count(string $haystack, string $needle, int $offset = 0, ?int $length): int {} diff --git a/standard/standard_1.php b/standard/standard_1.php index 8948469af..aa985650f 100644 --- a/standard/standard_1.php +++ b/standard/standard_1.php @@ -39,11 +39,11 @@ function strtolower(string $string): string {} * If needle is not a string, it is converted * to an integer and applied as the ordinal value of a character. * - * @param int $offset [optional]+ * @param int<0,max> $offset [optional]
* If specified, search will start this number of characters counted from * the beginning of the string. Unlike {@see strrpos()} and {@see strripos()}, the offset cannot be negative. *
- * @return int|false+ * @return int<0,max>|false
* Returns the position where the needle exists relative to the beginnning of * the haystack string (independent of search direction * or offset). diff --git a/standard/standard_8.php b/standard/standard_8.php index f69bb253c..3c481b943 100644 --- a/standard/standard_8.php +++ b/standard/standard_8.php @@ -623,7 +623,7 @@ function array_walk_recursive(object|array &$array, callable $callback, mixed $a * COUNT_RECURSIVE (or 1), count * will recursively count the array. This is particularly useful for * counting all the elements of a multidimensional array. count does not detect infinite recursion. - * @return int the number of elements in var, which is + * @return int<0,max> the number of elements in var, which is * typically an array, since anything else will have one * element. *
diff --git a/standard/standard_9.php b/standard/standard_9.php
index 7a63f5382..627909c55 100644
--- a/standard/standard_9.php
+++ b/standard/standard_9.php
@@ -852,7 +852,7 @@ function pos(object|array $array): mixed {}
* @link https://php.net/manual/en/function.sizeof.php
* @param array|Countable $value
* @param int $mode [optional]
- * @return int
+ * @return int<0, max>
*/
#[Pure]
function sizeof(Countable|array $value, int $mode = COUNT_NORMAL): int {}
From cf183e4fd3925ea1fba0b8cf3f785139e618fa3e Mon Sep 17 00:00:00 2001
From: Ivan Fedorov
+ * A callback function to set or remove. If set, this function will be called whenever a CTRL+C or CTRL+BREAK event occurs.
+ *
+ * The function is supposed to have the following signature:
+ * Setting a null handler causes the process to ignore CTRL+C events, but not CTRL+BREAK events.
+ *
- *
- * If enable is omitted, the function returns TRUE if the stream stream has VT100 control codes enabled, FALSE otherwise.
- *
- * If enable is specified, the function will try to enable or disable the VT100 features of the stream stream.
- * If the feature has been successfully enabled (or disabled), the function will return TRUE, or FALSE otherwise.
+ * @param resource $stream The stream on which the function will operate.
+ * @param bool|null $enable
+ * If bool, the VT100 feature will be enabled (if true) or disabled (if false).
+ *
+ * If enable is null, the function returns true if the stream stream has VT100 control codes enabled, false otherwise.
+ *
+ * If enable is a bool, the function will try to enable or disable the VT100 features of the stream stream.
+ * If the feature has been successfully enabled (or disabled), the function will return true, or false otherwise.
+ *
+ * If enable is null: returns true if the VT100 feature is enabled, false otherwise.
+ *
+ * If enable is a bool: Returns true on success or false on failure.
*
+ * `handler(int $event): void`
+ * `event` The CTRL event which has been received; either PHP_WINDOWS_EVENT_CTRL_C or PHP_WINDOWS_EVENT_CTRL_BREAK.
+ *
- * The function is supposed to have the following signature:
- * `handler(int $event): void`
+ * The function is supposed to have the following signature:
+ * `handler(int $event): void`
* `event` The CTRL event which has been received; either PHP_WINDOWS_EVENT_CTRL_C or PHP_WINDOWS_EVENT_CTRL_BREAK.
*
* Setting a null handler causes the process to ignore CTRL+C events, but not CTRL+BREAK events. *
- * @param bool $add [optional] If true, the handler is set. If false, the handler is removed. + * @param bool $add If true, the handler is set. If false, the handler is removed. * @return bool TRUE on success or FALSE on failure. * @since 7.4 */ From d104de1efa6b68ec2df45d69b709240c76048cd3 Mon Sep 17 00:00:00 2001 From: tianyiw+ * If kind is 'ansi', the current ANSI code page of the operating system is returned. + * If kind is 'oem', the current OEM code page of the operating system is returned. + * Otherwise, the current codepage of the process is returned. + *
* @since 7.1 */ -function sapi_windows_cp_get(string $kind): int {} +function sapi_windows_cp_get(string $kind = ""): int {} /** * Set process codepage - * @param int $cp - * @return bool + * @link https://php.net/manual/en/function.sapi-windows-cp-set + * @param int $codepage A codepage identifier. + * @return bool Returns true on success or false on failure. * @since 7.1 */ -function sapi_windows_cp_set(int $cp): bool {} +function sapi_windows_cp_set(int $codepage): bool {} /** * Convert string from one codepage to another - * @param int|string $in_codepage - * @param int|string $out_codepage - * @param string $subject - * @return string + * @link https://php.net/manual/en/function.sapi-windows-cp-conv.php + * @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|null The subject string converted to out_codepage, or null on failure. * @since 7.1 */ -function sapi_windows_cp_conv(int|string $in_codepage, int|string $out_codepage, string $subject): string {} +function sapi_windows_cp_conv(int|string $in_codepage, int|string $out_codepage, string $subject): ?string {} /** * Indicates whether the codepage is utf-8 compatible + * @link https://www.php.net/manual/en/function.sapi-windows-cp-is-utf8.php * @return bool * @since 7.1 */ From 0229d9d23f7a4c288b1bf5564718be655d88a3fd Mon Sep 17 00:00:00 2001 From: tianyiw- * If enable is a bool, the function will try to enable or disable the VT100 features of the stream stream. + * If enable is a bool, the function will try to enable or disable the VT100 features of the stream stream. * If the feature has been successfully enabled (or disabled), the function will return true, or false otherwise. *
* @return bool
From c1696ea5ba009cc468b6c1c6fcf565f0cd66cac3 Mon Sep 17 00:00:00 2001
From: tianyiw
From d09d66f9308cf91995146b15b8ac6acd5fac3ccd Mon Sep 17 00:00:00 2001
From: tianyiw
- * The function is supposed to have the following signature:
* Setting a null handler causes the process to ignore CTRL+C events, but not CTRL+BREAK events.
From ef3d725bf1bf35473444778b8f5c161deee6858b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=A1clav=20Pel=C3=AD=C5=A1ek?=
* Longitude in degrees.
*
- * `handler(int $event): void`
- * `event` The CTRL event which has been received; either PHP_WINDOWS_EVENT_CTRL_C or PHP_WINDOWS_EVENT_CTRL_BREAK.
+ * The function is supposed to have the following signature:
+ *
+ * handler(int $event): void
+ *
+ * event
The CTRL event which has been received; either PHP_WINDOWS_EVENT_CTRL_C or PHP_WINDOWS_EVENT_CTRL_BREAK.
*
* #[ArrayShape(["f" => "int", "string", "x" => "float"])]
- * This usage applied on an element effectively means that the array has 3 dimensions, the keys are "f", 1, and "x", and the corresponding types are "int", "string", and "float".
+ * This usage applied on an element effectively means that the array has 3 elements, the keys are "f", 1, and "x", and the corresponding types are "int", "string", and "float".
*/
#[Attribute(Attribute::TARGET_FUNCTION|Attribute::TARGET_METHOD|Attribute::TARGET_PARAMETER|Attribute::TARGET_PROPERTY)]
class ArrayShape
From 4b95f4f68c050574d4f448223e2643ddf06d45da Mon Sep 17 00:00:00 2001
From: Tim Bond false
on failure. The structure of the array is detailed in the following list:
+ *
+ *
+ *
+ * sunrise The timestamp of the sunrise (zenith angle = 90°35').
+ * sunset The timestamp of the sunset (zenith angle = 90°35').
+ * transit The timestamp when the sun is at its zenith, i.e. has reached its topmost point.
+ * civil_twilight_begin The start of the civil dawn (zenith angle = 96°). It ends at sunrise
.
+ * civil_twilight_end The end of the civil dusk (zenith angle = 96°). It starts at sunset
.
+ * nautical_twilight_begin The start of the nautical dawn (zenith angle = 102°). It ends at civil_twilight_begin
.
+ * nautical_twilight_end The end of the nautical dusk (zenith angle = 102°). It starts at civil_twilight_end
.
+ * astronomical_twilight_begin The start of the astronomical dawn (zenith angle = 108°). It ends at nautical_twilight_begin
.
+ * astronomical_twilight_end The end of the astronomical dusk (zenith angle = 108°). It starts at nautical_twilight_end
.
+ * The values of the array elements are either UNIX timestamps, false
if the
+ * sun is below the respective zenith for the whole day, or true
if the sun is
+ * above the respective zenith for the whole day.
* @since 5.1.2
*/
#[Pure(true)]
#[LanguageLevelTypeAware(["8.0" => "array"], default: "array|false")]
-function date_sun_info(int $timestamp, float $latitude, float $longitude) {}
+function date_sun_info(int $timestamp, float $latitude, float $longitude): array|false {}
// End of date v.5.3.2-0.dotdeb.1
From 43c63636cbbb4d52e586171d87101281a22db531 Mon Sep 17 00:00:00 2001
From: "Maxim.Kolmakov"
* An array to compare against *
- * @return array an array containing all the entries from + * @return array an array containing all the values and keys from * array1 whose keys are not present in any of the * other arrays. * @meta @@ -500,7 +500,7 @@ function array_diff_key(array $array, #[PhpStormStubsElementAvailable(from: '5.3 * be respectively less than, equal to, or greater than the second. * * @param array ...$rest [optional] - * @return array an array containing all the entries from + * @return array an array containing all the values and keys from * array1 that are not present in any of the other arrays. * @meta */ @@ -530,7 +530,7 @@ function array_diff_ukey( * to, or greater than the second. * * @param array ...$rest [optional] - * @return array an array containing all the values of array1 + * @return array an array containing all the values and keys of array1 * that are not present in any of the other arguments. * @meta */ @@ -581,7 +581,7 @@ function array_diff_assoc( * * @param array ...$rest [optional] * @return array array_udiff_assoc returns an array - * containing all the values from array1 + * containing all the values and keys from array1 * that are not present in any of the other arguments. * Note that the keys are used in the comparison unlike * array_diff and array_udiff. @@ -614,7 +614,7 @@ function array_udiff_assoc( * be respectively less than, equal to, or greater than the second. * * @param array ...$rest [optional] - * @return array an array containing all the entries from + * @return array an array containing all the values and keys from * array1 that are not present in any of the other arrays. * @meta */ @@ -657,7 +657,7 @@ function array_diff_uassoc( * the indices by using an internal function. * * @param array ...$rest [optional] - * @return array an array containing all the values from + * @return array an array containing all the values and keys from * array1 that are not present in any of the other * arguments. * @meta diff --git a/v8js/v8js.php b/v8js/v8js.php index 5d3ac00df..709e78e52 100644 --- a/v8js/v8js.php +++ b/v8js/v8js.php @@ -118,7 +118,7 @@ public static function registerExtension($extension_name, $code, array $dependen /** * Returns extensions successfully registered with V8Js::registerExtension(). - * @return array|string[] + * @return string[] */ public static function getExtensions() {} From dd390865a162fb7c69f4d430f94b10f08852b1bf Mon Sep 17 00:00:00 2001 From: "Dmitry.Tronin" <33625946+DmitryTronin@users.noreply.github.com> Date: Wed, 4 May 2022 15:22:26 +0200 Subject: [PATCH 056/419] WI-66372 Fixed typos in ArrayShape --- imagick/imagick.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imagick/imagick.php b/imagick/imagick.php index 5ccd40d50..b010fa4e0 100644 --- a/imagick/imagick.php +++ b/imagick/imagick.php @@ -4675,7 +4675,7 @@ public static function getQuantumDepth() {} * @link https://php.net/manual/en/imagick.getquantumrange.php * @return array the Imagick quantum range as a string. */ - #[ArrayShape(["quantumDepthLong" => "int", "quantumDepthString" => "string"])] + #[ArrayShape(["quantumRangeLong" => "int", "quantumRangeString" => "string"])] public static function getQuantumRange() {} /** From db803b26322bc8fef6f900da3acda0a778ffdbf3 Mon Sep 17 00:00:00 2001 From: Adrian Pennington* Criteria can be one (and only one) of the following: * SORTDATE - message Date
- * @param int $reverse+ * @param bool $reverse
* Set this to 1 for reverse sorting *
* @param int $flags [optional]* The options are a bitmask of one or more of the * following: * SE_UID - Return UIDs instead of sequence numbers
- * @param string $search_criteria [optional] - * @param string $charset + * @param string|null $search_criteria [optional] + * @param string|null $charset [optional] * @return array|false an array of message numbers sorted by the given * parameters. */ function imap_sort( #[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, int $criteria, - bool $reverse, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: 'int')] $reverse, int $flags = 0, ?string $search_criteria = null, ?string $charset = null From 2aa1fe92371d1dea9ada00c0497bbf80231de655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ladislav=20Kube=C5=A1?=- * $redis->mset(array('key0' => 'value0', 'key1' => 'value1')); + * $redis->mSet(array('key0' => 'value0', 'key1' => 'value1')); * var_dump($redis->get('key0')); * var_dump($redis->get('key1')); * // Output: @@ -2856,7 +2856,7 @@ public function persist($key) {} * // string(6) "value1" **/ - public function mset(array $array) {} + public function mSet(array $array) {} /** * Get the values of all the specified keys. From 279ef21f8841201bfd78bd052de0f954fd342230 Mon Sep 17 00:00:00 2001 From: rtm-ctrlz
The date to compare to.
* @param bool $absolute [optional]Should the interval be forced to be positive?
- * @return DateInterval + * @return DateInterval|false * The {@link https://secure.php.net/manual/en/class.dateinterval.php DateInterval} object representing the * difference between the two dates or FALSE on failure. */ @@ -663,7 +663,7 @@ public function getTimestamp(): int {} * Returns the difference between two DateTime objects represented as a DateInterval. * @param DateTimeInterface $targetObject The date to compare to. * @param bool $absolute [optional] Whether to return absolute difference. - * @return DateInterval The DateInterval object representing the difference between the two dates. + * @return DateInterval|false The DateInterval object representing the difference between the two dates. * @link https://php.net/manual/en/datetime.diff.php */ #[TentativeType] From 11e9959926d90dd21f1f36c22dc30dc09cfd7c5b Mon Sep 17 00:00:00 2001 From: Ivan Fedorov+ * @param bool $case_insensitive
* If set to true, the constant will be defined case-insensitive. * The default behavior is case-sensitive; i.e. * CONSTANT and Constant represent @@ -341,7 +341,8 @@ function error_reporting(?int $error_level): int {} function define( string $constant_name, #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: 'null|array|bool|int|float|string')] $value, - #[Deprecated()] bool $case_insensitive = false + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] bool $case_insensitive, + #[Deprecated(since: 7.3)] bool $case_insensitive = false ): bool {} /** @@ -1027,7 +1028,10 @@ function debug_backtrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT, int $lim *
* @return void */ -function debug_print_backtrace(int $options = 0, int $limit = 0): void {} +function debug_print_backtrace( + int $options = 0, + #[PhpStormStubsElementAvailable(from: '7.0')] int $limit = 0 +): void {} /** * Forces collection of any existing garbage cycles diff --git a/Phar/Phar.php b/Phar/Phar.php index 20ad6f9d1..90356506d 100644 --- a/Phar/Phar.php +++ b/Phar/Phar.php @@ -58,7 +58,8 @@ class Phar extends RecursiveDirectoryIterator implements RecursiveIterator, Seek public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO, - #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $alias = null + #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $alias = null, + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $fileformat = null ) {} public function __destruct() {} @@ -762,13 +763,16 @@ final public static function mapPhar(?string $alias = null, int $offset = 0): bo * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * @param bool $returnPhar
* If FALSE, the full path on disk to the phar * archive is returned. If TRUE, a full phar URL is returned. *
* @return string the filename if valid, empty string otherwise. */ - final public static function running(bool $returnPhar = true): string {} + final public static function running( + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $returnPhar, + #[PhpStormStubsElementAvailable(from: '7.0')] bool $returnPhar = true + ): string {} /** * (PHP >= 5.3.0, PECL phar >= 2.0.0)+ * @param bool $deep
* Indicates whether to copy all descendant nodes. This parameter is * defaulted to false. *
* @return static The cloned node. */ - public function cloneNode(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $deep = false) {} + public function cloneNode( + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $deep, + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $deep = false + ) {} /** * Normalizes the node @@ -1090,7 +1093,10 @@ public function loadXML( * @return string|false the XML, or false if an error occurred. */ #[TentativeType] - public function saveXML(?DOMNode $node = null, #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null): string|false {} + public function saveXML( + ?DOMNode $node = null, + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $options = null + ): string|false {} /** * Creates a new DOMDocument object diff --git a/intl/intl.php b/intl/intl.php index 32c7127f5..ebb2f7f4d 100644 --- a/intl/intl.php +++ b/intl/intl.php @@ -332,7 +332,10 @@ public function sort( * @return bool TRUE on success or FALSE on failure. */ #[TentativeType] - public function sortWithSortKeys(array &$array): bool {} + public function sortWithSortKeys( + array &$array, + #[ElementAvailable(from: '5.3', to: '5.6')] $flags = [] + ): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)The input string to normalize
- * @param int $form [optional]One of the normalization forms.
+ * @param int $formOne of the normalization forms.
* @return string|false The normalized string or FALSE if an error occurred. */ #[TentativeType] public static function normalize( #[TypeAware(['8.0' => 'string'], default: '')] $string, - #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C + #[ElementAvailable(from: '5.3', to: '5.6')] $form, + #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C, + #[ElementAvailable(from: '5.3', to: '5.6')] $arg3 ): string|false {} /** @@ -1266,7 +1274,7 @@ public static function normalize( * Checks if the provided string is already in the specified normalization form. * @link https://php.net/manual/en/normalizer.isnormalized.php * @param string $stringThe input string to normalize
- * @param int $form [optional]+ * @param int $form
* One of the normalization forms. *
* @return bool TRUE if normalized, FALSE otherwise or if there an error @@ -1274,7 +1282,9 @@ public static function normalize( #[TentativeType] public static function isNormalized( #[TypeAware(['8.0' => 'string'], default: '')] $string, - #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C + #[ElementAvailable(from: '5.3', to: '5.6')] $form, + #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'int'], default: '')] $form = Normalizer::FORM_C, + #[ElementAvailable(from: '5.3', to: '5.6')] $arg3 ): bool {} /** @@ -1431,7 +1441,7 @@ public static function getKeywords(#[TypeAware(['8.0' => 'string'], default: '') * @param string $locale* The locale to return a display script for *
- * @param string $displayLocale [optional]+ * @param string $displayLocale
* Optional format locale to use to display the script name *
* @return string Display name of the script for the $locale in the format appropriate for @@ -1440,7 +1450,8 @@ public static function getKeywords(#[TypeAware(['8.0' => 'string'], default: '') #[TentativeType] public static function getDisplayScript( #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null + #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale, + #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null ): string|false {} /** @@ -1450,7 +1461,7 @@ public static function getDisplayScript( * @param string $locale* The locale to return a display region for. *
- * @param string $displayLocale [optional]+ * @param string $displayLocale
* Optional format locale to use to display the region name *
* @return string display name of the region for the $locale in the format appropriate for @@ -1459,7 +1470,8 @@ public static function getDisplayScript( #[TentativeType] public static function getDisplayRegion( #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null + #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale, + #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null ): string|false {} /** @@ -1469,13 +1481,14 @@ public static function getDisplayRegion( * @param string $locale* The locale to return a display name for. *
- * @param string $displayLocale [optional]optional format locale
+ * @param string $displayLocaleoptional format locale
* @return string|false Display name of the locale in the format appropriate for $in_locale. */ #[TentativeType] public static function getDisplayName( #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null + #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale, + #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null ): string|false {} /** @@ -1485,7 +1498,7 @@ public static function getDisplayName( * @param string $locale* The locale to return a display language for *
- * @param string $displayLocale [optional]+ * @param string $displayLocale
* Optional format locale to use to display the language name *
* @return string|false display name of the language for the $locale in the format appropriate for @@ -1494,7 +1507,8 @@ public static function getDisplayName( #[TentativeType] public static function getDisplayLanguage( #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null + #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale, + #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null ): string|false {} /** @@ -1504,7 +1518,7 @@ public static function getDisplayLanguage( * @param string $locale* The locale to return a display variant for *
- * @param string $displayLocale [optional]+ * @param string $displayLocale
* Optional format locale to use to display the variant name *
* @return string|false Display name of the variant for the $locale in the format appropriate for @@ -1513,7 +1527,8 @@ public static function getDisplayLanguage( #[TentativeType] public static function getDisplayVariant( #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null + #[ElementAvailable(from: '5.3', to: '5.6')] $displayLocale, + #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $displayLocale = null ): string|false {} /** @@ -1585,7 +1600,7 @@ public static function getAllVariants(#[TypeAware(['8.0' => 'string'], default: * @param string $locale* The language range to check against *
- * @param bool $canonicalize [optional]+ * @param bool $canonicalize
* If true, the arguments will be converted to canonical form before * matching. *
@@ -1595,7 +1610,8 @@ public static function getAllVariants(#[TypeAware(['8.0' => 'string'], default: public static function filterMatches( #[TypeAware(['8.0' => 'string'], default: '')] $languageTag, #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false + #[ElementAvailable(from: '5.3', to: '5.6')] $canonicalize, + #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false ): ?bool {} /** @@ -1609,11 +1625,11 @@ public static function filterMatches( * @param string $locale* The locale to use as the language range when matching. *
- * @param bool $canonicalize [optional]+ * @param bool $canonicalize
* If true, the arguments will be converted to canonical form before * matching. *
- * @param string $defaultLocale [optional]+ * @param string $defaultLocale
* The locale to use if no match is found. *
* @return string The closest matching language tag or default value. @@ -1622,8 +1638,10 @@ public static function filterMatches( public static function lookup( array $languageTag, #[TypeAware(['8.0' => 'string'], default: '')] $locale, - #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false, - #[TypeAware(['8.0' => 'string|null'], default: '')] $defaultLocale = null + #[ElementAvailable(from: '5.3', to: '5.6')] $canonicalize, + #[ElementAvailable(from: '5.3', to: '5.6')] $defaultLocale, + #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'bool'], default: '')] $canonicalize = false, + #[ElementAvailable(from: '7.0')] #[TypeAware(['8.0' => 'string|null'], default: '')] $defaultLocale = null ): ?string {} /** @@ -3855,7 +3873,11 @@ function collator_sort(Collator $object, array &$array, int $flags = 0): bool {} * @param string[] &$arrayArray of strings to sort
* @return bool TRUE on success or FALSE on failure. */ -function collator_sort_with_sort_keys(Collator $object, array &$array): bool {} +function collator_sort_with_sort_keys( + Collator $object, + array &$array, + #[ElementAvailable(from: '5.3', to: '5.6')] $sort_flags = [] +): bool {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)* The locale to return a display script for *
- * @param string|null $displayLocale [optional]+ * @param string|null $displayLocale
* Optional format locale to use to display the script name *
* @return string|false Display name of the script for the $locale in the format appropriate for * $in_locale. */ #[Pure] -function locale_get_display_script(string $locale, ?string $displayLocale = null): string|false {} +function locale_get_display_script( + string $locale, + #[ElementAvailable(from: '5.3', to: '5.6')] ?string $displayLocale, + #[ElementAvailable(from: '7.0')] ?string $displayLocale = null +): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)* The locale to return a display region for. *
- * @param string|null $displayLocale [optional]+ * @param string|null $displayLocale
* Optional format locale to use to display the region name *
* @return string|false display name of the region for the $locale in the format appropriate for * $in_locale. */ #[Pure] -function locale_get_display_region(string $locale, ?string $displayLocale = null): string|false {} +function locale_get_display_region( + string $locale, + #[ElementAvailable(from: '5.3', to: '5.6')] ?string $displayLocale, + #[ElementAvailable(from: '7.0')] ?string $displayLocale = null +): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)* The locale to return a display name for. *
- * @param string|null $displayLocale [optional]optional format locale
+ * @param string|null $displayLocaleoptional format locale
* @return string|false Display name of the locale in the format appropriate for $in_locale. */ #[Pure] -function locale_get_display_name(string $locale, ?string $displayLocale = null): string|false {} +function locale_get_display_name( + string $locale, + #[ElementAvailable(from: '5.3', to: '5.6')] ?string $displayLocale, + #[ElementAvailable(from: '7.0')] ?string $displayLocale = null +): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)* The locale to return a display language for *
- * @param string|null $displayLocale [optional]+ * @param string|null $displayLocale
* Optional format locale to use to display the language name *
* @return string|false display name of the language for the $locale in the format appropriate for * $in_locale. */ #[Pure] -function locale_get_display_language(string $locale, ?string $displayLocale = null): string|false {} +function locale_get_display_language( + string $locale, + #[ElementAvailable(from: '5.3', to: '5.6')] ?string $displayLocale, + #[ElementAvailable(from: '7.0')] ?string $displayLocale = null +): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)* The locale to return a display variant for *
- * @param string|null $displayLocale [optional]+ * @param string|null $displayLocale
* Optional format locale to use to display the variant name *
* @return string|false Display name of the variant for the $locale in the format appropriate for * $in_locale. */ #[Pure] -function locale_get_display_variant(string $locale, ?string $displayLocale = null): string|false {} +function locale_get_display_variant( + string $locale, + #[ElementAvailable(from: '5.3', to: '5.6')] ?string $displayLocale, + #[ElementAvailable(from: '7.0')] ?string $displayLocale = null +): string|false {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)* The language range to check against *
- * @param bool $canonicalize [optional]+ * @param bool $canonicalize
* If true, the arguments will be converted to canonical form before * matching. *
* @return bool|null TRUE if $locale matches $langtag FALSE otherwise. */ #[Pure] -function locale_filter_matches(string $languageTag, string $locale, bool $canonicalize = false): ?bool {} +function locale_filter_matches( + string $languageTag, + string $locale, + #[ElementAvailable(from: '5.3', to: '5.6')] bool $canonicalize, + #[ElementAvailable(from: '7.0')] bool $canonicalize = false +): ?bool {} /** * Canonicalize the locale string @@ -4441,17 +4492,24 @@ function locale_canonicalize(string $locale): ?string {} * @param string $locale* The locale to use as the language range when matching. *
- * @param bool $canonicalize [optional]+ * @param bool $canonicalize
* If true, the arguments will be converted to canonical form before * matching. *
- * @param string|null $defaultLocale [optional]+ * @param string|null $defaultLocale
* The locale to use if no match is found. *
* @return string|null The closest matching language tag or default value. */ #[Pure] -function locale_lookup(array $languageTag, string $locale, bool $canonicalize = false, ?string $defaultLocale = null): ?string {} +function locale_lookup( + array $languageTag, + string $locale, + #[ElementAvailable(from: '5.3', to: '5.6')] bool $canonicalize, + #[ElementAvailable(from: '5.3', to: '5.6')] ?string $defaultLocale, + #[ElementAvailable(from: '7.0')] bool $canonicalize = false, + #[ElementAvailable(from: '7.0')] ?string $defaultLocale = null, +): ?string {} /** * (PHP 5 >= 5.3.0, PECL intl >= 1.0.0)+ * @param mixed $headers
* The headers to be set. It could be SoapHeader * object or array of SoapHeader objects. * If not specified or set to NULL, the headers will be deleted. @@ -470,7 +471,10 @@ public function __setLocation(#[LanguageLevelTypeAware(['8.0' => 'string|null'], * @since 5.0.5 */ #[TentativeType] - public function __setSoapHeaders($headers = null): bool {} + public function __setSoapHeaders( + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $headers, + #[PhpStormStubsElementAvailable(from: '7.0')] $headers = null + ): bool {} } /** diff --git a/sqlite3/sqlite3.php b/sqlite3/sqlite3.php index efefa8a55..c69b1da9f 100644 --- a/sqlite3/sqlite3.php +++ b/sqlite3/sqlite3.php @@ -56,7 +56,7 @@ class SQLite3 * @param string $filename
* Path to the SQLite database, or :memory: to use in-memory database. *
- * @param int $flags [optional]+ * @param int $flags
* Optional flags used to determine how to open the SQLite database. By * default, open uses SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE. *
@@ -64,7 +64,7 @@ class SQLite3 * SQLITE3_OPEN_READONLY: Open the database for * reading only. * - * @param string $encryptionKey [optional]+ * @param string $encryptionKey
* An optional encryption key used when encrypting and decrypting an * SQLite database. *
@@ -73,8 +73,10 @@ class SQLite3 #[TentativeType] public function open( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = SQLITE3_OPEN_READWRITE|SQLITE3_OPEN_CREATE, - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encryptionKey = null + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $flags, + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $encryptionKey, + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = SQLITE3_OPEN_READWRITE|SQLITE3_OPEN_CREATE, + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encryptionKey = null ): void {} /** @@ -334,7 +336,10 @@ public function openBlob( * @return bool Returns the old value; true if exceptions were enabled, false otherwise. */ #[TentativeType] - public function enableExceptions(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $enable = false): bool {} + public function enableExceptions( + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $enable, + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $enable = false + ): bool {} /** * Instantiates an SQLite3 object and opens an SQLite 3 database @@ -342,7 +347,7 @@ public function enableExceptions(#[LanguageLevelTypeAware(['8.0' => 'bool'], def * @param string $filename* Path to the SQLite database, or :memory: to use in-memory database. *
- * @param int $flags [optional]+ * @param int $flags
* Optional flags used to determine how to open the SQLite database. By * default, open uses SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE. *
@@ -350,15 +355,17 @@ public function enableExceptions(#[LanguageLevelTypeAware(['8.0' => 'bool'], def * SQLITE3_OPEN_READONLY: Open the database for * reading only. * - * @param string $encryptionKey [optional]+ * @param string $encryptionKey
* An optional encryption key used when encrypting and decrypting an * SQLite database. *
*/ public function __construct( #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = SQLITE3_OPEN_READWRITE|SQLITE3_OPEN_CREATE, - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encryptionKey = null + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $flags, + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $encryptionKey, + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = SQLITE3_OPEN_READWRITE|SQLITE3_OPEN_CREATE, + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $encryptionKey = null ) {} /** diff --git a/standard/standard_0.php b/standard/standard_0.php index 0898fcc83..deb7c1cd3 100644 --- a/standard/standard_0.php +++ b/standard/standard_0.php @@ -727,7 +727,11 @@ function htmlspecialchars_decode(string $string, int $flags = ENT_QUOTES|ENT_SUB * @return array the translation table as an array. */ #[Pure] -function get_html_translation_table(int $table = 0, int $flags = ENT_QUOTES|ENT_SUBSTITUTE, string $encoding = "UTF-8"): array {} +function get_html_translation_table( + int $table = 0, + int $flags = ENT_QUOTES|ENT_SUBSTITUTE, + #[PhpStormStubsElementAvailable(from: '7.0')] string $encoding = "UTF-8" +): array {} /** * Calculate the sha1 hash of a string @@ -1224,7 +1228,7 @@ function php_sapi_name(): string|false {} * @return string the description, as a string. */ #[Pure(true)] -function php_uname(string $mode = 'a'): string {} +function php_uname(#[PhpStormStubsElementAvailable(from: '7.0')] string $mode = 'a'): string {} /** * Return a list of .ini files parsed from the additional ini dir diff --git a/standard/standard_1.php b/standard/standard_1.php index aa985650f..72c8281a6 100644 --- a/standard/standard_1.php +++ b/standard/standard_1.php @@ -234,7 +234,7 @@ function basename(string $path, string $suffix = ''): string {} * /component removed. */ #[Pure] -function dirname(string $path, int $levels = 1): string {} +function dirname(string $path, #[PhpStormStubsElementAvailable(from: '7.0')] int $levels = 1): string {} /** * Returns information about a file path diff --git a/standard/standard_4.php b/standard/standard_4.php index c7a18d41d..7ff6bfdf1 100644 --- a/standard/standard_4.php +++ b/standard/standard_4.php @@ -176,7 +176,7 @@ function serialize(mixed $value): string {} * In case the passed string is not unserializeable, false is returned and * E_NOTICE is issued. */ -function unserialize(string $data, array $options = []): mixed {} +function unserialize(string $data, #[PhpStormStubsElementAvailable(from: '7.0')] array $options = []): mixed {} /** * Dumps information about a variable @@ -440,7 +440,7 @@ function ini_get(string $option): string|false {} * */ #[Pure(true)] -function ini_get_all(?string $extension, bool $details = true): array|false {} +function ini_get_all(?string $extension, #[PhpStormStubsElementAvailable(from: '7.0')] bool $details = true): array|false {} /** * Sets the value of a configuration option diff --git a/standard/standard_6.php b/standard/standard_6.php index 0dc5ddef1..95c1ee89d 100644 --- a/standard/standard_6.php +++ b/standard/standard_6.php @@ -652,7 +652,7 @@ function fputcsv( array $fields, string $separator = ",", string $enclosure = '"', - string $escape = "\\", + #[PhpStormStubsElementAvailable(from: '7.0')] string $escape = "\\", #[PhpStormStubsElementAvailable('8.1')] string $eol = PHP_EOL ): int|false {} @@ -1045,7 +1045,12 @@ function get_headers( * * @return bool true on success or false on failure. */ -function stream_set_timeout($stream, int $seconds, int $microseconds = 0): bool {} +function stream_set_timeout( + $stream, + int $seconds, + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] int $microseconds, + #[PhpStormStubsElementAvailable(from: '7.0')] int $microseconds = 0 +): bool {} /** * Alias: @@ -1058,12 +1063,17 @@ function stream_set_timeout($stream, int $seconds, int $microseconds = 0): bool * @param int $seconds* The seconds part of the timeout to be set. *
- * @param int $microseconds [optional]+ * @param int $microseconds
* The microseconds part of the timeout to be set. *
* @return bool true on success or false on failure. */ -function socket_set_timeout($stream, int $seconds, int $microseconds = 0): bool {} +function socket_set_timeout( + $stream, + int $seconds, + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] int $microseconds, + #[PhpStormStubsElementAvailable(from: '7.0')] int $microseconds = 0 +): bool {} /** * Alias: diff --git a/standard/standard_9.php b/standard/standard_9.php index 1dbb56158..d40cc6818 100644 --- a/standard/standard_9.php +++ b/standard/standard_9.php @@ -887,7 +887,7 @@ function key_exists($key, array $array): bool {} */ function assert( mixed $assertion, - #[LanguageLevelTypeAware(['7.0' => 'Throwable|string|null'], default: 'string')] $description = null + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['7.0' => 'Throwable|string|null'], default: 'string')] $description = null ): bool {} /** diff --git a/tests/TestData/mutedProblems.json b/tests/TestData/mutedProblems.json index 32732ef4b..8675d1d20 100644 --- a/tests/TestData/mutedProblems.json +++ b/tests/TestData/mutedProblems.json @@ -961,6 +961,7 @@ { "description": "parameter mismatch", "versions": [ + 5.6, 7.0 ] } @@ -968,6 +969,28 @@ } ], "classes": [ + { + "name": "DOMException", + "problems": [ + { + "description": "has wrong final modifier", + "versions": [ + 5.6 + ] + } + ] + }, + { + "name": "mysqli_sql_exception", + "problems": [ + { + "description": "has wrong final modifier", + "versions": [ + 5.6 + ] + } + ] + }, { "name": "Yaf_Application", "methods": [ @@ -3054,6 +3077,7 @@ { "description": "has wrong final modifier", "versions": [ + 5.6, 7.0, 7.1, 7.2, @@ -3118,6 +3142,7 @@ { "description": "has wrong static modifier", "versions": [ + 5.6, 7.0, 7.1, 7.2, @@ -3133,6 +3158,7 @@ { "description": "has wrong static modifier", "versions": [ + 5.6, 7.0, 7.1, 7.2, diff --git a/tokenizer/tokenizer.php b/tokenizer/tokenizer.php index c5b985a9f..ea7f26454 100644 --- a/tokenizer/tokenizer.php +++ b/tokenizer/tokenizer.php @@ -1,6 +1,7 @@ 'DOMNode|null'], default: '')] $baseNode = null): DOMNode|false {} + public function expand( + #[PhpStormStubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: '')] $baseNode = null + ): DOMNode|false {} } // End of xmlreader v.0.2 From 5ac07a429ee479d8dab11bf9ac61088ab8e32c7b Mon Sep 17 00:00:00 2001 From: Ivan Fedorov+ * @param string|int|float ...$values
*
* @return string a string produced according to the formatting string * format. */ #[Pure] -function sprintf(string $format, mixed ...$values): string {} +function sprintf( + string $format, + #[PhpStormStubsElementAvailable(from: '5.3', to: '5.6')] $values, + #[PhpStormStubsElementAvailable(from: '7.0')] mixed ...$values +): string {} /** * Output a formatted string From f432611b5e2ce24661f60fecc11ad5575cccc6f7 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov+ * The variable you want to export. + *
+ * @return void + */ +#[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] +function var_dump(...$vars): void {} /** * Outputs or returns a parsable string representation of a variable diff --git a/tests/TestData/mutedProblems.json b/tests/TestData/mutedProblems.json index 8675d1d20..d410b133d 100644 --- a/tests/TestData/mutedProblems.json +++ b/tests/TestData/mutedProblems.json @@ -966,6 +966,27 @@ ] } ] + }, + { + "name": "var_dump", + "parameters": [ + { + "name": "vars", + "problems": [ + { + "description": "wrong optionallity", + "versions": [ + 5.6, + 7.0, + 7.1, + 7.2, + 7.3, + 7.4 + ] + } + ] + } + ] } ], "classes": [ From 09f6e370bcbd059eebb49183e7abc707823ae14b Mon Sep 17 00:00:00 2001 From: Ivan Fedorov+ * Use one of the following constants to specify the implementation of the algorithm to use. + *
+ * @return void + */ + function mt_srand( + int $seed = 0, + #[PhpStormStubsElementAvailable(from: '7.1')] int $mode = MT_RAND_MT19937 + ): void {} + + /** + * Seed the random number generator + *Note: As of PHP 7.1.0, {@see srand()} has been made + * an alias of {@see mt_srand()}. + *
+ * @link https://php.net/manual/en/function.srand.php + * @param int $seed+ * Optional seed value + *
+ * @param int $mode [optional]+ * Use one of the following constants to specify the implementation of the algorithm to use. + *
+ * @return void + */ + function srand( + int $seed = 0, + #[PhpStormStubsElementAvailable(from: '7.1')] int $mode = MT_RAND_MT19937 + ): void {} + + /** + * Generate a random integer + * @link https://php.net/manual/en/function.rand.php + * @param int $min + * @param int $max [optional] + * @return int A pseudo random value between min + * (or 0) and max (or getrandmax, inclusive). + */ + function rand(int $min = null, int $max): int {} + + /** + * Generate a random value via the Mersenne Twister Random Number Generator + * @link https://php.net/manual/en/function.mt-rand.php + * @param int $min+ * Optional lowest value to be returned (default: 0) + *
+ * @param int $max [optional]+ * Optional highest value to be returned (default: mt_getrandmax()) + *
+ * @return int A random integer value between min (or 0) + * and max (or mt_getrandmax, inclusive) + */ + function mt_rand(int $min = null, int $max): int {} + + /** + * Show largest possible random value + * @link https://php.net/manual/en/function.mt-getrandmax.php + * @return int the maximum random value returned by mt_rand + */ + #[Pure] + function mt_getrandmax(): int {} + + /** + * Show largest possible random value + * @link https://php.net/manual/en/function.getrandmax.php + * @return int The largest possible random value returned by rand + */ + #[Pure] + function getrandmax(): int {} + + /** + * Generates cryptographically secure pseudo-random bytes + * @link https://php.net/manual/en/function.random-bytes.php + * @param int $length The length of the random string that should be returned in bytes. + * @return string Returns a string containing the requested number of cryptographically secure random bytes. + * @since 7.0 + * @throws Exception if an appropriate source of randomness cannot be found. + */ + function random_bytes(int $length): string {} + + /** + * Generates cryptographically secure pseudo-random integers + * @link https://php.net/manual/en/function.random-int.php + * @param int $min The lowest value to be returned, which must be PHP_INT_MIN or higher. + * @param int $max The highest value to be returned, which must be less than or equal to PHP_INT_MAX. + * @return int Returns a cryptographically secure random integer in the range min to max, inclusive. + * @since 7.0 + * @throws Exception if an appropriate source of randomness cannot be found. + */ + function random_int(int $min, int $max): int {} +} + +namespace Random\Engine +{ + /** + * @since 8.2 + */ + final class Mt19937 implements \Random\Engine + { + public function __construct(int|null $seed = null, int $mode = MT_RAND_MT19937) {} + + public function generate(): string {} + + public function __serialize(): array {} + + public function __unserialize(array $data): void {} + + public function __debugInfo(): array {} + } + + /** + * @since 8.2 + */ + final class PcgOneseq128XslRr64 implements \Random\Engine + { + public function __construct(string|int|null $seed = null, string|int $sequence = 0) {} + + public function generate(): string {} + + public function jump(int $advance): void {} + + public function __serialize(): array {} + + public function __unserialize(array $data): void {} + + public function __debugInfo(): array {} + } + + /** + * @since 8.2 + */ + final class Xoshiro256StarStar implements \Random\Engine + { + public function __construct(string|int|null $seed = null) {} + + public function generate(): string {} + + public function jump(): void {} + + public function jumpLong(): void {} + + public function __serialize(): array {} + + public function __unserialize(array $data): void {} + + public function __debugInfo(): array {} + } + + /** + * @since 8.2 + */ + final class Secure implements \Random\CryptoSafeEngine + { + public function generate(): string {} + } +} + +namespace Random +{ + /** + * @since 8.2 + */ + interface Engine + { + public function generate(): string; + } + /** + * @since 8.2 + */ + interface CryptoSafeEngine extends Engine {} + + /** + * @since 8.2 + */ + final class Randomizer + { + public readonly Engine $engine; + + public function __construct(?Engine $engine = null) {} + + public function getInt(int $min = UNKNOWN, int $max = UNKNOWN): int {} + + public function getBytes(int $length): string {} + + public function shuffleArray(array $array): array {} + + public function shuffleBytes(string $bytes): string {} + + public function pickArrayKeys(array $array, int $num): array {} + + public function __serialize(): array {} + + public function __unserialize(array $data): void {} + } +} diff --git a/sockets/sockets.php b/sockets/sockets.php index 73cb44387..212b8a24e 100644 --- a/sockets/sockets.php +++ b/sockets/sockets.php @@ -2312,6 +2312,20 @@ function socket_wsaprotocol_info_release($info_id) {} */ define('TCP_KEEPCNT', 6); +/** + * Socket_set_option for the socket_send* functions. + * It avoids copy b/w userland and kernel for both TCP and UDP protocols. + * @since 8.2 + */ +define('SO_ZEROCOPY', 60); + +/** + * Socket_set_option for the socket_send* functions. + * It avoids copy b/w userland and kernel for both TCP and UDP protocols. + * @since 8.2 + */ +define('MSG_ZEROCOPY', 67108864); + /** * @since 8.0 */ diff --git a/standard/CSPRNG.php b/standard/CSPRNG.php deleted file mode 100644 index 069a9fa03..000000000 --- a/standard/CSPRNG.php +++ /dev/null @@ -1,21 +0,0 @@ - 'string'], default: '')] + #[PhpStormStubsElementAvailable(to: '8.0')] public $path; + /** + * @var string The directory that was opened. + */ + #[PhpStormStubsElementAvailable(from: '8.1')] + public readonly string $path; + /** * @var resource Can be used with other directory functions such as {@see readdir()}, {@see rewinddir()} and {@see closedir()}. */ - #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')] + #[PhpStormStubsElementAvailable(to: '8.0')] public $handle; + /** + * @var resource Can be used with other directory functions such as {@see readdir()}, {@see rewinddir()} and {@see closedir()}. + */ + #[PhpStormStubsElementAvailable(from: '8.1')] + public readonly mixed $handle; + /** * Close directory handle. * Same as closedir(), only dir_handle defaults to $this. diff --git a/standard/standard_2.php b/standard/standard_2.php index 6d8ef8993..1f04e40ff 100644 --- a/standard/standard_2.php +++ b/standard/standard_2.php @@ -930,81 +930,6 @@ function proc_get_status($process) {} */ function proc_nice(int $priority): bool {} -/** - * Generate a random integer - * @link https://php.net/manual/en/function.rand.php - * @param int $min - * @param int $max [optional] - * @return int A pseudo random value between min - * (or 0) and max (or getrandmax, inclusive). - */ -function rand(int $min = null, int $max): int {} - -/** - * Seed the random number generator - *Note: As of PHP 7.1.0, {@see srand()} has been made - * an alias of {@see mt_srand()}. - *
- * @link https://php.net/manual/en/function.srand.php - * @param int $seed- * Optional seed value - *
- * @param int $mode [optional]- * Use one of the following constants to specify the implementation of the algorithm to use. - *
- * @return void - */ -function srand( - int $seed = 0, - #[PhpStormStubsElementAvailable(from: '7.1')] int $mode = MT_RAND_MT19937 -): void {} - -/** - * Show largest possible random value - * @link https://php.net/manual/en/function.getrandmax.php - * @return int The largest possible random value returned by rand - */ -#[Pure] -function getrandmax(): int {} - -/** - * Generate a random value via the Mersenne Twister Random Number Generator - * @link https://php.net/manual/en/function.mt-rand.php - * @param int $min- * Optional lowest value to be returned (default: 0) - *
- * @param int $max [optional]- * Optional highest value to be returned (default: mt_getrandmax()) - *
- * @return int A random integer value between min (or 0) - * and max (or mt_getrandmax, inclusive) - */ -function mt_rand(int $min = null, int $max): int {} - -/** - * Seeds the Mersenne Twister Random Number Generator - * @link https://php.net/manual/en/function.mt-srand.php - * @param int $seed- * An optional seed value - *
- * @param int $mode [optional]- * Use one of the following constants to specify the implementation of the algorithm to use. - *
- * @return void - */ -function mt_srand( - int $seed = 0, - #[PhpStormStubsElementAvailable(from: '7.1')] int $mode = MT_RAND_MT19937 -): void {} - -/** - * Show largest possible random value - * @link https://php.net/manual/en/function.mt-getrandmax.php - * @return int the maximum random value returned by mt_rand - */ -#[Pure] -function mt_getrandmax(): int {} - /** * Get port number associated with an Internet service and protocol * @link https://php.net/manual/en/function.getservbyname.php diff --git a/standard/standard_8.php b/standard/standard_8.php index fc3682dbf..3f9f1a6e1 100644 --- a/standard/standard_8.php +++ b/standard/standard_8.php @@ -124,13 +124,6 @@ function stream_set_chunk_size($stream, int $size) {} #[Deprecated(since: '5.3')] function define_syslog_variables() {} -/** - * Combined linear congruential generator - * @link https://php.net/manual/en/function.lcg-value.php - * @return float A pseudo random float value in the range of (0, 1) - */ -function lcg_value(): float {} - /** * Calculate the metaphone key of a string * @link https://php.net/manual/en/function.metaphone.php diff --git a/tests/DockerImages/8.2/Dockerfile b/tests/DockerImages/8.2/Dockerfile index 2bb53fb15..cf16647d8 100644 --- a/tests/DockerImages/8.2/Dockerfile +++ b/tests/DockerImages/8.2/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.2.0alpha3-zts-alpine +FROM php:8.2.0beta1-zts-alpine RUN set -eux; \ apk add --no-cache --virtual .build-deps \ diff --git a/tests/Model/PHPProperty.php b/tests/Model/PHPProperty.php index 0a8313fe5..1b467a4c1 100644 --- a/tests/Model/PHPProperty.php +++ b/tests/Model/PHPProperty.php @@ -49,8 +49,8 @@ public function readObjectFromReflection($reflectionObject) if (method_exists($reflectionObject, 'getType')) { $this->typesFromSignature = self::getReflectionTypeAsArray($reflectionObject->getType()); } - if (property_exists($reflectionObject, 'isReadonly')) { - $this->isReadonly = $reflectionObject->isReadonly; + if (method_exists($reflectionObject, 'isReadonly')) { + $this->isReadonly = $reflectionObject->isReadOnly(); } return $this; } diff --git a/tests/TestData/Providers/Stubs/PhpCoreStubsProvider.php b/tests/TestData/Providers/Stubs/PhpCoreStubsProvider.php index d2d59ad6d..bbddad73a 100644 --- a/tests/TestData/Providers/Stubs/PhpCoreStubsProvider.php +++ b/tests/TestData/Providers/Stubs/PhpCoreStubsProvider.php @@ -16,6 +16,7 @@ class PhpCoreStubsProvider 'hash', 'meta', 'pcre', + 'random', 'Phar', 'Reflection', 'regex', From 2964a55864a8df8a4dd6ba09432a03aab10acab1 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov* An LDAP link identifier, returned by ldap_connect. *
@@ -751,7 +751,6 @@ function ldap_delete_ext( * @param array $entry * @param array|null $controls Array of LDAP Controls to send with the request. * @return bool TRUE on success or FALSE on failure. - * @since 7.0 */ function ldap_modify( #[PhpVersionAware(['8.1' => 'LDAP\Connection'], default: 'resource')] $ldap, From c26d6adae419b396be1fa4bc46933530df69b771 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov* The 3-letter ISO 4217 currency code indicating the currency to use. *
- * @return string String representing the formatted currency value. + * @return string|false String representing the formatted currency value. */ #[Pure] #[TentativeType] From e64934efdf45aafaa2a506bc2c4d85520111c900 Mon Sep 17 00:00:00 2001 From: DmitryTronin* A character. *
- * @return int the ASCII value as an integer. + * @return int<0, 255> the ASCII value as an integer. */ #[Pure] function ord(string $character): int {} From 0b322e2216e3d584a15e8a3bb4b0742a4dd88a7a Mon Sep 17 00:00:00 2001 From: RobiNN* // Simple key -> value set * $redis->set('key', 'value'); @@ -570,24 +609,24 @@ public function setnx($key, $value) {} public function del($key1, ...$otherKeys) {} /** - * @param string|string[] $key1 - * @param string $key2 - * @param string $key3 + * Remove specified keys. + * + * @param string|array $key An array of keys, or an undefined number of parameters, each a key: key1 key2 key3 ... keyN + * @param string ...$otherKeys * * @return int|Redis Number of keys deleted or Redis if in multi mode * * @throws RedisException */ #[Deprecated(replacement: "%class%->del(%parametersList%)")] - public function delete($key1, $key2 = null, $key3 = null) {} + public function delete($key, ...$otherKeys) {} /** * Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking. * * @see del() - * @param string|string[] $key1 - * @param string $key2 - * @param string $key3 + * @param string|array $key An array of keys, or an undefined number of parameters, each a key: key1 key2 key3 ... keyN + * @param string ...$other_keys * * @return int|Redis Number of keys unlinked or Redis if in multi mode * @@ -604,7 +643,7 @@ public function delete($key1, $key2 = null, $key3 = null) {} * $redis->unlink(array('key3', 'key4')); // return 2 **/ - public function unlink($key1, $key2 = null, $key3 = null) {} + public function unlink($key, ...$other_keys) {} /** * Enter and exit transactional mode. @@ -642,7 +681,7 @@ public function multi($mode = Redis::MULTI) {} /** * Returns a Redis instance which can simply transmitted faster to the server. * - * @return Redis returns the Redis instance. + * @return bool|Redis returns the Redis instance. * Once in pipeline-mode, all subsequent method calls return the same object until exec() is called. * Pay attention, that Pipeline is not a transaction, so you can get unexpected * results in case of big pipelines and small read/write timeouts. @@ -681,6 +720,10 @@ public function pipeline() {} public function exec() {} /** + * Flushes all previously queued commands in a transaction and restores the connection state to normal. + * + * @return bool + * * @throws RedisException * * @see multi() @@ -691,9 +734,11 @@ public function discard() {} /** * Watches a key for modifications by another client. If the key is modified between WATCH and EXEC, * the MULTI/EXEC transaction will fail (return FALSE). unwatch cancels all the watching of all keys by this client. - * @param string|string[] $key a list of keys * - * @return void|Redis returns Redis if in multi mode + * @param string|array $key An array of keys, or an undefined number of parameters, each a key: key1 key2 key3 ... keyN + * @param string ...$other_keys + * + * @return bool|Redis returns Redis if in multi mode * * @throws RedisException * @@ -708,12 +753,13 @@ public function discard() {} * // $ret = FALSE if x has been modified between the call to WATCH and the call to EXEC. * */ - public function watch($key) {} + public function watch($key, ...$other_keys) {} /** * @throws RedisException * * @see watch() + * @return bool|Redis * @link https://redis.io/commands/unwatch */ public function unwatch() {} @@ -724,7 +770,7 @@ public function unwatch() {} * Warning: this function will probably change in the future. * * @param string[] $channels an array of channels to subscribe - * @param string|array $callback either a string or an array($instance, 'method_name'). + * @param string|array|callable $callback either a string or an array($instance, 'method_name'). * The callback function receives 3 parameters: the redis instance, the channel name, and the message. * * @return mixed|null|Redis Any non-null return value in the callback will be returned to the caller or Redis if in multi mode @@ -758,21 +804,23 @@ public function subscribe($channels, $callback) {} /** * Subscribe to channels by pattern * - * @param array $patterns an array of glob-style patterns to subscribe - * @param string|array $callback Either a string or an array with an object and method. + * @param array $patterns an array of glob-style patterns to subscribe + * @param string|array|callable $callback Either a string or an array with an object and method. * The callback will get four arguments ($redis, $pattern, $channel, $message) - * @return mixed|Redis Any non-null return value in the callback will be returned to the caller or Redis if in multi mode + * @return mixed|Redis Any non-null return value in the callback will be returned to the caller or Redis if in multi mode * * @throws RedisException * * @link https://redis.io/commands/psubscribe * @example *
- * function psubscribe($redis, $pattern, $chan, $msg) { + * function f($redis, $pattern, $chan, $msg) { * echo "Pattern: $pattern\n"; * echo "Channel: $chan\n"; * echo "Payload: $msg\n"; * } + * + * $redis->psubscribe(array('chan-1', 'chan-2', 'chan-3'), 'f') **/ public function psubscribe($patterns, $callback) {} @@ -813,35 +861,39 @@ public function publish($channel, $message) {} * @link https://redis.io/commands/pubsub * @example *
- * $redis->pubsub('channels'); // All channels - * $redis->pubsub('channels', '*pattern*'); // Just channels matching your pattern - * $redis->pubsub('numsub', array('chan1', 'chan2')); // Get subscriber counts for 'chan1' and 'chan2' - * $redis->pubsub('numpat'); // Get the number of pattern subscribers + * $redis->pubaub('channels'); // All channels + * $redis->pubaub('channels', '*pattern*'); // Just channels matching your pattern + * $redis->pubaub('numsub', array('chan1', 'chan2')); // Get subscriber counts for 'chan1' and 'chan2' + * $redis->pubaub('numpat'); // Get the number of pattern subscribers **/ - public function pubsub($keyword, $argument) {} + public function pubaub($keyword, $argument = null) {} /** * Stop listening for messages posted to the given channels. * * @param array $channels an array of channels to usubscribe * + * @return bool|array + * * @throws RedisException * * @link https://redis.io/commands/unsubscribe */ - public function unsubscribe($channels = null) {} + public function unsubscribe($channels) {} /** * Stop listening for messages posted to the given channels. * * @param array $patterns an array of glob-style patterns to unsubscribe * + * @return bool|array + * * @throws RedisException * * @link https://redis.io/commands/punsubscribe */ - public function punsubscribe($patterns = null) {} + public function punsubscribe($patterns) {} /** * Verify if the specified key/keys exists @@ -1080,6 +1132,7 @@ public function rPushx($key, $value) {} * Returns and removes the first element of the list. * * @param string $key + * @param int $count * * @return mixed|bool|Redis if command executed successfully BOOL FALSE in case of failure (empty list) or Redis if in multi mode * @@ -1094,12 +1147,13 @@ public function rPushx($key, $value) {} * $redis->lPop('key1'); // key1 => [ 'B', 'C' ] * */ - public function lPop($key) {} + public function lPop($key, $count = 0) {} /** * Returns and removes the last element of the list. * * @param string $key + * @param int $count * * @return mixed|bool|Redis if command executed successfully BOOL FALSE in case of failure (empty list) or Redis if in multi mode * @@ -1114,7 +1168,7 @@ public function lPop($key) {} * $redis->rPop('key1'); // key1 => [ 'A', 'B' ] * */ - public function rPop($key) {} + public function rPop($key, $count = 0) {} /** * Is a blocking lPop primitive. If at least one of the lists contains at least one element, @@ -1122,8 +1176,9 @@ public function rPop($key) {} * Il all the list identified by the keys passed in arguments are empty, blPop will block * during the specified timeout until an element is pushed to one of those lists. This element will be popped. * - * @param string|string[] $keys String array containing the keys of the lists OR variadic list of strings - * @param int $timeout Timeout is always the required final parameter + * @param string|string[] $key String array containing the keys of the lists OR variadic list of strings + * @param int $timeout_or_key Timeout is always the required final parameter + * @param mixed ...$extra_args * * @return array|Redis ['listName', 'element'] or Redis if in multi mode * @@ -1158,17 +1213,18 @@ public function rPop($key) {} * // array('key1', 'A') is returned * */ - public function blPop($keys, $timeout) {} + public function blPop($key, $timeout_or_key, ...$extra_args) {} /** * Is a blocking rPop primitive. If at least one of the lists contains at least one element, * the element will be popped from the head of the list and returned to the caller. * Il all the list identified by the keys passed in arguments are empty, brPop will - * block during the specified timeout until an element is pushed to one of those lists. T - * his element will be popped. + * block during the specified timeout until an element is pushed to one of those lists. + * This element will be popped. * - * @param string|string[] $keys String array containing the keys of the lists OR variadic list of strings - * @param int $timeout Timeout is always the required final parameter + * @param string|string[] $key String array containing the keys of the lists OR variadic list of strings + * @param int $timeout_or_key Timeout is always the required final parameter + * @param mixed ...$extra_args * * @return array|Redis ['listName', 'element'] or Redis if in multi mode * @@ -1203,7 +1259,7 @@ public function blPop($keys, $timeout) {} * // array('key1', 'A') is returned * */ - public function brPop(array $keys, $timeout) {} + public function brPop($key, $timeout_or_key, ...$extra_args) {} /** * Returns the size of a list identified by Key. If the list didn't exist or is empty, @@ -1426,8 +1482,8 @@ public function lRemove($key, $value, $count) {} * or the pivot didn't exists, the value is not inserted. * * @param string $key - * @param int $position Redis::BEFORE | Redis::AFTER - * @param string $pivot + * @param string $position Redis::BEFORE | Redis::AFTER + * @param mixed $pivot * @param string|mixed $value * * @return int|Redis The number of the elements in the list, -1 if the pivot didn't exists or Redis if in multi mode @@ -1622,7 +1678,7 @@ public function sCard($key) {} * // } * */ - public function sPop($key, $count = 1) {} + public function sPop($key, $count = 0) {} /** * Returns a random element(s) from the set value at Key, without removing it. @@ -1654,7 +1710,7 @@ public function sPop($key, $count = 1) {} * // } * */ - public function sRandMember($key, $count = 1) {} + public function sRandMember($key, $count = 0) {} /** * Returns the members of a set resulting from the intersection of all the sets @@ -2232,7 +2288,7 @@ public function dbSize() {} * Authenticate the connection using a password. * Warning: The password is sent in plain-text over the network. * - * @param string|string[] $password + * @param mixed $credentials * * @return bool|Redis TRUE if the connection is authenticated, FALSE otherwise or Redis if in multi mode * @@ -2241,7 +2297,7 @@ public function dbSize() {} * @link https://redis.io/commands/auth * @example $redis->auth('foobared'); */ - public function auth($password) {} + public function auth($credentials) {} /** * Starts the background rewrite of AOF (Append-Only File) @@ -2315,7 +2371,7 @@ public function slowLog(string $operation, int $length = null) {} * - "refcount" * - "idletime" * - * @param string $string + * @param string $subcommand * @param string $key * * @return string|int|false|Redis for "encoding", int for "refcount" and "idletime", FALSE if the key doesn't exist or Redis if in multi mode @@ -2331,7 +2387,7 @@ public function slowLog(string $operation, int $length = null) {} * $redis->object("idletime", "l"); // → 400 (in seconds, with a precision of 10 seconds). * */ - public function object($string = '', $key = '') {} + public function object($subcommand, $key) {} /** * Performs a synchronous save. @@ -2401,6 +2457,7 @@ public function wait($numSlaves, $timeout) {} * - list: Redis::REDIS_LIST * - zset: Redis::REDIS_ZSET * - hash: Redis::REDIS_HASH + * - stream: Redis::REDIS_STREAM * - other: Redis::REDIS_NOT_FOUND * * @throws RedisException @@ -2536,7 +2593,7 @@ public function strlen($key) {} * $redis->bitpos('key', 0, 1, 5); // int(-1) * */ - public function bitpos($key, $bit, $start = 0, $end = null) {} + public function bitpos($key, $bit, $start = 0, $end = -1) {} /** * Return a single bit out of a larger string @@ -2584,6 +2641,8 @@ public function setBit($key, $offset, $value) {} * Count bits in a string * * @param string $key + * @param int $start + * @param int $end * * @return int|Redis The number of bits set to 1 in the value behind the input key or Redis if in multi mode * @@ -2599,7 +2658,7 @@ public function setBit($key, $offset, $value) {} * var_dump( $redis->bitCount('bit', 0, 2) ); // int(11) * */ - public function bitCount($key) {} + public function bitCount($key, $start = 0, $end = -1) {} /** * Bitwise operation on multiple keys. @@ -2630,16 +2689,20 @@ public function bitOp($operation, $retKey, $key1, ...$otherKeys) {} /** * Removes all entries from the current database. * + * @param bool $async requires server version 4.0.0 or greater + * * @return bool|Redis Always TRUE or Redis if in multi mode * @throws RedisException * @link https://redis.io/commands/flushdb * @example $redis->flushDB(); */ - public function flushDB() {} + public function flushDB($async = null) {} /** * Removes all entries from all databases. * + * @param bool $async requires server version 4.0.0 or greater + * * @return bool|Redis Always TRUE or Redis if in multi mode * * @throws RedisException @@ -2647,7 +2710,7 @@ public function flushDB() {} * @link https://redis.io/commands/flushall * @example $redis->flushAll(); */ - public function flushAll() {} + public function flushAll($async = null) {} /** * Sort @@ -2781,6 +2844,7 @@ public function role() {} * @example $redis->resetStat(); * @link https://redis.io/commands/config-resetstat */ + #[Deprecated(replacement: '%class%->rawCommand(\'CONFIG\', \'RESETSTAT\');')] public function resetStat() {} /** @@ -2795,7 +2859,7 @@ public function resetStat() {} * @link https://redis.io/commands/ttl * @example *
- * $redis->setEx('key', 123, 'test'); + * $redis->setex('key', 123, 'test'); * $redis->ttl('key'); // int(123) **/ @@ -2815,7 +2879,7 @@ public function ttl($key) {} * @link https://redis.io/commands/pttl * @example *
- * $redis->setEx('key', 123, 'test'); + * $redis->setex('key', 123, 'test'); * $redis->pttl('key'); // int(122999) **/ @@ -3040,7 +3104,7 @@ public function zAdd($key, $options, $score1, $value1 = null, $score2 = null, $v * @param string $key * @param int $start * @param int $end - * @param bool $withscores + * @param mixed $withscores * * @return array|Redis Array containing the values in specified range or Redis if in multi mode * @@ -3110,7 +3174,7 @@ public function zDelete($key, $member1, ...$otherMembers) {} * @param string $key * @param int $start * @param int $end - * @param bool $withscore + * @param mixed $withscore * * @return array|Redis Array containing the values in specified range or Redis if in multi mode * @@ -3203,7 +3267,7 @@ public function zRevRangeByScore($key, $start, $end, array $options = []) {} * $redis->zRangeByLex('key', '-', '[c'); // array('b', 'c') * */ - public function zRangeByLex($key, $min, $max, $offset = null, $limit = null) {} + public function zRangeByLex($key, $min, $max, $offset = -1, $limit = -1) {} /** * @see zRangeByLex() @@ -3219,7 +3283,7 @@ public function zRangeByLex($key, $min, $max, $offset = null, $limit = null) {} * * @link https://redis.io/commands/zrevrangebylex */ - public function zRevRangeByLex($key, $min, $max, $offset = null, $limit = null) {} + public function zRevRangeByLex($key, $min, $max, $offset = -1, $limit = -1) {} /** * Returns the number of elements of the sorted set stored at the specified key which have @@ -3403,7 +3467,7 @@ public function zRevRank($key, $member) {} * * @param string $key * @param float $value (double) value that will be added to the member's score - * @param string $member + * @param string|mixed $member * * @return float|Redis the new value or Redis if in multi mode * @@ -3461,7 +3525,7 @@ public function zIncrBy($key, $value, $member) {} * $redis->zUnionStore('ko3', array('k1', 'k2'), array(5, 1)); // 4, 'ko3' => array('val0', 'val2', 'val3', 'val1') * */ - public function zUnionStore($output, $zSetKeys, ?array $weights = null, $aggregateFunction = 'SUM') {} + public function zUnionStore($output, $zSetKeys, ?array $weights = null, $aggregateFunction = null) {} /** * @param string $Output @@ -3519,7 +3583,7 @@ public function zUnion($Output, $ZSetKeys, array $Weights = null, $aggregateFunc * $redis->zInterStore('ko4', array('k1', 'k2'), array(1, 5), 'max'); // 2, 'ko4' => array('val3', 'val1') * */ - public function zInterStore($output, $zSetKeys, array $weights = null, $aggregateFunction = 'SUM') {} + public function zInterStore($output, $zSetKeys, array $weights = null, $aggregateFunction = null) {} /** * @param $Output @@ -3560,9 +3624,9 @@ public function zScan($key, &$iterator, $pattern = null, $count = 0) {} * Block until Redis can pop the highest or lowest scoring members from one or more ZSETs. * There are two commands (BZPOPMIN and BZPOPMAX for popping the lowest and highest scoring elements respectively.) * - * @param string|array $key1 - * @param string|array $key2 ... - * @param int $timeout + * @param string|array $key + * @param string|int|array $timeout_or_key ... + * @param mixed ...$extra_args * * @return array|Redis Either an array with the key member and score of the highest or lowest element or an empty array or Redis if in multi mode * if the timeout was reached without an element to pop. @@ -3582,12 +3646,12 @@ public function zScan($key, &$iterator, $pattern = null, $count = 0) {} * $redis->bzPopMax('zs1', 'zs2', 5); * */ - public function bzPopMax($key1, $key2, $timeout) {} + public function bzPopMax($key, $timeout_or_key, ...$extra_args) {} /** - * @param string|array $key1 - * @param string|array $key2 ... - * @param int $timeout + * @param string|array $key + * @param string|int|array $timeout_or_key ... + * @param mixed ...$extra_args * * @return array|Redis Either an array with the key member and score of the highest or lowest element or an empty array or Redis if in multi mode * if the timeout was reached without an element to pop. @@ -3598,7 +3662,7 @@ public function bzPopMax($key1, $key2, $timeout) {} * @since >= 5.0 * @link https://redis.io/commands/bzpopmin */ - public function bzPopMin($key1, $key2, $timeout) {} + public function bzPopMin($key, $timeout_or_key, ...$extra_args) {} /** * Can pop the highest scoring members from one ZSET. @@ -3621,7 +3685,7 @@ public function bzPopMin($key1, $key2, $timeout) {} * $redis->zPopMax('zs1', 3); * */ - public function zPopMax($key, $count = 1) {} + public function zPopMax($key, $count = null) {} /** * Can pop the lowest scoring members from one ZSET. @@ -3644,7 +3708,7 @@ public function zPopMax($key, $count = 1) {} * $redis->zPopMin('zs1', 3); * */ - public function zPopMin($key, $count = 1) {} + public function zPopMin($key, $count = null) {} /** * Adds a value to the hash stored at key. If this value is already in the hash, FALSE is returned. @@ -3994,7 +4058,7 @@ public function hMGet($key, $hashKeys) {} * @param string $pattern Optional pattern to match against. * @param int $count How many keys to return in a go (only a sugestion to Redis). * - * @return array|Redis An array of members that match our pattern or Redis if in multi mode + * @return array|bool|Redis An array of members that match our pattern or Redis if in multi mode * * @throws RedisException * @@ -4035,6 +4099,7 @@ public function hStrLen(string $key, string $field) {} * @param float $longitude * @param float $latitude * @param string $member + * @param mixed ...$other_triples * * @return int|Redis The number of elements added to the geospatial key or Redis if in multi mode * @@ -4055,7 +4120,7 @@ public function hStrLen(string $key, string $field) {} * ); // 2 * */ - public function geoAdd($key, $longitude, $latitude, $member) {} + public function geoAdd($key, $longitude, $latitude, $member, ...$other_triples) {} /** * Retrieve Geohash strings for one or more elements of a geospatial index. @@ -4089,7 +4154,7 @@ public function geoHash($key, ...$member) {} * Return longitude, latitude positions for each requested member. * * @param string $key - * @param string $member + * @param string ...$member * @return array|Redis One or more longitude/latitude positions or Redis if in multi mode * * @throws RedisException @@ -4116,7 +4181,7 @@ public function geoHash($key, ...$member) {} * } * */ - public function geoPos(string $key, string $member) {} + public function geoPos(string $key, string ...$member) {} /** * Return the distance between two members in a geospatial set. @@ -4271,7 +4336,7 @@ public function geoDist($key, $member1, $member2, $unit = null) {} * } * */ - public function geoRadius($key, $longitude, $latitude, $radius, $unit, array $options = null) {} + public function geoRadius($key, $longitude, $latitude, $radius, $unit, array $options = []) {} /** * This method is identical to geoRadius except that instead of passing a longitude and latitude as the "source" @@ -4313,7 +4378,7 @@ public function geoRadius($key, $longitude, $latitude, $radius, $unit, array $op * } * */ - public function geoRadiusByMember($key, $member, $radius, $units, array $options = null) {} + public function geoRadiusByMember($key, $member, $radius, $units, array $options = []) {} /** * Get or Set the redis config keys. @@ -4333,7 +4398,7 @@ public function geoRadiusByMember($key, $member, $radius, $units, array $options * $redis->config("SET", "dir", "/var/run/redis/dumps/"); * */ - public function config($operation, $key, $value = '') {} + public function config($operation, $key, $value = null) {} /** * Evaluate a LUA script serverside @@ -4412,7 +4477,7 @@ public function evaluateSha($scriptSha, $args = [], $numKeys = 0) {} /** * Execute the Redis SCRIPT command to perform various operations on the scripting subsystem. * @param string $command load | flush | kill | exists - * @param string $script + * @param mixed ...$script * * @return mixed|Redis returns Redis if in multi mode * @@ -4435,7 +4500,7 @@ public function evaluateSha($scriptSha, $args = [], $numKeys = 0) {} * SCRIPT KILL will return true if a script was able to be killed and false if not * SCRIPT EXISTS will return an array with TRUE or FALSE for each passed script */ - public function script($command, $script) {} + public function script($command, ...$script) {} /** * The last error message (if any) @@ -4506,12 +4571,12 @@ public function clearLastError() {} * $redis->client('kill',
- * $redis->pubaub('channels'); // All channels - * $redis->pubaub('channels', '*pattern*'); // Just channels matching your pattern - * $redis->pubaub('numsub', array('chan1', 'chan2')); // Get subscriber counts for 'chan1' and 'chan2' - * $redis->pubaub('numpat'); // Get the number of pattern subscribers + * $redis->pubsub('channels'); // All channels + * $redis->pubsub('channels', '*pattern*'); // Just channels matching your pattern + * $redis->pubsub('numsub', array('chan1', 'chan2')); // Get subscriber counts for 'chan1' and 'chan2' + * $redis->pubsub('numpat'); // Get the number of pattern subscribers **/ - public function pubaub($keyword, $argument = null) {} + public function pubsub($keyword, $argument = null) {} /** * Stop listening for messages posted to the given channels. From aca842b158f8efbe882db446b1454f292e2b8c32 Mon Sep 17 00:00:00 2001 From: RobiNN
* https://secure.php.net/manual/en/reserved.variables.php
*/
-$argv = [];
+$argv = [1 + 1 => "a" . "b"];
/**
* @xglobal $HTTP_RAW_POST_DATA string
From eb37154d91147537004a2ffdadf3d48b02ee20d4 Mon Sep 17 00:00:00 2001
From: Kirill Smelov
* If used and set to true, var_export will return - * the variable representation instead of outputing it. + * the variable representation instead of outputting it. *
* @return string|null the variable representation when the return * parameter is used and evaluates to true. Otherwise, this function will From 4d331ab4966645b750ad1249aa05bcdb9ec04289 Mon Sep 17 00:00:00 2001 From: DmitryTronin* A string identifying the actor that caused the error. *
- * @param string $details [optional]+ * @param mixed $details [optional]
* More details about the cause of the error. *
* @param string $name [optional]
From af69214052e8b3d417ec5d6ceed3a22e4f206ef0 Mon Sep 17 00:00:00 2001
From: Brad <28307684+mad-briller@users.noreply.github.com>
Date: Thu, 6 Oct 2022 10:24:33 +0100
Subject: [PATCH 193/419] fpm_get_status may return false if the fpm scoreboard
is locked or unavailable.
---
fpm/fpm.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fpm/fpm.php b/fpm/fpm.php
index 6bd6d1c0c..4a6550ccc 100644
--- a/fpm/fpm.php
+++ b/fpm/fpm.php
@@ -2,9 +2,9 @@
/**
* Returns FPM status info array
* @since 7.3
- * @return array
+ * @return array|false
*/
-function fpm_get_status(): array {}
+function fpm_get_status(): array|false {}
/**
* This function flushes all response data to the client and finishes the request.
From 606e0616b8014f3b3329254ce25eeedd0d494fd7 Mon Sep 17 00:00:00 2001
From: Lars Moelleken
* Returns TRUE on success or the error code. *
@@ -1154,7 +1154,7 @@ public function unchangeName(#[LanguageLevelTypeAware(['8.0' => 'string'], defau * @param string $pathto* Location where to extract the files. *
- * @param mixed $files [optional]+ * @param string[]|string|null $files [optional]
* The entries to extract. It accepts either a single entry name or * an array of names. *
From 5983aca1e6cf799a4c867c678d69b25cbdc22fbe Mon Sep 17 00:00:00 2001 From: DmitryTronin- * function f($redis, $chan, $msg) { - * switch($chan) { - * case 'chan-1': - * ... - * break; - * - * case 'chan-2': - * ... - * break; - * - * case 'chan-2': - * ... - * break; - * } - * } - * - * $redis->subscribe(array('chan-1', 'chan-2', 'chan-3'), 'f'); // subscribe to 3 chans - *+ * @since 2.0 */ - public function subscribe($channels, $callback) {} + public function subscribe(string $channel, string ...$other_channels) + { + } /** * Subscribe to channels by pattern @@ -823,7 +867,9 @@ public function subscribe($channels, $callback) {} * $redis->psubscribe(array('chan-1', 'chan-2', 'chan-3'), 'f') * */ - public function psubscribe($patterns, $callback) {} + public function psubscribe($patterns, $callback) + { + } /** * Publish messages to channels. @@ -833,14 +879,16 @@ public function psubscribe($patterns, $callback) {} * @param string $channel a channel to publish to * @param string $message string * - * @return int|Redis Number of clients that received the message or Redis if in multimode + * @return false|int|Redis Number of clients that received the message or Redis if in multimode * * @throws RedisException * * @link https://redis.io/commands/publish * @example $redis->publish('chan-1', 'hello, world!'); // send message. */ - public function publish($channel, $message) {} + public function publish($channel, $message) + { + } /** * A command allowing you to get information on the Redis pub/sub system @@ -867,12 +915,15 @@ public function publish($channel, $message) {} * $redis->pubsub('numpat'); // Get the number of pattern subscribers * */ - public function pubsub($keyword, $argument = null) {} + public function pubsub($keyword, $argument = null) + { + } /** * Stop listening for messages posted to the given channels. * - * @param array $channels an array of channels to usubscribe + * @param string $channel + * @param string ...$other_channels * * @return bool|array * @@ -880,20 +931,24 @@ public function pubsub($keyword, $argument = null) {} * * @link https://redis.io/commands/unsubscribe */ - public function unsubscribe($channels) {} + public function unsubscribe(string $channel, string ...$other_channels) + { + } /** * Stop listening for messages posted to the given channels. * * @param array $patterns an array of glob-style patterns to unsubscribe * - * @return bool|array + * @return false|array * * @throws RedisException * * @link https://redis.io/commands/punsubscribe */ - public function punsubscribe($patterns) {} + public function punsubscribe(array $patterns) + { + } /** * Verify if the specified key/keys exists @@ -920,14 +975,16 @@ public function punsubscribe($patterns) {} * $redis->exists('foo', 'bar', 'baz'); // 3 * */ - public function exists($key) {} + public function exists($key) + { + } /** * Increment the number stored at key by one. * * @param string $key * - * @return int|Redis the new value or Redis if in multimode + * @return false|int|Redis the new value or Redis if in multimode * * @throws RedisException * @@ -940,7 +997,9 @@ public function exists($key) {} * $redis->incr('key1'); // 4 * */ - public function incr($key) {} + public function incr($key) + { + } /** * Increment the float value of a key by the given amount @@ -960,7 +1019,9 @@ public function incr($key) {} * $redis->get('x'); // float(4.5) * */ - public function incrByFloat($key, $increment) {} + public function incrByFloat($key, $increment) + { + } /** * Increment the number stored at key by one. @@ -969,7 +1030,7 @@ public function incrByFloat($key, $increment) {} * @param string $key key * @param int $value value that will be added to key (only for incrBy) * - * @return int|Redis the new value or Redis if in multimode + * @return false|int|Redis the new value or Redis if in multimode * * @throws RedisException * @@ -983,14 +1044,16 @@ public function incrByFloat($key, $increment) {} * $redis->incrBy('key1', 10); // 14 * */ - public function incrBy($key, $value) {} + public function incrBy($key, $value) + { + } /** * Decrement the number stored at key by one. * * @param string $key * - * @return int|Redis the new value or Redis if in multimode + * @return false|int|Redis the new value or Redis if in multimode * * @throws RedisException * @@ -1002,7 +1065,9 @@ public function incrBy($key, $value) {} * $redis->decr('key1'); // -3 * */ - public function decr($key) {} + public function decr($key) + { + } /** * Decrement the number stored at key by one. @@ -1011,7 +1076,7 @@ public function decr($key) {} * @param string $key * @param int $value that will be subtracted to key (only for decrBy) * - * @return int|Redis the new value or Redis if in multimode + * @return false|int|Redis the new value or Redis if in multimode * * @throws RedisException * @@ -1024,7 +1089,9 @@ public function decr($key) {} * $redis->decrBy('key1', 10); // -13 * */ - public function decrBy($key, $value) {} + public function decrBy($key, $value) + { + } /** * Adds the string values to the head (left) of the list. @@ -1052,7 +1119,9 @@ public function decrBy($key, $value) {} * // } * */ - public function lPush($key, ...$value1) {} + public function lPush($key, ...$value1) + { + } /** * Adds the string values to the tail (right) of the list. @@ -1080,7 +1149,9 @@ public function lPush($key, ...$value1) {} * // } * */ - public function rPush($key, ...$value1) {} + public function rPush($key, ...$value1) + { + } /** * Adds the string value to the head (left) of the list if the list exists. @@ -1103,7 +1174,9 @@ public function rPush($key, ...$value1) {} * // key1 now points to the following list: [ 'A', 'B', 'C' ] * */ - public function lPushx($key, $value) {} + public function lPushx($key, string $value) + { + } /** * Adds the string value to the tail (right) of the list if the ist exists. FALSE in case of Failure. @@ -1126,7 +1199,9 @@ public function lPushx($key, $value) {} * // key1 now points to the following list: [ 'A', 'B', 'C' ] * */ - public function rPushx($key, $value) {} + public function rPushx($key, string $value) + { + } /** * Returns and removes the first element of the list. @@ -1147,7 +1222,9 @@ public function rPushx($key, $value) {} * $redis->lPop('key1'); // key1 => [ 'B', 'C' ] * */ - public function lPop($key, $count = 0) {} + public function lPop($key, $count = 0) + { + } /** * Returns and removes the last element of the list. @@ -1168,7 +1245,9 @@ public function lPop($key, $count = 0) {} * $redis->rPop('key1'); // key1 => [ 'A', 'B' ] * */ - public function rPop($key, $count = 0) {} + public function rPop($key, $count = 0) + { + } /** * Is a blocking lPop primitive. If at least one of the lists contains at least one element, @@ -1213,7 +1292,9 @@ public function rPop($key, $count = 0) {} * // array('key1', 'A') is returned * */ - public function blPop($key, $timeout_or_key, ...$extra_args) {} + public function blPop($key, $timeout_or_key, ...$extra_args) + { + } /** * Is a blocking rPop primitive. If at least one of the lists contains at least one element, @@ -1259,7 +1340,9 @@ public function blPop($key, $timeout_or_key, ...$extra_args) {} * // array('key1', 'A') is returned * */ - public function brPop($key, $timeout_or_key, ...$extra_args) {} + public function brPop($key, $timeout_or_key, ...$extra_args) + { + } /** * Returns the size of a list identified by Key. If the list didn't exist or is empty, @@ -1283,19 +1366,23 @@ public function brPop($key, $timeout_or_key, ...$extra_args) {} * $redis->lLen('key1'); // 2 * */ - public function lLen($key) {} + public function lLen($key) + { + } /** * @link https://redis.io/commands/llen * * @param string $key * - * @return int|Redis The size of the list identified by Key exists or Redis if in multimode + * @return false|int|Redis The size of the list identified by Key exists or Redis if in multimode * * @throws RedisException */ #[Deprecated(replacement: '%class%->lLen(%parametersList%)')] - public function lSize($key) {} + public function lSize($key) + { + } /** * Return the specified element of the list stored at the specified key. @@ -1322,7 +1409,9 @@ public function lSize($key) {} * $redis->lIndex('key1', 10); // `FALSE` * */ - public function lIndex($key, $index) {} + public function lIndex($key, $index) + { + } /** * @link https://redis.io/commands/lindex @@ -1334,7 +1423,9 @@ public function lIndex($key, $index) {} * @throws RedisException */ #[Deprecated(replacement: '%class%->lIndex(%parametersList%)')] - public function lGet($key, $index) {} + public function lGet($key, $index) + { + } /** * Set the list at index with the new value. @@ -1359,7 +1450,9 @@ public function lGet($key, $index) {} * $redis->lIndex('key1', 0); // 'X' * */ - public function lSet($key, $index, $value) {} + public function lSet($key, $index, string $value) + { + } /** * Returns the specified elements of the list stored at the specified key in @@ -1383,7 +1476,9 @@ public function lSet($key, $index, $value) {} * $redis->lRange('key1', 0, -1); // array('A', 'B', 'C') * */ - public function lRange($key, $start, $end) {} + public function lRange($key, $start, $end) + { + } /** * @link https://redis.io/commands/lrange @@ -1396,7 +1491,9 @@ public function lRange($key, $start, $end) {} * @throws RedisException */ #[Deprecated(replacement: '%class%->lRange(%parametersList%)')] - public function lGetRange($key, $start, $end) {} + public function lGetRange($key, $start, $end) + { + } /** * Trims an existing list so that it will contain only a specified range of elements. @@ -1420,7 +1517,9 @@ public function lGetRange($key, $start, $end) {} * $redis->lRange('key1', 0, -1); // array('A', 'B') * */ - public function lTrim($key, $start, $stop) {} + public function lTrim($key, $start, $stop) + { + } /** * @link https://redis.io/commands/ltrim @@ -1432,7 +1531,9 @@ public function lTrim($key, $start, $stop) {} * @throws RedisException */ #[Deprecated(replacement: '%class%->lTrim(%parametersList%)')] - public function listTrim($key, $start, $stop) {} + public function listTrim($key, $start, $stop) + { + } /** * Removes the first count occurrences of the value element from the list. @@ -1462,7 +1563,9 @@ public function listTrim($key, $start, $stop) {} * $redis->lRange('key1', 0, -1); // array('C', 'B', 'A') * */ - public function lRem($key, $value, $count) {} + public function lRem($key, $value, $count) + { + } /** * @link https://redis.io/commands/lremove @@ -1474,7 +1577,9 @@ public function lRem($key, $value, $count) {} * @throws RedisException */ #[Deprecated(replacement: '%class%->lRem(%parametersList%)')] - public function lRemove($key, $value, $count) {} + public function lRemove($key, $value, $count) + { + } /** * Insert value in the list before or after the pivot value. the parameter options @@ -1486,7 +1591,7 @@ public function lRemove($key, $value, $count) {} * @param mixed $pivot * @param string|mixed $value * - * @return int|Redis The number of the elements in the list, -1 if the pivot didn't exists or Redis if in multimode + * @return false|int|Redis The number of the elements in the list, -1 if the pivot didn't exists or Redis if in multimode * * @throws RedisException * @@ -1509,19 +1614,20 @@ public function lRemove($key, $value, $count) {} * $redis->lInsert('key1', Redis::AFTER, 'W', 'value'); // -1 * */ - public function lInsert($key, $position, $pivot, $value) {} + public function lInsert($key, $position, $pivot, $value) + { + } /** * Adds a values to the set value stored at key. * - * @param string $key Required key - * @param string|mixed ...$value1 Variadic list of values + * @param string $key Required key + * @param string $value + * @param mixed ...$other_values Variadic list of values * * @return int|bool|Redis The number of elements added to the set or Redis if in multimode * If this value is already in the set, FALSE is returned * - * @throws RedisException - * * @link https://redis.io/commands/sadd * @example *
@@ -1529,17 +1635,18 @@ public function lInsert($key, $position, $pivot, $value) {} * $redis->sAdd('k', 'v1', 'v2', 'v3'); // int(2) **/ - public function sAdd($key, ...$value1) {} + public function sAdd(string $key, string $value, mixed ...$other_values) + { + } /** * Removes the specified members from the set value stored at key. * - * @param string $key - * @param string|mixed ...$member1 Variadic list of members - * - * @return int|Redis The number of elements removed from the set or Redis if in multimode + * @param string $key + * @param string $value + * @param string|mixed ...$other_values Variadic list of members * - * @throws RedisException + * @return false|int|Redis The number of elements removed from the set or Redis if in multimode * * @link https://redis.io/commands/srem * @example @@ -1553,7 +1660,9 @@ public function sAdd($key, ...$value1) {} * // } * */ - public function sRem($key, ...$member1) {} + public function sRem(string $key, string $value, ...$other_values) + { + } /** * @link https://redis.io/commands/srem @@ -1564,14 +1673,16 @@ public function sRem($key, ...$member1) {} * @throws RedisException */ #[Deprecated(replacement: '%class%->sRem(%parametersList%)')] - public function sRemove($key, ...$member1) {} + public function sRemove($key, ...$member1) + { + } /** * Moves the specified member from the set at srcKey to the set at dstKey. * * @param string $srcKey * @param string $dstKey - * @param string|mixed $member + * @param string $member * * @return bool|Redis If the operation is successful, return TRUE or Redis if in multimode * If the srcKey and/or dstKey didn't exist, and/or the member didn't exist in srcKey, FALSE is returned. @@ -1590,7 +1701,9 @@ public function sRemove($key, ...$member1) {} * // 'key2' => {'set21', 'set22', 'set13'} * */ - public function sMove($srcKey, $dstKey, $member) {} + public function sMove($srcKey, $dstKey, string $member) + { + } /** * Checks if value is a member of the set stored at the key key. @@ -1613,7 +1726,9 @@ public function sMove($srcKey, $dstKey, $member) {} * $redis->sIsMember('key1', 'setX'); // FALSE * */ - public function sIsMember($key, $value) {} + public function sIsMember(string $key, string $value) + { + } /** * @link https://redis.io/commands/sismember @@ -1624,14 +1739,16 @@ public function sIsMember($key, $value) {} * @throws RedisException */ #[Deprecated(replacement: '%class%->sIsMember(%parametersList%)')] - public function sContains($key, $value) {} + public function sContains($key, $value) + { + } /** * Returns the cardinality of the set identified by key. * * @param string $key * - * @return int|Redis the cardinality of the set identified by key, 0 if the set doesn't exist or Redis if in multimode + * @return false|int|Redis the cardinality of the set identified by key, 0 if the set doesn't exist or Redis if in multimode * * @throws RedisException * @@ -1645,7 +1762,9 @@ public function sContains($key, $value) {} * $redis->sCard('keyX'); // 0 * */ - public function sCard($key) {} + public function sCard($key) + { + } /** * Removes and returns a random element from the set value at Key. @@ -1678,7 +1797,9 @@ public function sCard($key) {} * // } * */ - public function sPop($key, $count = 0) {} + public function sPop($key, $count = 0) + { + } /** * Returns a random element(s) from the set value at Key, without removing it. @@ -1710,7 +1831,9 @@ public function sPop($key, $count = 0) {} * // } * */ - public function sRandMember($key, $count = 0) {} + public function sRandMember($key, $count = 0) + { + } /** * Returns the members of a set resulting from the intersection of all the sets @@ -1749,7 +1872,9 @@ public function sRandMember($key, $count = 0) {} * //} * */ - public function sInter($key1, ...$otherKeys) {} + public function sInter($key1, ...$otherKeys) + { + } /** * Performs a sInter command and stores the result in a new set. @@ -1789,7 +1914,9 @@ public function sInter($key1, ...$otherKeys) {} * //} * */ - public function sInterStore($dstKey, $key1, ...$otherKeys) {} + public function sInterStore($dstKey, $key1, ...$otherKeys) + { + } /** * Performs the union between N sets and returns it. @@ -1825,7 +1952,9 @@ public function sInterStore($dstKey, $key1, ...$otherKeys) {} * //} * */ - public function sUnion($key1, ...$otherKeys) {} + public function sUnion($key1, ...$otherKeys) + { + } /** * Performs the same action as sUnion, but stores the result in the first key @@ -1834,7 +1963,7 @@ public function sUnion($key1, ...$otherKeys) {} * @param string $key1 first key for union * @param string ...$otherKeys variadic list of keys corresponding to sets in redis * - * @return int|Redis Any number of keys corresponding to sets in redis or Redis if in multimode + * @return false|int|Redis Any number of keys corresponding to sets in redis or Redis if in multimode * * @throws RedisException * @@ -1866,7 +1995,9 @@ public function sUnion($key1, ...$otherKeys) {} * //} * */ - public function sUnionStore($dstKey, $key1, ...$otherKeys) {} + public function sUnionStore($dstKey, $key1, ...$otherKeys) + { + } /** * Performs the difference between N sets and returns it. @@ -1901,7 +2032,9 @@ public function sUnionStore($dstKey, $key1, ...$otherKeys) {} * //} * */ - public function sDiff($key1, ...$otherKeys) {} + public function sDiff($key1, ...$otherKeys) + { + } /** * Performs the same action as sDiff, but stores the result in the first key @@ -1939,7 +2072,9 @@ public function sDiff($key1, ...$otherKeys) {} * //} * */ - public function sDiffStore($dstKey, $key1, ...$otherKeys) {} + public function sDiffStore($dstKey, $key1, ...$otherKeys) + { + } /** * Returns the contents of a set. @@ -1971,7 +2106,13 @@ public function sDiffStore($dstKey, $key1, ...$otherKeys) {} * // The order is random and corresponds to redis' own internal representation of the set structure. * */ - public function sMembers($key) {} + public function sMembers($key) + { + } + + public function sMisMember(string $key, string $member, string ...$other_members): array|false + { + } /** * @link https://redis.io/commands/smembers @@ -1982,7 +2123,9 @@ public function sMembers($key) {} * @throws RedisException */ #[Deprecated(replacement: '%class%->sMembers(%parametersList%)')] - public function sGetMembers($key) {} + public function sGetMembers($key) + { + } /** * Scan a set for members @@ -2007,7 +2150,9 @@ public function sGetMembers($key) {} * } * */ - public function sScan($key, &$iterator, $pattern = null, $count = 0) {} + public function sScan($key, &$iterator, $pattern = null, $count = 0) + { + } /** * Sets a value and returns the previous entry at that key. @@ -2027,7 +2172,9 @@ public function sScan($key, &$iterator, $pattern = null, $count = 0) {} * $newValue = $redis->get('x')' // return 'lol' * */ - public function getSet($key, $value) {} + public function getSet($key, string $value) + { + } /** * Returns a random key @@ -2043,7 +2190,9 @@ public function getSet($key, $value) {} * $surprise = $redis->get($key); // who knows what's in there. * */ - public function randomKey() {} + public function randomKey() + { + } /** * Switches to a given database @@ -2064,7 +2213,9 @@ public function randomKey() {} * $redis->get('x'); // will return 42 * */ - public function select($dbIndex) {} + public function select($dbIndex) + { + } /** * Moves a key to a different database. @@ -2086,7 +2237,9 @@ public function select($dbIndex) {} * $redis->get('x'); // will return 42 * */ - public function move($key, $dbIndex) {} + public function move($key, $dbIndex) + { + } /** * Renames a key @@ -2107,7 +2260,9 @@ public function move($key, $dbIndex) {} * $redis->get('x'); // → `FALSE` * */ - public function rename($srcKey, $dstKey) {} + public function rename($srcKey, $dstKey) + { + } /** * @link https://redis.io/commands/rename @@ -2118,7 +2273,9 @@ public function rename($srcKey, $dstKey) {} * @throws RedisException */ #[Deprecated(replacement: '%class%->rename(%parametersList%)')] - public function renameKey($srcKey, $dstKey) {} + public function renameKey($srcKey, $dstKey) + { + } /** * Renames a key @@ -2142,7 +2299,9 @@ public function renameKey($srcKey, $dstKey) {} * $redis->get('x'); // → `FALSE` * */ - public function renameNx($srcKey, $dstKey) {} + public function renameNx($srcKey, $dstKey) + { + } /** * Sets an expiration date (a timeout) on an item @@ -2163,7 +2322,9 @@ public function renameNx($srcKey, $dstKey) {} * $redis->get('x'); // will return `FALSE`, as 'x' has expired. * */ - public function expire($key, $ttl) {} + public function expire($key, $ttl) + { + } /** * Sets an expiration date (a timeout in milliseconds) on an item @@ -2184,7 +2345,9 @@ public function expire($key, $ttl) {} * $redis->pttl('x'); // 11500 * */ - public function pExpire($key, $ttl) {} + public function pExpire($key, $ttl) + { + } /** * @link https://redis.io/commands/expire @@ -2196,7 +2359,9 @@ public function pExpire($key, $ttl) {} * @throws RedisException */ #[Deprecated(replacement: '%class%->expire(%parametersList%)')] - public function setTimeout($key, $ttl) {} + public function setTimeout($key, $ttl) + { + } /** * Sets an expiration date (a timestamp) on an item. @@ -2218,7 +2383,9 @@ public function setTimeout($key, $ttl) {} * $redis->get('x'); // will return `FALSE`, as 'x' has expired. * */ - public function expireAt($key, $timestamp) {} + public function expireAt($key, $timestamp) + { + } /** * Sets an expiration date (a timestamp) on an item. Requires a timestamp in milliseconds @@ -2239,7 +2406,9 @@ public function expireAt($key, $timestamp) {} * echo $redis->pttl('x'); // 218270120575 * */ - public function pExpireAt($key, $timestamp) {} + public function pExpireAt($key, $timestamp) + { + } /** * Returns the keys that match a certain pattern. @@ -2257,7 +2426,9 @@ public function pExpireAt($key, $timestamp) {} * $keyWithUserPrefix = $redis->keys('user*'); * */ - public function keys($pattern) {} + public function keys($pattern) + { + } /** * @param string $pattern @@ -2266,12 +2437,14 @@ public function keys($pattern) {} * @link https://redis.io/commands/keys */ #[Deprecated(replacement: '%class%->keys(%parametersList%)')] - public function getKeys($pattern) {} + public function getKeys($pattern) + { + } /** * Returns the current database's size * - * @return int|Redis DB size, in number of keys or Redis if in multimode + * @return false|int|Redis DB size, in number of keys or Redis if in multimode * * @throws RedisException * @@ -2282,7 +2455,9 @@ public function getKeys($pattern) {} * echo "Redis has $count keys\n"; * */ - public function dbSize() {} + public function dbSize() + { + } /** * Authenticate the connection using a password. @@ -2297,7 +2472,9 @@ public function dbSize() {} * @link https://redis.io/commands/auth * @example $redis->auth('foobared'); */ - public function auth($credentials) {} + public function auth($credentials) + { + } /** * Starts the background rewrite of AOF (Append-Only File) @@ -2309,7 +2486,9 @@ public function auth($credentials) {} * @link https://redis.io/commands/bgrewriteaof * @example $redis->bgrewriteaof(); */ - public function bgrewriteaof() {} + public function bgrewriteaof() + { + } /** * Changes the slave status @@ -2330,7 +2509,9 @@ public function bgrewriteaof() {} * $redis->slaveof(); * */ - public function slaveof($host = '127.0.0.1', $port = 6379) {} + public function slaveof($host = '127.0.0.1', $port = 6379) + { + } /** * Access the Redis slowLog @@ -2361,7 +2542,9 @@ public function slaveof($host = '127.0.0.1', $port = 6379) {} * * @link https://redis.io/commands/slowlog */ - public function slowLog(string $operation, int $length = null) {} + public function slowLog(string $operation, int $length = null) + { + } /** * Describes the object pointed to by a key. @@ -2387,7 +2570,9 @@ public function slowLog(string $operation, int $length = null) {} * $redis->object("idletime", "l"); // → 400 (in seconds, with a precision of 10 seconds). * */ - public function object($subcommand, $key) {} + public function object($subcommand, $key) + { + } /** * Performs a synchronous save. @@ -2400,7 +2585,9 @@ public function object($subcommand, $key) {} * @link https://redis.io/commands/save * @example $redis->save(); */ - public function save() {} + public function save() + { + } /** * Performs a background save. @@ -2413,19 +2600,23 @@ public function save() {} * @link https://redis.io/commands/bgsave * @example $redis->bgSave(); */ - public function bgsave() {} + public function bgsave() + { + } /** * Returns the timestamp of the last disk save. * - * @return int|Redis timestamp or Redis if in multimode + * @return false|int|Redis timestamp or Redis if in multimode * * @throws RedisException * * @link https://redis.io/commands/lastsave * @example $redis->lastSave(); */ - public function lastSave() {} + public function lastSave() + { + } /** * Blocks the current client until all the previous write commands are successfully transferred and @@ -2442,14 +2633,16 @@ public function lastSave() {} * @link https://redis.io/commands/wait * @example $redis->wait(2, 1000); */ - public function wait($numSlaves, $timeout) {} + public function wait($numSlaves, $timeout) + { + } /** * Returns the type of data pointed by a given key. * * @param string $key * - * @return int|Redis returns Redis if in multimode + * @return false|int|Redis returns Redis if in multimode * Depending on the type of the data pointed by the key, * this method will return the following value: * - string: Redis::REDIS_STRING @@ -2465,7 +2658,9 @@ public function wait($numSlaves, $timeout) {} * @link https://redis.io/commands/type * @example $redis->type('key'); */ - public function type($key) {} + public function type(string $key) + { + } /** * Append specified string to the string stored in specified key. @@ -2473,7 +2668,7 @@ public function type($key) {} * @param string $key * @param string|mixed $value * - * @return int|Redis Size of the value after the append or Redis if in multimode + * @return false|int|Redis Size of the value after the append or Redis if in multimode * * @throws RedisException * @@ -2485,7 +2680,9 @@ public function type($key) {} * $redis->get('key'); // 'value1value2' * */ - public function append($key, $value) {} + public function append($key, string $value) + { + } /** * Return a substring of a larger string @@ -2506,7 +2703,9 @@ public function append($key, $value) {} * $redis->getRange('key', -5, -1); // 'value' * */ - public function getRange($key, $start, $end) {} + public function getRange($key, $start, $end) + { + } /** * Return a substring of a larger string @@ -2518,7 +2717,9 @@ public function getRange($key, $start, $end) {} * @throws RedisException */ #[Deprecated] - public function substr($key, $start, $end) {} + public function substr($key, $start, $end) + { + } /** * Changes a substring of a larger string. @@ -2527,7 +2728,7 @@ public function substr($key, $start, $end) {} * @param int $offset * @param string $value * - * @return int|Redis the length of the string after it was modified or Redis if in multimode + * @return false|int|Redis the length of the string after it was modified or Redis if in multimode * * @throws RedisException * @@ -2539,13 +2740,15 @@ public function substr($key, $start, $end) {} * $redis->get('key'); // "Hello redis" * */ - public function setRange($key, $offset, $value) {} + public function setRange($key, $offset, $value) + { + } /** * Get the length of a string value. * * @param string $key - * @return int|Redis returns Redis if in multimode + * @return false|int|Redis returns Redis if in multimode * * @throws RedisException * @@ -2556,7 +2759,9 @@ public function setRange($key, $offset, $value) {} * $redis->strlen('key'); // 5 * */ - public function strlen($key) {} + public function strlen($key) + { + } /** * Return the position of the first bit set to 1 or 0 in a string. The position is returned, thinking of the @@ -2568,7 +2773,7 @@ public function strlen($key) {} * @param int $start * @param int $end * - * @return int|Redis The command returns the position of the first bit set to 1 or 0 according to the request or Redis if in multimode + * @return false|int|Redis The command returns the position of the first bit set to 1 or 0 according to the request or Redis if in multimode * If we look for set bits (the bit argument is 1) and the string is empty or composed of just * zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string * only contains bit set to 1, the function returns the first bit not part of the string on the @@ -2593,7 +2798,9 @@ public function strlen($key) {} * $redis->bitpos('key', 0, 1, 5); // int(-1) * */ - public function bitpos($key, $bit, $start = 0, $end = -1) {} + public function bitpos($key, $bit, $start = 0, $end = -1) + { + } /** * Return a single bit out of a larger string @@ -2601,7 +2808,7 @@ public function bitpos($key, $bit, $start = 0, $end = -1) {} * @param string $key * @param int $offset * - * @return int|Redis the bit value (0 or 1) or Redis if in multimode + * @return false|int|Redis the bit value (0 or 1) or Redis if in multimode * * @throws RedisException * @@ -2613,7 +2820,9 @@ public function bitpos($key, $bit, $start = 0, $end = -1) {} * $redis->getBit('key', 1); // 1 * */ - public function getBit($key, $offset) {} + public function getBit($key, $offset) + { + } /** * Changes a single bit of a string. @@ -2622,7 +2831,7 @@ public function getBit($key, $offset) {} * @param int $offset * @param bool|int $value bool or int (1 or 0) * - * @return int|Redis 0 or 1, the value of the bit before it was set or Redis if in multimode + * @return false|int|Redis 0 or 1, the value of the bit before it was set or Redis if in multimode * * @throws RedisException * @@ -2635,7 +2844,9 @@ public function getBit($key, $offset) {} * $redis->get('key'); // chr(0x2f) = "/" = b("0010 1111") * */ - public function setBit($key, $offset, $value) {} + public function setBit($key, $offset, $value) + { + } /** * Count bits in a string @@ -2644,7 +2855,7 @@ public function setBit($key, $offset, $value) {} * @param int $start * @param int $end * - * @return int|Redis The number of bits set to 1 in the value behind the input key or Redis if in multimode + * @return false|int|Redis The number of bits set to 1 in the value behind the input key or Redis if in multimode * * @throws RedisException * @@ -2658,7 +2869,9 @@ public function setBit($key, $offset, $value) {} * var_dump( $redis->bitCount('bit', 0, 2) ); // int(11) * */ - public function bitCount($key, $start = 0, $end = -1) {} + public function bitCount($key, $start = 0, $end = -1) + { + } /** * Bitwise operation on multiple keys. @@ -2668,7 +2881,7 @@ public function bitCount($key, $start = 0, $end = -1) {} * @param string $key1 first key * @param string ...$otherKeys variadic list of keys * - * @return int|Redis The size of the string stored in the destination key or Redis if in multimode + * @return False|int|Redis The size of the string stored in the destination key or Redis if in multimode * * @throws RedisException * @@ -2684,7 +2897,9 @@ public function bitCount($key, $start = 0, $end = -1) {} * $redis->bitOp('XOR', 'bit', 'bit1', 'bit2'); // bit = 11 * */ - public function bitOp($operation, $retKey, $key1, ...$otherKeys) {} + public function bitOp($operation, $retKey, $key1, ...$otherKeys) + { + } /** * Removes all entries from the current database. @@ -2696,7 +2911,9 @@ public function bitOp($operation, $retKey, $key1, ...$otherKeys) {} * @link https://redis.io/commands/flushdb * @example $redis->flushDB(); */ - public function flushDB($async = null) {} + public function flushDB($async = null) + { + } /** * Removes all entries from all databases. @@ -2710,7 +2927,9 @@ public function flushDB($async = null) {} * @link https://redis.io/commands/flushall * @example $redis->flushAll(); */ - public function flushAll($async = null) {} + public function flushAll($async = null) + { + } /** * Sort @@ -2744,7 +2963,9 @@ public function flushAll($async = null) {} * var_dump($redis->sort('s', array('sort' => 'desc', 'store' => 'out'))); // (int)5 * */ - public function sort($key, $option = null) {} + public function sort($key, $option = null) + { + } /** * Returns an associative array of strings and integers @@ -2811,7 +3032,9 @@ public function sort($key, $option = null) {} * $redis->info("CPU"); // just CPU information from Redis INFO * */ - public function info($option = null) {} + public function info($option = null) + { + } /** * Returns an indexed array whose first element is the role @@ -2826,7 +3049,9 @@ public function info($option = null) {} * $redis->role(); * */ - public function role() {} + public function role() + { + } /** * Resets the statistics reported by Redis using the INFO command (`info()` function). @@ -2845,7 +3070,9 @@ public function role() {} * @link https://redis.io/commands/config-resetstat */ #[Deprecated(replacement: '%class%->rawCommand(\'CONFIG\', \'RESETSTAT\');')] - public function resetStat() {} + public function resetStat() + { + } /** * Returns the time to live left for a given key, in seconds. If the key doesn't exist, FALSE is returned. @@ -2863,7 +3090,9 @@ public function resetStat() {} * $redis->ttl('key'); // int(123) * */ - public function ttl($key) {} + public function ttl($key) + { + } /** * Returns a time to live left for a given key, in milliseconds. @@ -2883,7 +3112,9 @@ public function ttl($key) {} * $redis->pttl('key'); // int(122999) * */ - public function pttl($key) {} + public function pttl($key) + { + } /** * Remove the expiration timer from a key. @@ -2897,13 +3128,15 @@ public function pttl($key) {} * @link https://redis.io/commands/persist * @example $redis->persist('key'); */ - public function persist($key) {} + public function persist($key) + { + } /** * Sets multiple key-value pairs in one atomic command. * MSETNX only returns TRUE if all the keys were set (see SETNX). * - * @param array $array Pairs: array(key => value, ...) + * @param array
@@ -2444,7 +2656,9 @@ public function zLexCount($key, $min, $max) {} * $redisCluster->zRange('key',0,-1);// array('a','b','e','f','g') **/ - public function zRemRangeByLex($key, $min, $max) {} + public function zRemRangeByLex(string $key, string $min, string $max) + { + } /** * Add multiple sorted sets and store the resulting sorted set in a new key @@ -2479,7 +2693,9 @@ public function zRemRangeByLex($key, $min, $max) {} * $redisCluster->zUnionStore('ko3', array('k1', 'k2'), array(5, 1)); // 4, 'ko3' => array('val0', 'val2', 'val3','val1') * */ - public function zUnionStore($Output, $ZSetKeys, ?array $Weights = null, $aggregateFunction = 'SUM') {} + public function zUnionStore($Output, $ZSetKeys, ?array $Weights = null, $aggregateFunction = 'SUM') + { + } /** * Intersect multiple sorted sets and store the resulting sorted set in a new key @@ -2518,7 +2734,9 @@ public function zUnionStore($Output, $ZSetKeys, ?array $Weights = null, $aggrega * $redisCluster->zInterStore('ko4', array('k1', 'k2'), array(1, 5), 'max'); // 2, 'ko4' => array('val3', 'val1') * */ - public function zInterStore($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') {} + public function zInterStore($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') + { + } /** * Deletes a specified member from the ordered set. @@ -2543,7 +2761,9 @@ public function zInterStore($Output, $ZSetKeys, array $Weights = null, $aggregat * // } * */ - public function zRem($key, $member1, $member2 = null, $memberN = null) {} + public function zRem($key, $member1, $member2 = null, $memberN = null) + { + } /** * Sort @@ -2574,7 +2794,9 @@ public function zRem($key, $member1, $member2 = null, $memberN = null) {} * var_dump($redisCluster->sort('s', array('sort' => 'desc', 'store' => 'out'))); // (int)5 * */ - public function sort($key, $option = null) {} + public function sort($key, $option = null) + { + } /** * Describes the object pointed to by a key. @@ -2596,7 +2818,9 @@ public function sort($key, $option = null) {} * $redisCluster->object("idletime", "l"); // → 400 (in seconds, with a precision of 10 seconds). * */ - public function object($string = '', $key = '') {} + public function object($string = '', $key = '') + { + } /** * Subscribe to channels. Warning: this function will probably change in the future. @@ -2629,7 +2853,9 @@ public function object($string = '', $key = '') {} * $redisCluster->subscribe(array('chan-1', 'chan-2', 'chan-3'), 'f'); // subscribe to 3 chans * */ - public function subscribe($channels, $callback) {} + public function subscribe($channels, $callback) + { + } /** * Subscribe to channels by pattern @@ -2650,7 +2876,9 @@ public function subscribe($channels, $callback) {} * } * */ - public function psubscribe($patterns, $callback) {} + public function psubscribe($patterns, $callback) + { + } /** * Unsubscribes the client from the given channels, or from all of them if none is given. @@ -2658,7 +2886,9 @@ public function psubscribe($patterns, $callback) {} * @param $channels * @param $callback */ - public function unSubscribe($channels, $callback) {} + public function unSubscribe($channels, $callback) + { + } /** * Unsubscribes the client from the given patterns, or from all of them if none is given. @@ -2666,7 +2896,9 @@ public function unSubscribe($channels, $callback) {} * @param $channels * @param $callback */ - public function punSubscribe($channels, $callback) {} + public function punSubscribe($channels, $callback) + { + } /** * Evaluate a LUA script serverside, from the SHA1 hash of the script instead of the script itself. @@ -2687,7 +2919,9 @@ public function punSubscribe($channels, $callback) {} * $redisCluster->evalSha($sha); // Returns 1 * */ - public function evalSha($scriptSha, $args = [], $numKeys = 0) {} + public function evalSha($scriptSha, $args = [], $numKeys = 0) + { + } /** * Scan the keyspace for keys. @@ -2709,7 +2943,9 @@ public function evalSha($scriptSha, $args = [], $numKeys = 0) {} * } * */ - public function scan(&$iterator, $node, $pattern = null, $count = 0) {} + public function scan(&$iterator, $node, $pattern = null, $count = 0) + { + } /** * Scan a set for members. @@ -2731,7 +2967,9 @@ public function scan(&$iterator, $node, $pattern = null, $count = 0) {} * } * */ - public function sScan($key, &$iterator, $pattern = null, $count = 0) {} + public function sScan($key, &$iterator, $pattern = null, $count = 0) + { + } /** * Scan a sorted set for members, with optional pattern and count. @@ -2753,7 +2991,9 @@ public function sScan($key, &$iterator, $pattern = null, $count = 0) {} * } * */ - public function zScan($key, &$iterator, $pattern = null, $count = 0) {} + public function zScan($key, &$iterator, $pattern = null, $count = 0) + { + } /** * Scan a HASH value for members, with an optional pattern and count. @@ -2775,7 +3015,9 @@ public function zScan($key, &$iterator, $pattern = null, $count = 0) {} * } * */ - public function hScan($key, &$iterator, $pattern = null, $count = 0) {} + public function hScan($key, &$iterator, $pattern = null, $count = 0) + { + } /** * Detect whether we're in ATOMIC/MULTI/PIPELINE mode. @@ -2783,7 +3025,9 @@ public function hScan($key, &$iterator, $pattern = null, $count = 0) {} * @return int Either RedisCluster::ATOMIC, RedisCluster::MULTI or RedisCluster::PIPELINE * @example $redisCluster->getMode(); */ - public function getMode() {} + public function getMode() + { + } /** * The last error message (if any) @@ -2796,7 +3040,9 @@ public function getMode() {} * // "ERR Error compiling script (new function): user_script:1: '=' expected near '-'" * */ - public function getLastError() {} + public function getLastError() + { + } /** * Clear the last error message @@ -2813,7 +3059,9 @@ public function getLastError() {} * // NULL * */ - public function clearLastError() {} + public function clearLastError() + { + } /** * Get client option @@ -2825,7 +3073,9 @@ public function clearLastError() {} * // return RedisCluster::SERIALIZER_NONE, RedisCluster::SERIALIZER_PHP, or RedisCluster::SERIALIZER_IGBINARY. * $redisCluster->getOption(RedisCluster::OPT_SERIALIZER); */ - public function getOption($option) {} + public function getOption($option) + { + } /** * Set client option. @@ -2842,7 +3092,9 @@ public function getOption($option) {} * $redisCluster->setOption(RedisCluster::OPT_PREFIX, 'myAppName:'); // use custom prefix on all keys * */ - public function setOption($option, $value) {} + public function setOption($option, $value) + { + } /** * A utility method to prefix the value with the prefix setting for phpredis. @@ -2856,7 +3108,9 @@ public function setOption($option, $value) {} * $redisCluster->_prefix('my-value'); // Will return 'my-prefix:my-value' * */ - public function _prefix($value) {} + public function _prefix($value) + { + } /** * A utility method to serialize values manually. This method allows you to serialize a value with whatever @@ -2878,7 +3132,9 @@ public function _prefix($value) {} * $redisCluster->_serialize("foo"); // Returns 's:3:"foo";' * */ - public function _serialize($value) {} + public function _serialize($value) + { + } /** * A utility method to unserialize data with whatever serializer is set up. If there is no serializer set, the @@ -2895,7 +3151,9 @@ public function _serialize($value) {} * $redisCluster->_unserialize('a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}'); // Will return Array(1,2,3) * */ - public function _unserialize($value) {} + public function _unserialize($value) + { + } /** * Return all redis master nodes @@ -2906,7 +3164,9 @@ public function _unserialize($value) {} * $redisCluster->_masters(); // Will return [[0=>'127.0.0.1','6379'],[0=>'127.0.0.1','6380']] * */ - public function _masters() {} + public function _masters() + { + } /** * Enter and exit transactional mode. @@ -2936,20 +3196,26 @@ public function _masters() {} * // 3 => 'val2'); * */ - public function multi($mode = RedisCluster::MULTI) {} + public function multi($mode = RedisCluster::MULTI) + { + } /** * @see multi() * @return void|array * @link https://redis.io/commands/exec */ - public function exec() {} + public function exec() + { + } /** * @see multi() * @link https://redis.io/commands/discard */ - public function discard() {} + public function discard() + { + } /** * Watches a key for modifications by another client. If the key is modified between WATCH and EXEC, @@ -2969,13 +3235,17 @@ public function discard() {} * // $ret = FALSE if x has been modified between the call to WATCH and the call to EXEC. * */ - public function watch($key) {} + public function watch($key) + { + } /** * @see watch() * @link https://redis.io/commands/unwatch */ - public function unwatch() {} + public function unwatch() + { + } /** * Performs a synchronous save at a specific node. @@ -2989,7 +3259,9 @@ public function unwatch() {} * $redisCluster->save('x'); //key * $redisCluster->save(['127.0.0.1',6379]); //[host,port] */ - public function save($nodeParams) {} + public function save($nodeParams) + { + } /** * Performs a background save at a specific node. @@ -3000,7 +3272,9 @@ public function save($nodeParams) {} * If a save is already running, this command will fail and return FALSE. * @link https://redis.io/commands/bgsave */ - public function bgsave($nodeParams) {} + public function bgsave($nodeParams) + { + } /** * Removes all entries from the current database at a specific node. @@ -3010,7 +3284,9 @@ public function bgsave($nodeParams) {} * @return bool Always TRUE. * @link https://redis.io/commands/flushdb */ - public function flushDB($nodeParams) {} + public function flushDB($nodeParams) + { + } /** * Removes all entries from all databases at a specific node. @@ -3020,7 +3296,9 @@ public function flushDB($nodeParams) {} * @return bool Always TRUE. * @link https://redis.io/commands/flushall */ - public function flushAll($nodeParams) {} + public function flushAll($nodeParams) + { + } /** * Returns the current database's size at a specific node. @@ -3035,7 +3313,9 @@ public function flushAll($nodeParams) {} * echo "Redis has $count keys\n"; * */ - public function dbSize($nodeParams) {} + public function dbSize($nodeParams) + { + } /** * Starts the background rewrite of AOF (Append-Only File) at a specific node. @@ -3046,7 +3326,9 @@ public function dbSize($nodeParams) {} * @link https://redis.io/commands/bgrewriteaof * @example $redisCluster->bgrewriteaof('x'); */ - public function bgrewriteaof($nodeParams) {} + public function bgrewriteaof($nodeParams) + { + } /** * Returns the timestamp of the last disk save at a specific node. @@ -3057,7 +3339,9 @@ public function bgrewriteaof($nodeParams) {} * @link https://redis.io/commands/lastsave * @example $redisCluster->lastSave('x'); */ - public function lastSave($nodeParams) {} + public function lastSave($nodeParams) + { + } /** * Returns an associative array of strings and integers @@ -3210,7 +3494,9 @@ public function lastSave($nodeParams) {} * $redisCluster->info("CPU"); // just CPU information from Redis INFO * */ - public function info($option = null) {} + public function info($option = null) + { + } /** * @since redis >= 2.8.12. @@ -3226,7 +3512,9 @@ public function info($option = null) {} * // [ 0=>'master',1 => 3129659, 2 => [ ['127.0.0.1','9001','3129242'], ['127.0.0.1','9002','3129543'] ] ] * */ - public function role($nodeParams) {} + public function role($nodeParams) + { + } /** * Returns a random key at the specified node @@ -3241,7 +3529,9 @@ public function role($nodeParams) {} * $surprise = $redisCluster->get($key); // who knows what's in there. * */ - public function randomKey($nodeParams) {} + public function randomKey($nodeParams) + { + } /** * Return the specified node server time. @@ -3262,7 +3552,9 @@ public function randomKey($nodeParams) {} * // } * */ - public function time($nodeParams) {} + public function time($nodeParams) + { + } /** * Check the specified node status @@ -3273,7 +3565,9 @@ public function time($nodeParams) {} * above. * @link https://redis.io/commands/ping */ - public function ping($nodeParams) {} + public function ping($nodeParams) + { + } /** * Returns message. @@ -3283,14 +3577,18 @@ public function ping($nodeParams) {} * * @return mixed */ - public function echo($nodeParams, $msg) {} + public function echo($nodeParams, $msg) + { + } /** * Returns Array reply of details about all Redis Cluster commands. * * @return mixed array | bool */ - public function command() {} + public function command() + { + } /** * Send arbitrary things to the redis server at the specified node @@ -3301,7 +3599,9 @@ public function command() {} * * @return mixed */ - public function rawCommand($nodeParams, $command, $arguments) {} + public function rawCommand($nodeParams, $command, $arguments) + { + } /** * @since redis >= 3.0 @@ -3318,7 +3618,9 @@ public function rawCommand($nodeParams, $command, $arguments) {} * $redisCluster->cluster(['127.0.0.1',6379],'INFO'); * */ - public function cluster($nodeParams, $command, $arguments) {} + public function cluster($nodeParams, $command, $arguments) + { + } /** * Allows you to get information of the cluster client @@ -3327,7 +3629,9 @@ public function cluster($nodeParams, $command, $arguments) {} * @param string $subCmd can be: 'LIST', 'KILL', 'GETNAME', or 'SETNAME' * @param string $args optional arguments */ - public function client($nodeParams, $subCmd, $args) {} + public function client($nodeParams, $subCmd, $args) + { + } /** * Get or Set the redis config keys. @@ -3346,7 +3650,9 @@ public function client($nodeParams, $subCmd, $args) {} * $redisCluster->config(['127.0.0.1',6379], "SET", "dir", "/var/run/redis/dumps/"); * */ - public function config($nodeParams, $operation, $key, $value) {} + public function config($nodeParams, $operation, $key, $value) + { + } /** * A command allowing you to get information on the Redis pub/sub system. @@ -3373,7 +3679,9 @@ public function config($nodeParams, $operation, $key, $value) {} * $redisCluster->pubsub(['127.0.0.1',6379], 'numpat'); // Get the number of pattern subscribers * */ - public function pubsub($nodeParams, $keyword, $argument) {} + public function pubsub($nodeParams, $keyword, $argument) + { + } /** * Execute the Redis SCRIPT command to perform various operations on the scripting subsystem. @@ -3400,7 +3708,9 @@ public function pubsub($nodeParams, $keyword, $argument) {} * SCRIPT KILL will return true if a script was able to be killed and false if not * SCRIPT EXISTS will return an array with TRUE or FALSE for each passed script */ - public function script($nodeParams, $command, $script) {} + public function script($nodeParams, $command, $script) + { + } /** * This function is used in order to read and reset the Redis slow queries log. @@ -3415,7 +3725,9 @@ public function script($nodeParams, $command, $script) {} * $redisCluster->slowLog(['127.0.0.1',6379],'get','2'); * */ - public function slowLog($nodeParams, $command, $argument) {} + public function slowLog($nodeParams, $command, $argument) + { + } /** * Add one or more geospatial items in the geospatial index represented using a sorted set @@ -3432,7 +3744,9 @@ public function slowLog($nodeParams, $command, $argument) {} * $redisCluster->geoAdd('Sicily', 15.087269, 37.502669, "Catania"); // int(1) * */ - public function geoAdd($key, $longitude, $latitude, $member) {} + public function geoAdd($key, $longitude, $latitude, $member) + { + } /** * Returns members of a geospatial index as standard geohash strings @@ -3449,7 +3763,9 @@ public function geoAdd($key, $longitude, $latitude, $member) {} * $redisCluster->geohash('Sicily','Palermo','Catania');//['sqc8b49rny0','sqdtr74hyu0'] * */ - public function geohash($key, $member1, $member2 = null, $memberN = null) {} + public function geohash($key, $member1, $member2 = null, $memberN = null) + { + } /** * Returns longitude and latitude of members of a geospatial index @@ -3464,7 +3780,9 @@ public function geohash($key, $member1, $member2 = null, $memberN = null) {} * $redisCluster->geopos('Sicily','Palermo');//[['13.36138933897018433','38.11555639549629859']] * */ - public function geopos($key, $member1, $member2 = null, $memberN = null) {} + public function geopos($key, $member1, $member2 = null, $memberN = null) + { + } /** * Returns the distance between two members of a geospatial index @@ -3487,7 +3805,9 @@ public function geopos($key, $member1, $member2 = null, $memberN = null) {} * $redisCluster->geoDist('Sicily', 'Palermo','Catania', 'km'); // float(166.2742) * */ - public function geoDist($key, $member1, $member2, $unit = 'm') {} + public function geoDist($key, $member1, $member2, $unit = 'm') + { + } /** * Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point @@ -3553,7 +3873,9 @@ public function geoDist($key, $member1, $member2, $unit = 'm') {} * *
*/ - public function geoRadius($key, $longitude, $latitude, $radius, $radiusUnit, array $options) {} + public function geoRadius($key, $longitude, $latitude, $radius, $radiusUnit, array $options) + { + } /** * Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member @@ -3566,7 +3888,11 @@ public function geoRadius($key, $longitude, $latitude, $radius, $radiusUnit, arr * @param string $radiusUnit * @param array $options */ - public function geoRadiusByMember($key, $member, $radius, $radiusUnit, array $options) {} + public function geoRadiusByMember($key, $member, $radius, $radiusUnit, array $options) + { + } } -class RedisClusterException extends Exception {} +class RedisClusterException extends Exception +{ +} From 067694d2095ce68eb9c0837d384e4afe7730dfaf Mon Sep 17 00:00:00 2001 From: DmitryTronin*/ - public function swapdb(int $db1, int $db2) - { - } + public function swapdb(int $db1, int $db2) {} /** * Set client option @@ -440,9 +418,7 @@ public function swapdb(int $db1, int $db2) * $redis->setOption(Redis::OPT_SCAN, Redis::SCAN_RETRY); * */ - public function setOption($option, $value) - { - } + public function setOption($option, $value) {} /** * Get client option @@ -458,9 +434,7 @@ public function setOption($option, $value) * // return option value * $redis->getOption(Redis::OPT_SERIALIZER); */ - public function getOption($option) - { - } + public function getOption($option) {} /** * Check the current connection status @@ -479,9 +453,7 @@ public function getOption($option) * // If passed an argument, that argument is returned. Here 'hello' will be returned * $redis->ping('hello'); */ - public function ping($message = null) - { - } + public function ping($message = null) {} /** * Sends a string to Redis, which replies with the same string @@ -494,9 +466,7 @@ public function ping($message = null) * * @link https://redis.io/commands/echo */ - public function echo($message) - { - } + public function echo($message) {} /** * Get the value related to the specified key @@ -527,9 +497,7 @@ public function echo($message) * } * */ - public function get($key) - { - } + public function get($key) {} /** * Set the string value in argument as value of the key. @@ -566,9 +534,7 @@ public function get($key) * * @link https://redis.io/commands/set */ - public function set($key, string $value, mixed $timeout = null) - { - } + public function set($key, string $value, mixed $timeout = null) {} /** * Set the string value in argument as value of the key, with a time to live. @@ -584,9 +550,7 @@ public function set($key, string $value, mixed $timeout = null) * @link https://redis.io/commands/setex * @example $redis->setex('key', 3600, 'value'); // sets key → value, with 1h TTL. */ - public function setex($key, $expire, string $value) - { - } + public function setex($key, $expire, string $value) {} /** * Set the value and expiration in milliseconds of a key. @@ -603,9 +567,7 @@ public function setex($key, $expire, string $value) * @link https://redis.io/commands/psetex * @example $redis->psetex('key', 1000, 'value'); // sets key → value, with 1sec TTL. */ - public function psetex($key, $expire, string $value) - { - } + public function psetex($key, $expire, string $value) {} /** * Set the string value in argument as value of the key if the key doesn't already exist in the database. @@ -624,9 +586,7 @@ public function psetex($key, $expire, string $value) * $redis->setnx('key', 'value'); // return FALSE * */ - public function setnx(string $key, string $value) - { - } + public function setnx(string $key, string $value) {} /** * Remove specified keys. @@ -650,9 +610,7 @@ public function setnx(string $key, string $value) * $redis->del(['key3', 'key4']); // return 2 * */ - public function del($key1, ...$otherKeys) - { - } + public function del($key1, ...$otherKeys) {} /** * Remove specified keys. @@ -665,9 +623,7 @@ public function del($key1, ...$otherKeys) * @throws RedisException */ #[Deprecated(replacement: "%class%->del(%parametersList%)")] - public function delete($key, ...$otherKeys) - { - } + public function delete($key, ...$otherKeys) {} /** * Delete a key asynchronously in another thread. Otherwise it is just as DEL, but non blocking. @@ -691,9 +647,7 @@ public function delete($key, ...$otherKeys) * $redis->unlink(array('key3', 'key4')); // return 2 * */ - public function unlink($key, ...$other_keys) - { - } + public function unlink($key, ...$other_keys) {} /** * Enter and exit transactional mode. @@ -726,9 +680,7 @@ public function unlink($key, ...$other_keys) * // 3 => 'val2'); * */ - public function multi($mode = Redis::MULTI) - { - } + public function multi($mode = Redis::MULTI) {} /** * Returns a Redis instance which can simply transmitted faster to the server. @@ -759,9 +711,7 @@ public function multi($mode = Redis::MULTI) * // 4 => '+PONG'); * */ - public function pipeline() - { - } + public function pipeline() {} /** * @return void|array|Redis returns Redis if in multimode @@ -771,9 +721,7 @@ public function pipeline() * @see multi() * @link https://redis.io/commands/exec */ - public function exec() - { - } + public function exec() {} /** * Flushes all previously queued commands in a transaction and restores the connection state to normal. @@ -785,9 +733,7 @@ public function exec() * @see multi() * @link https://redis.io/commands/discard */ - public function discard() - { - } + public function discard() {} /** * Watches a key for modifications by another client. If the key is modified between WATCH and EXEC, @@ -811,9 +757,7 @@ public function discard() * // $ret = FALSE if x has been modified between the call to WATCH and the call to EXEC. * */ - public function watch($key, ...$other_keys) - { - } + public function watch($key, ...$other_keys) {} /** * @throws RedisException @@ -822,9 +766,7 @@ public function watch($key, ...$other_keys) * @return bool|Redis * @link https://redis.io/commands/unwatch */ - public function unwatch() - { - } + public function unwatch() {} /** * Subscribes the client to the specified channels. @@ -841,9 +783,7 @@ public function unwatch() * @link https://redis.io/commands/subscribe * @since 2.0 */ - public function subscribe(string $channel, string ...$other_channels) - { - } + public function subscribe(string $channel, string ...$other_channels) {} /** * Subscribe to channels by pattern @@ -867,9 +807,7 @@ public function subscribe(string $channel, string ...$other_channels) * $redis->psubscribe(array('chan-1', 'chan-2', 'chan-3'), 'f') * */ - public function psubscribe($patterns, $callback) - { - } + public function psubscribe($patterns, $callback) {} /** * Publish messages to channels. @@ -886,9 +824,7 @@ public function psubscribe($patterns, $callback) * @link https://redis.io/commands/publish * @example $redis->publish('chan-1', 'hello, world!'); // send message. */ - public function publish($channel, $message) - { - } + public function publish($channel, $message) {} /** * A command allowing you to get information on the Redis pub/sub system @@ -915,9 +851,7 @@ public function publish($channel, $message) * $redis->pubsub('numpat'); // Get the number of pattern subscribers * */ - public function pubsub($keyword, $argument = null) - { - } + public function pubsub($keyword, $argument = null) {} /** * Stop listening for messages posted to the given channels. @@ -931,9 +865,7 @@ public function pubsub($keyword, $argument = null) * * @link https://redis.io/commands/unsubscribe */ - public function unsubscribe(string $channel, string ...$other_channels) - { - } + public function unsubscribe(string $channel, string ...$other_channels) {} /** * Stop listening for messages posted to the given channels. @@ -946,9 +878,7 @@ public function unsubscribe(string $channel, string ...$other_channels) * * @link https://redis.io/commands/punsubscribe */ - public function punsubscribe(array $patterns) - { - } + public function punsubscribe(array $patterns) {} /** * Verify if the specified key/keys exists @@ -975,9 +905,7 @@ public function punsubscribe(array $patterns) * $redis->exists('foo', 'bar', 'baz'); // 3 * */ - public function exists($key) - { - } + public function exists($key) {} /** * Increment the number stored at key by one. @@ -997,9 +925,7 @@ public function exists($key) * $redis->incr('key1'); // 4 * */ - public function incr($key) - { - } + public function incr($key) {} /** * Increment the float value of a key by the given amount @@ -1019,9 +945,7 @@ public function incr($key) * $redis->get('x'); // float(4.5) * */ - public function incrByFloat($key, $increment) - { - } + public function incrByFloat($key, $increment) {} /** * Increment the number stored at key by one. @@ -1044,9 +968,7 @@ public function incrByFloat($key, $increment) * $redis->incrBy('key1', 10); // 14 * */ - public function incrBy($key, $value) - { - } + public function incrBy($key, $value) {} /** * Decrement the number stored at key by one. @@ -1065,9 +987,7 @@ public function incrBy($key, $value) * $redis->decr('key1'); // -3 * */ - public function decr($key) - { - } + public function decr($key) {} /** * Decrement the number stored at key by one. @@ -1089,9 +1009,7 @@ public function decr($key) * $redis->decrBy('key1', 10); // -13 * */ - public function decrBy($key, $value) - { - } + public function decrBy($key, $value) {} /** * Adds the string values to the head (left) of the list. @@ -1119,9 +1037,7 @@ public function decrBy($key, $value) * // } * */ - public function lPush($key, ...$value1) - { - } + public function lPush($key, ...$value1) {} /** * Adds the string values to the tail (right) of the list. @@ -1149,9 +1065,7 @@ public function lPush($key, ...$value1) * // } * */ - public function rPush($key, ...$value1) - { - } + public function rPush($key, ...$value1) {} /** * Adds the string value to the head (left) of the list if the list exists. @@ -1174,9 +1088,7 @@ public function rPush($key, ...$value1) * // key1 now points to the following list: [ 'A', 'B', 'C' ] * */ - public function lPushx($key, string $value) - { - } + public function lPushx($key, string $value) {} /** * Adds the string value to the tail (right) of the list if the ist exists. FALSE in case of Failure. @@ -1199,9 +1111,7 @@ public function lPushx($key, string $value) * // key1 now points to the following list: [ 'A', 'B', 'C' ] * */ - public function rPushx($key, string $value) - { - } + public function rPushx($key, string $value) {} /** * Returns and removes the first element of the list. @@ -1222,9 +1132,7 @@ public function rPushx($key, string $value) * $redis->lPop('key1'); // key1 => [ 'B', 'C' ] * */ - public function lPop($key, $count = 0) - { - } + public function lPop($key, $count = 0) {} /** * Returns and removes the last element of the list. @@ -1245,9 +1153,7 @@ public function lPop($key, $count = 0) * $redis->rPop('key1'); // key1 => [ 'A', 'B' ] * */ - public function rPop($key, $count = 0) - { - } + public function rPop($key, $count = 0) {} /** * Is a blocking lPop primitive. If at least one of the lists contains at least one element, @@ -1292,9 +1198,7 @@ public function rPop($key, $count = 0) * // array('key1', 'A') is returned * */ - public function blPop($key, $timeout_or_key, ...$extra_args) - { - } + public function blPop($key, $timeout_or_key, ...$extra_args) {} /** * Is a blocking rPop primitive. If at least one of the lists contains at least one element, @@ -1340,9 +1244,7 @@ public function blPop($key, $timeout_or_key, ...$extra_args) * // array('key1', 'A') is returned * */ - public function brPop($key, $timeout_or_key, ...$extra_args) - { - } + public function brPop($key, $timeout_or_key, ...$extra_args) {} /** * Returns the size of a list identified by Key. If the list didn't exist or is empty, @@ -1366,9 +1268,7 @@ public function brPop($key, $timeout_or_key, ...$extra_args) * $redis->lLen('key1'); // 2 * */ - public function lLen($key) - { - } + public function lLen($key) {} /** * @link https://redis.io/commands/llen @@ -1380,9 +1280,7 @@ public function lLen($key) * @throws RedisException */ #[Deprecated(replacement: '%class%->lLen(%parametersList%)')] - public function lSize($key) - { - } + public function lSize($key) {} /** * Return the specified element of the list stored at the specified key. @@ -1409,9 +1307,7 @@ public function lSize($key) * $redis->lIndex('key1', 10); // `FALSE` * */ - public function lIndex($key, $index) - { - } + public function lIndex($key, $index) {} /** * @link https://redis.io/commands/lindex @@ -1423,9 +1319,7 @@ public function lIndex($key, $index) * @throws RedisException */ #[Deprecated(replacement: '%class%->lIndex(%parametersList%)')] - public function lGet($key, $index) - { - } + public function lGet($key, $index) {} /** * Set the list at index with the new value. @@ -1450,9 +1344,7 @@ public function lGet($key, $index) * $redis->lIndex('key1', 0); // 'X' * */ - public function lSet($key, $index, string $value) - { - } + public function lSet($key, $index, string $value) {} /** * Returns the specified elements of the list stored at the specified key in @@ -1476,9 +1368,7 @@ public function lSet($key, $index, string $value) * $redis->lRange('key1', 0, -1); // array('A', 'B', 'C') * */ - public function lRange($key, $start, $end) - { - } + public function lRange($key, $start, $end) {} /** * @link https://redis.io/commands/lrange @@ -1491,9 +1381,7 @@ public function lRange($key, $start, $end) * @throws RedisException */ #[Deprecated(replacement: '%class%->lRange(%parametersList%)')] - public function lGetRange($key, $start, $end) - { - } + public function lGetRange($key, $start, $end) {} /** * Trims an existing list so that it will contain only a specified range of elements. @@ -1517,9 +1405,7 @@ public function lGetRange($key, $start, $end) * $redis->lRange('key1', 0, -1); // array('A', 'B') * */ - public function lTrim($key, $start, $stop) - { - } + public function lTrim($key, $start, $stop) {} /** * @link https://redis.io/commands/ltrim @@ -1531,9 +1417,7 @@ public function lTrim($key, $start, $stop) * @throws RedisException */ #[Deprecated(replacement: '%class%->lTrim(%parametersList%)')] - public function listTrim($key, $start, $stop) - { - } + public function listTrim($key, $start, $stop) {} /** * Removes the first count occurrences of the value element from the list. @@ -1563,9 +1447,7 @@ public function listTrim($key, $start, $stop) * $redis->lRange('key1', 0, -1); // array('C', 'B', 'A') * */ - public function lRem($key, $value, $count) - { - } + public function lRem($key, $value, $count) {} /** * @link https://redis.io/commands/lremove @@ -1577,9 +1459,7 @@ public function lRem($key, $value, $count) * @throws RedisException */ #[Deprecated(replacement: '%class%->lRem(%parametersList%)')] - public function lRemove($key, $value, $count) - { - } + public function lRemove($key, $value, $count) {} /** * Insert value in the list before or after the pivot value. the parameter options @@ -1614,9 +1494,7 @@ public function lRemove($key, $value, $count) * $redis->lInsert('key1', Redis::AFTER, 'W', 'value'); // -1 * */ - public function lInsert($key, $position, $pivot, $value) - { - } + public function lInsert($key, $position, $pivot, $value) {} /** * Adds a values to the set value stored at key. @@ -1635,9 +1513,7 @@ public function lInsert($key, $position, $pivot, $value) * $redis->sAdd('k', 'v1', 'v2', 'v3'); // int(2) * */ - public function sAdd(string $key, string $value, mixed ...$other_values) - { - } + public function sAdd(string $key, string $value, mixed ...$other_values) {} /** * Removes the specified members from the set value stored at key. @@ -1660,9 +1536,7 @@ public function sAdd(string $key, string $value, mixed ...$other_values) * // } * */ - public function sRem(string $key, string $value, ...$other_values) - { - } + public function sRem(string $key, string $value, ...$other_values) {} /** * @link https://redis.io/commands/srem @@ -1673,9 +1547,7 @@ public function sRem(string $key, string $value, ...$other_values) * @throws RedisException */ #[Deprecated(replacement: '%class%->sRem(%parametersList%)')] - public function sRemove($key, ...$member1) - { - } + public function sRemove($key, ...$member1) {} /** * Moves the specified member from the set at srcKey to the set at dstKey. @@ -1701,9 +1573,7 @@ public function sRemove($key, ...$member1) * // 'key2' => {'set21', 'set22', 'set13'} * */ - public function sMove($srcKey, $dstKey, string $member) - { - } + public function sMove($srcKey, $dstKey, string $member) {} /** * Checks if value is a member of the set stored at the key key. @@ -1726,9 +1596,7 @@ public function sMove($srcKey, $dstKey, string $member) * $redis->sIsMember('key1', 'setX'); // FALSE * */ - public function sIsMember(string $key, string $value) - { - } + public function sIsMember(string $key, string $value) {} /** * @link https://redis.io/commands/sismember @@ -1739,9 +1607,7 @@ public function sIsMember(string $key, string $value) * @throws RedisException */ #[Deprecated(replacement: '%class%->sIsMember(%parametersList%)')] - public function sContains($key, $value) - { - } + public function sContains($key, $value) {} /** * Returns the cardinality of the set identified by key. @@ -1762,9 +1628,7 @@ public function sContains($key, $value) * $redis->sCard('keyX'); // 0 * */ - public function sCard($key) - { - } + public function sCard($key) {} /** * Removes and returns a random element from the set value at Key. @@ -1797,9 +1661,7 @@ public function sCard($key) * // } * */ - public function sPop($key, $count = 0) - { - } + public function sPop($key, $count = 0) {} /** * Returns a random element(s) from the set value at Key, without removing it. @@ -1831,9 +1693,7 @@ public function sPop($key, $count = 0) * // } * */ - public function sRandMember($key, $count = 0) - { - } + public function sRandMember($key, $count = 0) {} /** * Returns the members of a set resulting from the intersection of all the sets @@ -1872,9 +1732,7 @@ public function sRandMember($key, $count = 0) * //} * */ - public function sInter($key1, ...$otherKeys) - { - } + public function sInter($key1, ...$otherKeys) {} /** * Performs a sInter command and stores the result in a new set. @@ -1914,9 +1772,7 @@ public function sInter($key1, ...$otherKeys) * //} * */ - public function sInterStore($dstKey, $key1, ...$otherKeys) - { - } + public function sInterStore($dstKey, $key1, ...$otherKeys) {} /** * Performs the union between N sets and returns it. @@ -1952,9 +1808,7 @@ public function sInterStore($dstKey, $key1, ...$otherKeys) * //} * */ - public function sUnion($key1, ...$otherKeys) - { - } + public function sUnion($key1, ...$otherKeys) {} /** * Performs the same action as sUnion, but stores the result in the first key @@ -1995,9 +1849,7 @@ public function sUnion($key1, ...$otherKeys) * //} * */ - public function sUnionStore($dstKey, $key1, ...$otherKeys) - { - } + public function sUnionStore($dstKey, $key1, ...$otherKeys) {} /** * Performs the difference between N sets and returns it. @@ -2032,9 +1884,7 @@ public function sUnionStore($dstKey, $key1, ...$otherKeys) * //} * */ - public function sDiff($key1, ...$otherKeys) - { - } + public function sDiff($key1, ...$otherKeys) {} /** * Performs the same action as sDiff, but stores the result in the first key @@ -2072,9 +1922,7 @@ public function sDiff($key1, ...$otherKeys) * //} * */ - public function sDiffStore($dstKey, $key1, ...$otherKeys) - { - } + public function sDiffStore($dstKey, $key1, ...$otherKeys) {} /** * Returns the contents of a set. @@ -2106,13 +1954,9 @@ public function sDiffStore($dstKey, $key1, ...$otherKeys) * // The order is random and corresponds to redis' own internal representation of the set structure. * */ - public function sMembers($key) - { - } + public function sMembers($key) {} - public function sMisMember(string $key, string $member, string ...$other_members): array|false - { - } + public function sMisMember(string $key, string $member, string ...$other_members): array|false{} /** * @link https://redis.io/commands/smembers @@ -2123,9 +1967,7 @@ public function sMisMember(string $key, string $member, string ...$other_members * @throws RedisException */ #[Deprecated(replacement: '%class%->sMembers(%parametersList%)')] - public function sGetMembers($key) - { - } + public function sGetMembers($key) {} /** * Scan a set for members @@ -2150,9 +1992,7 @@ public function sGetMembers($key) * } * */ - public function sScan($key, &$iterator, $pattern = null, $count = 0) - { - } + public function sScan($key, &$iterator, $pattern = null, $count = 0) {} /** * Sets a value and returns the previous entry at that key. @@ -2172,9 +2012,7 @@ public function sScan($key, &$iterator, $pattern = null, $count = 0) * $newValue = $redis->get('x')' // return 'lol' * */ - public function getSet($key, string $value) - { - } + public function getSet($key, string $value) {} /** * Returns a random key @@ -2190,9 +2028,7 @@ public function getSet($key, string $value) * $surprise = $redis->get($key); // who knows what's in there. * */ - public function randomKey() - { - } + public function randomKey() {} /** * Switches to a given database @@ -2213,9 +2049,7 @@ public function randomKey() * $redis->get('x'); // will return 42 * */ - public function select($dbIndex) - { - } + public function select($dbIndex) {} /** * Moves a key to a different database. @@ -2237,9 +2071,7 @@ public function select($dbIndex) * $redis->get('x'); // will return 42 * */ - public function move($key, $dbIndex) - { - } + public function move($key, $dbIndex) {} /** * Renames a key @@ -2260,9 +2092,7 @@ public function move($key, $dbIndex) * $redis->get('x'); // → `FALSE` * */ - public function rename($srcKey, $dstKey) - { - } + public function rename($srcKey, $dstKey) {} /** * @link https://redis.io/commands/rename @@ -2273,9 +2103,7 @@ public function rename($srcKey, $dstKey) * @throws RedisException */ #[Deprecated(replacement: '%class%->rename(%parametersList%)')] - public function renameKey($srcKey, $dstKey) - { - } + public function renameKey($srcKey, $dstKey) {} /** * Renames a key @@ -2299,9 +2127,7 @@ public function renameKey($srcKey, $dstKey) * $redis->get('x'); // → `FALSE` * */ - public function renameNx($srcKey, $dstKey) - { - } + public function renameNx($srcKey, $dstKey) {} /** * Sets an expiration date (a timeout) on an item @@ -2322,9 +2148,7 @@ public function renameNx($srcKey, $dstKey) * $redis->get('x'); // will return `FALSE`, as 'x' has expired. * */ - public function expire($key, $ttl) - { - } + public function expire($key, $ttl) {} /** * Sets an expiration date (a timeout in milliseconds) on an item @@ -2345,9 +2169,7 @@ public function expire($key, $ttl) * $redis->pttl('x'); // 11500 * */ - public function pExpire($key, $ttl) - { - } + public function pExpire($key, $ttl) {} /** * @link https://redis.io/commands/expire @@ -2359,9 +2181,7 @@ public function pExpire($key, $ttl) * @throws RedisException */ #[Deprecated(replacement: '%class%->expire(%parametersList%)')] - public function setTimeout($key, $ttl) - { - } + public function setTimeout($key, $ttl) {} /** * Sets an expiration date (a timestamp) on an item. @@ -2383,9 +2203,7 @@ public function setTimeout($key, $ttl) * $redis->get('x'); // will return `FALSE`, as 'x' has expired. * */ - public function expireAt($key, $timestamp) - { - } + public function expireAt($key, $timestamp) {} /** * Sets an expiration date (a timestamp) on an item. Requires a timestamp in milliseconds @@ -2406,9 +2224,7 @@ public function expireAt($key, $timestamp) * echo $redis->pttl('x'); // 218270120575 * */ - public function pExpireAt($key, $timestamp) - { - } + public function pExpireAt($key, $timestamp) {} /** * Returns the keys that match a certain pattern. @@ -2426,9 +2242,7 @@ public function pExpireAt($key, $timestamp) * $keyWithUserPrefix = $redis->keys('user*'); * */ - public function keys($pattern) - { - } + public function keys($pattern) {} /** * @param string $pattern @@ -2437,9 +2251,7 @@ public function keys($pattern) * @link https://redis.io/commands/keys */ #[Deprecated(replacement: '%class%->keys(%parametersList%)')] - public function getKeys($pattern) - { - } + public function getKeys($pattern) {} /** * Returns the current database's size @@ -2455,9 +2267,7 @@ public function getKeys($pattern) * echo "Redis has $count keys\n"; * */ - public function dbSize() - { - } + public function dbSize() {} /** * Authenticate the connection using a password. @@ -2472,9 +2282,7 @@ public function dbSize() * @link https://redis.io/commands/auth * @example $redis->auth('foobared'); */ - public function auth($credentials) - { - } + public function auth($credentials) {} /** * Starts the background rewrite of AOF (Append-Only File) @@ -2486,9 +2294,7 @@ public function auth($credentials) * @link https://redis.io/commands/bgrewriteaof * @example $redis->bgrewriteaof(); */ - public function bgrewriteaof() - { - } + public function bgrewriteaof() {} /** * Changes the slave status @@ -2509,9 +2315,7 @@ public function bgrewriteaof() * $redis->slaveof(); * */ - public function slaveof($host = '127.0.0.1', $port = 6379) - { - } + public function slaveof($host = '127.0.0.1', $port = 6379) {} /** * Access the Redis slowLog @@ -2542,9 +2346,7 @@ public function slaveof($host = '127.0.0.1', $port = 6379) * * @link https://redis.io/commands/slowlog */ - public function slowLog(string $operation, int $length = null) - { - } + public function slowLog(string $operation, int $length = null) {} /** * Describes the object pointed to by a key. @@ -2570,9 +2372,7 @@ public function slowLog(string $operation, int $length = null) * $redis->object("idletime", "l"); // → 400 (in seconds, with a precision of 10 seconds). * */ - public function object($subcommand, $key) - { - } + public function object($subcommand, $key) {} /** * Performs a synchronous save. @@ -2585,9 +2385,7 @@ public function object($subcommand, $key) * @link https://redis.io/commands/save * @example $redis->save(); */ - public function save() - { - } + public function save() {} /** * Performs a background save. @@ -2600,9 +2398,7 @@ public function save() * @link https://redis.io/commands/bgsave * @example $redis->bgSave(); */ - public function bgsave() - { - } + public function bgsave() {} /** * Returns the timestamp of the last disk save. @@ -2614,9 +2410,7 @@ public function bgsave() * @link https://redis.io/commands/lastsave * @example $redis->lastSave(); */ - public function lastSave() - { - } + public function lastSave() {} /** * Blocks the current client until all the previous write commands are successfully transferred and @@ -2633,9 +2427,7 @@ public function lastSave() * @link https://redis.io/commands/wait * @example $redis->wait(2, 1000); */ - public function wait($numSlaves, $timeout) - { - } + public function wait($numSlaves, $timeout) {} /** * Returns the type of data pointed by a given key. @@ -2658,9 +2450,7 @@ public function wait($numSlaves, $timeout) * @link https://redis.io/commands/type * @example $redis->type('key'); */ - public function type(string $key) - { - } + public function type(string $key) {} /** * Append specified string to the string stored in specified key. @@ -2680,9 +2470,7 @@ public function type(string $key) * $redis->get('key'); // 'value1value2' * */ - public function append($key, string $value) - { - } + public function append($key, string $value) {} /** * Return a substring of a larger string @@ -2703,9 +2491,7 @@ public function append($key, string $value) * $redis->getRange('key', -5, -1); // 'value' * */ - public function getRange($key, $start, $end) - { - } + public function getRange($key, $start, $end) {} /** * Return a substring of a larger string @@ -2717,9 +2503,7 @@ public function getRange($key, $start, $end) * @throws RedisException */ #[Deprecated] - public function substr($key, $start, $end) - { - } + public function substr($key, $start, $end) {} /** * Changes a substring of a larger string. @@ -2740,9 +2524,7 @@ public function substr($key, $start, $end) * $redis->get('key'); // "Hello redis" * */ - public function setRange($key, $offset, $value) - { - } + public function setRange($key, $offset, $value) {} /** * Get the length of a string value. @@ -2759,9 +2541,7 @@ public function setRange($key, $offset, $value) * $redis->strlen('key'); // 5 * */ - public function strlen($key) - { - } + public function strlen($key) {} /** * Return the position of the first bit set to 1 or 0 in a string. The position is returned, thinking of the @@ -2798,9 +2578,7 @@ public function strlen($key) * $redis->bitpos('key', 0, 1, 5); // int(-1) * */ - public function bitpos($key, $bit, $start = 0, $end = -1) - { - } + public function bitpos($key, $bit, $start = 0, $end = -1) {} /** * Return a single bit out of a larger string @@ -2820,9 +2598,7 @@ public function bitpos($key, $bit, $start = 0, $end = -1) * $redis->getBit('key', 1); // 1 * */ - public function getBit($key, $offset) - { - } + public function getBit($key, $offset) {} /** * Changes a single bit of a string. @@ -2844,9 +2620,7 @@ public function getBit($key, $offset) * $redis->get('key'); // chr(0x2f) = "/" = b("0010 1111") * */ - public function setBit($key, $offset, $value) - { - } + public function setBit($key, $offset, $value) {} /** * Count bits in a string @@ -2869,9 +2643,7 @@ public function setBit($key, $offset, $value) * var_dump( $redis->bitCount('bit', 0, 2) ); // int(11) * */ - public function bitCount($key, $start = 0, $end = -1) - { - } + public function bitCount($key, $start = 0, $end = -1) {} /** * Bitwise operation on multiple keys. @@ -2897,9 +2669,7 @@ public function bitCount($key, $start = 0, $end = -1) * $redis->bitOp('XOR', 'bit', 'bit1', 'bit2'); // bit = 11 * */ - public function bitOp($operation, $retKey, $key1, ...$otherKeys) - { - } + public function bitOp($operation, $retKey, $key1, ...$otherKeys) {} /** * Removes all entries from the current database. @@ -2911,9 +2681,7 @@ public function bitOp($operation, $retKey, $key1, ...$otherKeys) * @link https://redis.io/commands/flushdb * @example $redis->flushDB(); */ - public function flushDB($async = null) - { - } + public function flushDB($async = null) {} /** * Removes all entries from all databases. @@ -2927,9 +2695,7 @@ public function flushDB($async = null) * @link https://redis.io/commands/flushall * @example $redis->flushAll(); */ - public function flushAll($async = null) - { - } + public function flushAll($async = null) {} /** * Sort @@ -2963,9 +2729,7 @@ public function flushAll($async = null) * var_dump($redis->sort('s', array('sort' => 'desc', 'store' => 'out'))); // (int)5 * */ - public function sort($key, $option = null) - { - } + public function sort($key, $option = null) {} /** * Returns an associative array of strings and integers @@ -3032,9 +2796,7 @@ public function sort($key, $option = null) * $redis->info("CPU"); // just CPU information from Redis INFO * */ - public function info($option = null) - { - } + public function info($option = null) {} /** * Returns an indexed array whose first element is the role @@ -3049,9 +2811,7 @@ public function info($option = null) * $redis->role(); * */ - public function role() - { - } + public function role() {} /** * Resets the statistics reported by Redis using the INFO command (`info()` function). @@ -3070,9 +2830,7 @@ public function role() * @link https://redis.io/commands/config-resetstat */ #[Deprecated(replacement: '%class%->rawCommand(\'CONFIG\', \'RESETSTAT\');')] - public function resetStat() - { - } + public function resetStat() {} /** * Returns the time to live left for a given key, in seconds. If the key doesn't exist, FALSE is returned. @@ -3090,9 +2848,7 @@ public function resetStat() * $redis->ttl('key'); // int(123) * */ - public function ttl($key) - { - } + public function ttl($key) {} /** * Returns a time to live left for a given key, in milliseconds. @@ -3112,9 +2868,7 @@ public function ttl($key) * $redis->pttl('key'); // int(122999) * */ - public function pttl($key) - { - } + public function pttl($key) {} /** * Remove the expiration timer from a key. @@ -3128,9 +2882,7 @@ public function pttl($key) * @link https://redis.io/commands/persist * @example $redis->persist('key'); */ - public function persist($key) - { - } + public function persist($key) {} /** * Sets multiple key-value pairs in one atomic command. @@ -3153,9 +2905,7 @@ public function persist($key) * // string(6) "value1" * */ - public function mSet($array) - { - } + public function mSet($array) {} /** * Get the values of all the specified keys. @@ -3177,9 +2927,7 @@ public function mSet($array) * */ #[Deprecated(replacement: '%class%->mGet(%parametersList%)')] - public function getMultiple(array $keys) - { - } + public function getMultiple(array $keys) {} /** * Returns the values of all specified keys. @@ -3209,9 +2957,7 @@ public function getMultiple(array $keys) * // } * */ - public function mGet(array $array) - { - } + public function mGet(array $array) {} /** * @see mset() @@ -3222,9 +2968,7 @@ public function mGet(array $array) * * @link https://redis.io/commands/msetnx */ - public function msetnx(array $array) - { - } + public function msetnx(array $array) {} /** * Pops a value from the tail of a list, and pushes it to the front of another list. @@ -3271,9 +3015,7 @@ public function msetnx(array $array) * //} * */ - public function rPopLPush($srcKey, $dstKey) - { - } + public function rPopLPush($srcKey, $dstKey) {} /** * A blocking version of rPopLPush, with an integral timeout in the third parameter. @@ -3288,9 +3030,7 @@ public function rPopLPush($srcKey, $dstKey) * * @link https://redis.io/commands/brpoplpush */ - public function bRPopLPush($srcKey, $dstKey, $timeout) - { - } + public function bRPopLPush($srcKey, $dstKey, $timeout) {} /** * Adds the specified member with a given score to the sorted set stored at key @@ -3336,9 +3076,7 @@ public function bRPopLPush($srcKey, $dstKey, $timeout) * // ["v6"]=> float(8) * */ - public function zAdd($key, $options, $score1, $value1 = null, $score2 = null, $value2 = null, $scoreN = null, $valueN = null) - { - } + public function zAdd($key, $options, $score1, $value1 = null, $score2 = null, $value2 = null, $scoreN = null, $valueN = null) {} /** * Returns a range of elements from the ordered set stored at the specified key, @@ -3368,9 +3106,7 @@ public function zAdd($key, $options, $score1, $value1 = null, $score2 = null, $v * $redis->zRange('key1', 0, -1, true); // array('val0' => 0, 'val2' => 2, 'val10' => 10) * */ - public function zRange($key, $start, $end, $withscores = null) - { - } + public function zRange($key, $start, $end, $withscores = null) {} /** * Deletes a specified member from the ordered set. @@ -3396,9 +3132,7 @@ public function zRange($key, $start, $end, $withscores = null) * // } * */ - public function zRem($key, $member1, ...$otherMembers) - { - } + public function zRem($key, $member1, ...$otherMembers) {} /** * @link https://redis.io/commands/zrem @@ -3412,9 +3146,7 @@ public function zRem($key, $member1, ...$otherMembers) * @throws RedisException */ #[Deprecated(replacement: '%class%->zRem(%parametersList%)')] - public function zDelete($key, $member1, ...$otherMembers) - { - } + public function zDelete($key, $member1, ...$otherMembers) {} /** * Returns the elements of the sorted set stored at the specified key in the range [start, end] @@ -3445,9 +3177,7 @@ public function zDelete($key, $member1, ...$otherMembers) * $redis->zRevRange('key', 0, -1, true); // array('val10' => 10, 'val2' => 2, 'val0' => 0) * */ - public function zRevRange($key, $start, $end, $withscore = null) - { - } + public function zRevRange($key, $start, $end, $withscore = null) {} /** * Returns the elements of the sorted set stored at the specified key which have scores in the @@ -3479,9 +3209,7 @@ public function zRevRange($key, $start, $end, $withscore = null) * $redis->zRangeByScore('key', 0, 3, array('withscores' => TRUE, 'limit' => array(1, 1)); // array('val2' => 2) * */ - public function zRangeByScore($key, $start, $end, array $options = []) - { - } + public function zRangeByScore($key, $start, $end, array $options = []) {} /** * @param string $key @@ -3494,9 +3222,7 @@ public function zRangeByScore($key, $start, $end, array $options = []) * @throws RedisException * @see zRangeByScore() */ - public function zRevRangeByScore(string $key, string $start, string $end, array $options = []) - { - } + public function zRevRangeByScore(string $key, string $start, string $end, array $options = []) {} /** * Returns a lexigraphical range of members in a sorted set, assuming the members have the same score. The @@ -3526,25 +3252,15 @@ public function zRevRangeByScore(string $key, string $start, string $end, array * $redis->zRangeByLex('key', '-', '[c'); // array('b', 'c') * */ - public function zRangeByLex(string $key, string $min, string $max, int $offset = -1, int $count = -1) - { - } + public function zRangeByLex(string $key, string $min, string $max, int $offset = -1, int $count = -1) {} - public function zMscore(string $key, string $member, string ...$other_members): array|false - { - } + public function zMscore(string $key, string $member, string ...$other_members): array|false{} - public function zPopMax(string $key, int $value = null): array|false - { - } + public function zPopMax(string $key, int $value = null): array|false{} - public function zPopMin(string $key, int $value = null): array|false - { - } + public function zPopMin(string $key, int $value = null): array|false{} - public function zRandMember(string $key, array $options = null): string|array|false - { - } + public function zRandMember(string $key, array $options = null): string|array|false{} /** * @param string $key @@ -3560,9 +3276,7 @@ public function zRandMember(string $key, array $options = null): string|array|fa * @see zRangeByLex() * @link https://redis.io/commands/zrevrangebylex */ - public function zRevRangeByLex(string $key, string $min, string $max, int $offset = -1, int $count = -1) - { - } + public function zRevRangeByLex(string $key, string $min, string $max, int $offset = -1, int $count = -1) {} /** * Removes all elements in the sorted set stored at key between the lexicographical range specified by min and max. @@ -3575,9 +3289,7 @@ public function zRevRangeByLex(string $key, string $min, string $max, int $offse * @return int|false the number of elements removed. * @link https://redis.io/commands/zremrangebylex */ - public function zRemRangeByLex(string $key, string $min, string $max) - { - } + public function zRemRangeByLex(string $key, string $min, string $max) {} /** @@ -3602,9 +3314,7 @@ public function zRemRangeByLex(string $key, string $min, string $max) * $redis->zCount('key', 0, 3); // 2, corresponding to array('val0', 'val2') * */ - public function zCount($key, $start, $end) - { - } + public function zCount($key, $start, $end) {} /** * Deletes the elements of the sorted set stored at the specified key which have scores in the range [start,end]. @@ -3626,9 +3336,7 @@ public function zCount($key, $start, $end) * $redis->zRemRangeByScore('key', '0', '3'); // 2 * */ - public function zRemRangeByScore($key, $start, $end) - { - } + public function zRemRangeByScore($key, $start, $end) {} /** * @param string $key @@ -3638,9 +3346,7 @@ public function zRemRangeByScore($key, $start, $end) * @throws RedisException */ #[Deprecated(replacement: '%class%->zRemRangeByScore(%parametersList%)')] - public function zDeleteRangeByScore($key, $start, $end) - { - } + public function zDeleteRangeByScore($key, $start, $end) {} /** * Deletes the elements of the sorted set stored at the specified key which have rank in the range [start,end]. @@ -3663,9 +3369,7 @@ public function zDeleteRangeByScore($key, $start, $end) * $redis->zRange('key', 0, -1, array('withscores' => TRUE)); // array('three' => 3) * */ - public function zRemRangeByRank($key, $start, $end) - { - } + public function zRemRangeByRank($key, $start, $end) {} /** * @link https://redis.io/commands/zremrangebyscore @@ -3677,9 +3381,7 @@ public function zRemRangeByRank($key, $start, $end) * @throws RedisException */ #[Deprecated(replacement: '%class%->zRemRangeByRank(%parametersList%)')] - public function zDeleteRangeByRank($key, $start, $end) - { - } + public function zDeleteRangeByRank($key, $start, $end) {} /** * Returns the cardinality of an ordered set. @@ -3699,13 +3401,9 @@ public function zDeleteRangeByRank($key, $start, $end) * $redis->zCard('key'); // 3 * */ - public function zCard($key) - { - } + public function zCard($key) {} - public function zdiff(array $keys, array $options = null): array|false - { - } + public function zdiff(array $keys, array $options = null): array|false{} /** * @param string $key @@ -3714,9 +3412,7 @@ public function zdiff(array $keys, array $options = null): array|false * @throws RedisException */ #[Deprecated(replacement: '%class%->zCard(%parametersList%)')] - public function zSize($key) - { - } + public function zSize($key) {} /** * Returns the score of a given member in the specified sorted set. @@ -3735,9 +3431,7 @@ public function zSize($key) * $redis->zScore('key', 'val2'); // 2.5 * */ - public function zScore($key, $member) - { - } + public function zScore($key, $member) {} /** * Returns the rank of a given member in the specified sorted set, starting at 0 for the item @@ -3762,9 +3456,7 @@ public function zScore($key, $member) * $redis->zRevRank('key', 'two'); // 0 * */ - public function zRank($key, $member) - { - } + public function zRank($key, $member) {} /** * @see zRank() @@ -3777,9 +3469,7 @@ public function zRank($key, $member) * * @link https://redis.io/commands/zrevrank */ - public function zRevRank($key, $member) - { - } + public function zRevRank($key, $member) {} /** * Increments the score of a member from a sorted set by a given amount. @@ -3801,9 +3491,7 @@ public function zRevRank($key, $member) * $redis->zIncrBy('key', 1, 'member1'); // 3.5 * */ - public function zIncrBy($key, $value, $member) - { - } + public function zIncrBy($key, $value, $member) {} /** * Creates an union of sorted sets given in second argument. @@ -3846,9 +3534,7 @@ public function zIncrBy($key, $value, $member) * $redis->zUnionStore('ko3', array('k1', 'k2'), array(5, 1)); // 4, 'ko3' => array('val0', 'val2', 'val3', 'val1') * */ - public function zUnionStore($output, $zSetKeys, ?array $weights = null, $aggregateFunction = null) - { - } + public function zUnionStore($output, $zSetKeys, ?array $weights = null, $aggregateFunction = null) {} /** * @param string $Output @@ -3859,9 +3545,7 @@ public function zUnionStore($output, $zSetKeys, ?array $weights = null, $aggrega * @throws RedisException */ #[Deprecated(replacement: '%class%->zUnionStore(%parametersList%)')] - public function zUnion($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') - { - } + public function zUnion($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') {} /** * Creates an intersection of sorted sets given in second argument. @@ -3908,9 +3592,7 @@ public function zUnion($Output, $ZSetKeys, array $Weights = null, $aggregateFunc * $redis->zInterStore('ko4', array('k1', 'k2'), array(1, 5), 'max'); // 2, 'ko4' => array('val3', 'val1') * */ - public function zInterStore($output, $zSetKeys, array $weights = null, $aggregateFunction = null) - { - } + public function zInterStore($output, $zSetKeys, array $weights = null, $aggregateFunction = null) {} /** * @param $Output @@ -3920,9 +3602,7 @@ public function zInterStore($output, $zSetKeys, array $weights = null, $aggregat * @throws RedisException */ #[Deprecated(replacement: '%class%->zInterStore(%parametersList%)')] - public function zInter($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') - { - } + public function zInter($Output, $ZSetKeys, array $Weights = null, $aggregateFunction = 'SUM') {} /** * Scan a sorted set for members, with optional pattern and count @@ -3947,9 +3627,7 @@ public function zInter($Output, $ZSetKeys, array $Weights = null, $aggregateFunc * } * */ - public function zScan($key, &$iterator, $pattern = null, $count = 0) - { - } + public function zScan($key, &$iterator, $pattern = null, $count = 0) {} /** * Block until Redis can pop the highest or lowest scoring members from one or more ZSETs. @@ -3977,9 +3655,7 @@ public function zScan($key, &$iterator, $pattern = null, $count = 0) * $redis->bzPopMax('zs1', 'zs2', 5); * */ - public function bzPopMax($key, $timeout_or_key, ...$extra_args) - { - } + public function bzPopMax($key, $timeout_or_key, ...$extra_args) {} /** * @param string|array $key @@ -3995,9 +3671,7 @@ public function bzPopMax($key, $timeout_or_key, ...$extra_args) * @since >= 5.0 * @link https://redis.io/commands/bzpopmin */ - public function bzPopMin($key, $timeout_or_key, ...$extra_args) - { - } + public function bzPopMin($key, $timeout_or_key, ...$extra_args) {} /** * Can pop the highest scoring members from one ZSET. @@ -4020,9 +3694,7 @@ public function bzPopMin($key, $timeout_or_key, ...$extra_args) * $redis->zPopMax('zs1', 3); * */ - public function zPopMax($key, $count = null) - { - } + public function zPopMax($key, $count = null) {} /** * Can pop the lowest scoring members from one ZSET. @@ -4045,9 +3717,7 @@ public function zPopMax($key, $count = null) * $redis->zPopMin('zs1', 3); * */ - public function zPopMin($key, $count = null) - { - } + public function zPopMin($key, $count = null) {} /** * Adds a value to the hash stored at key. If this value is already in the hash, FALSE is returned. @@ -4073,9 +3743,7 @@ public function zPopMin($key, $count = null) * $redis->hGet('h', 'key1'); // returns "plop" * */ - public function hSet($key, $hashKey, string $value) - { - } + public function hSet($key, $hashKey, string $value) {} /** * Adds a value to the hash stored at key only if this field isn't already in the hash. @@ -4097,9 +3765,7 @@ public function hSet($key, $hashKey, string $value) * wasn't replaced. * */ - public function hSetNx($key, $hashKey, $value) - { - } + public function hSetNx($key, $hashKey, $value) {} /** * Gets a value from the hash stored at key. @@ -4114,9 +3780,7 @@ public function hSetNx($key, $hashKey, $value) * * @link https://redis.io/commands/hget */ - public function hGet($key, $hashKey) - { - } + public function hGet($key, $hashKey) {} /** * Returns the length of a hash, in number of items @@ -4136,9 +3800,7 @@ public function hGet($key, $hashKey) * $redis->hLen('h'); // returns 2 * */ - public function hLen($key) - { - } + public function hLen($key) {} /** * Removes a values from the hash stored at key. @@ -4173,9 +3835,7 @@ public function hLen($key) * // } * */ - public function hDel($key, $hashKey1, ...$otherHashKeys) - { - } + public function hDel($key, $hashKey1, ...$otherHashKeys) {} /** * Returns the keys in a hash, as an array of strings. @@ -4210,9 +3870,7 @@ public function hDel($key, $hashKey1, ...$otherHashKeys) * // The order is random and corresponds to redis' own internal representation of the set structure. * */ - public function hKeys($key) - { - } + public function hKeys($key) {} /** * Returns the values in a hash, as an array of strings. @@ -4247,9 +3905,7 @@ public function hKeys($key) * // The order is random and corresponds to redis' own internal representation of the set structure. * */ - public function hVals($key) - { - } + public function hVals($key) {} /** * Returns the whole hash, as an array of strings indexed by strings. @@ -4284,9 +3940,7 @@ public function hVals($key) * // The order is random and corresponds to redis' own internal representation of the set structure. * */ - public function hGetAll($key) - { - } + public function hGetAll($key) {} /** * Verify if the specified member exists in a key. @@ -4306,9 +3960,7 @@ public function hGetAll($key) * $redis->hExists('h', 'NonExistingKey'); // FALSE * */ - public function hExists($key, $hashKey) - { - } + public function hExists($key, $hashKey) {} /** * Increments the value of a member from a hash by a given amount. @@ -4329,9 +3981,7 @@ public function hExists($key, $hashKey) * $redis->hIncrBy('h', 'x', 1); // h[x] ← 2 + 1. Returns 3 * */ - public function hIncrBy($key, $hashKey, $value) - { - } + public function hIncrBy($key, $hashKey, $value) {} /** * Increment the float value of a hash field by the given amount @@ -4364,9 +4014,7 @@ public function hIncrBy($key, $hashKey, $value) * } * */ - public function hIncrByFloat($key, $field, $increment) - { - } + public function hIncrByFloat($key, $field, $increment) {} /** * Fills in a whole hash. Non-string values are converted to string, using the standard (string) cast. @@ -4387,9 +4035,7 @@ public function hIncrByFloat($key, $field, $increment) * $redis->hIncrBy('user:1', 'salary', 100); // Joe earns 100 more now. * */ - public function hMSet($key, $hashKeys) - { - } + public function hMSet($key, $hashKeys) {} /** * Retrieve the values associated to the specified fields in the hash. @@ -4411,9 +4057,7 @@ public function hMSet($key, $hashKeys) * $redis->hMGet('h', array('field1', 'field2')); // returns array('field1' => 'value1', 'field2' => 'value2') * */ - public function hMGet($key, $hashKeys) - { - } + public function hMGet($key, $hashKeys) {} /** * Scan a HASH value for members, with an optional pattern and count. @@ -4438,9 +4082,7 @@ public function hMGet($key, $hashKeys) * // } * */ - public function hScan($key, &$iterator, $pattern = null, $count = 0) - { - } + public function hScan($key, &$iterator, $pattern = null, $count = 0) {} /** * Get the string length of the value associated with field in the hash stored at key @@ -4456,9 +4098,7 @@ public function hScan($key, &$iterator, $pattern = null, $count = 0) * @link https://redis.io/commands/hstrlen * @since >= 3.2 */ - public function hStrLen(string $key, string $field) - { - } + public function hStrLen(string $key, string $field) {} /** * Add one or more geospatial items to the specified key. @@ -4489,9 +4129,7 @@ public function hStrLen(string $key, string $field) * ); // 2 * */ - public function geoAdd($key, $longitude, $latitude, $member, ...$other_triples) - { - } + public function geoAdd($key, $longitude, $latitude, $member, ...$other_triples) {} /** * Retrieve Geohash strings for one or more elements of a geospatial index. @@ -4519,9 +4157,7 @@ public function geoAdd($key, $longitude, $latitude, $member, ...$other_triples) * // } * */ - public function geoHash($key, ...$member) - { - } + public function geoHash($key, ...$member) {} /** * Return longitude, latitude positions for each requested member. @@ -4554,17 +4190,11 @@ public function geoHash($key, ...$member) * } * */ - public function geoPos(string $key, string ...$member) - { - } + public function geoPos(string $key, string ...$member) {} - public function geosearch(string $key, array|string $position, array|int|float $shape, string $unit, array $options = []): array|false - { - } + public function geosearch(string $key, array|string $position, array|int|float $shape, string $unit, array $options = []): array|false{} - public function geosearchstore(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = []): array|false - { - } + public function geosearchstore(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = []): array|false{} /** * Return the distance between two members in a geospatial set. @@ -4617,9 +4247,7 @@ public function geosearchstore(string $dst, string $src, array|string $position, * bool(false) * */ - public function geoDist($key, $member1, $member2, $unit = null) - { - } + public function geoDist($key, $member1, $member2, $unit = null) {} /** * Return members of a set with geospatial information that are within the radius specified by the caller. @@ -4721,9 +4349,7 @@ public function geoDist($key, $member1, $member2, $unit = null) * } * */ - public function geoRadius($key, $longitude, $latitude, $radius, $unit, array $options = []) - { - } + public function geoRadius($key, $longitude, $latitude, $radius, $unit, array $options = []) {} /** * This method is identical to geoRadius except that instead of passing a longitude and latitude as the "source" @@ -4765,9 +4391,7 @@ public function geoRadius($key, $longitude, $latitude, $radius, $unit, array $op * } * */ - public function geoRadiusByMember($key, $member, $radius, $units, array $options = []) - { - } + public function geoRadiusByMember($key, $member, $radius, $units, array $options = []) {} /** * Get or Set the redis config keys. @@ -4787,9 +4411,7 @@ public function geoRadiusByMember($key, $member, $radius, $units, array $options * $redis->config("SET", "dir", "/var/run/redis/dumps/"); * */ - public function config($operation, $key, $value = null) - { - } + public function config($operation, $key, $value = null) {} /** * Evaluate a LUA script serverside @@ -4818,9 +4440,7 @@ public function config($operation, $key, $value = null) * $redis->eval("return {1,2,3,redis.call('lrange','mylist',0,-1)}}"); * */ - public function eval($script, $args = [], $numKeys = 0) - { - } + public function eval($script, $args = [], $numKeys = 0) {} /** * @param string $script @@ -4831,9 +4451,7 @@ public function eval($script, $args = [], $numKeys = 0) * @throws RedisException */ #[Deprecated(replacement: '%class%->eval(%parametersList%)')] - public function evaluate($script, $args = [], $numKeys = 0) - { - } + public function evaluate($script, $args = [], $numKeys = 0) {} /** * Evaluate a LUA script serverside, from the SHA1 hash of the script instead of the script itself. @@ -4857,9 +4475,7 @@ public function evaluate($script, $args = [], $numKeys = 0) * $redis->evalSha($sha); // Returns 1 * */ - public function evalSha($scriptSha, $args = [], $numKeys = 0) - { - } + public function evalSha($scriptSha, $args = [], $numKeys = 0) {} /** * @param string $scriptSha @@ -4869,9 +4485,7 @@ public function evalSha($scriptSha, $args = [], $numKeys = 0) * @throws RedisException */ #[Deprecated(replacement: '%class%->evalSha(%parametersList%)')] - public function evaluateSha($scriptSha, $args = [], $numKeys = 0) - { - } + public function evaluateSha($scriptSha, $args = [], $numKeys = 0) {} /** * Execute the Redis SCRIPT command to perform various operations on the scripting subsystem. @@ -4899,9 +4513,7 @@ public function evaluateSha($scriptSha, $args = [], $numKeys = 0) * SCRIPT KILL will return true if a script was able to be killed and false if not * SCRIPT EXISTS will return an array with TRUE or FALSE for each passed script */ - public function script($command, ...$script) - { - } + public function script($command, ...$script) {} /** * The last error message (if any) @@ -4917,9 +4529,7 @@ public function script($command, ...$script) * // "ERR Error compiling script (new function): user_script:1: '=' expected near '-'" * */ - public function getLastError() - { - } + public function getLastError() {} /** * Clear the last error message @@ -4939,9 +4549,7 @@ public function getLastError() * // NULL * */ - public function clearLastError() - { - } + public function clearLastError() {} /** * Issue the CLIENT command with various arguments. @@ -4976,9 +4584,7 @@ public function clearLastError() * $redis->client('kill',Date: Wed, 12 Oct 2022 16:29:11 +0200 Subject: [PATCH 198/419] php cs fixer fixed --- redis/Redis.php | 896 +++++++++++------------------------------ redis/RedisCluster.php | 648 ++++++++--------------------- 2 files changed, 386 insertions(+), 1158 deletions(-) diff --git a/redis/Redis.php b/redis/Redis.php index 04c24fc3d..e15e7077c 100644 --- a/redis/Redis.php +++ b/redis/Redis.php @@ -132,9 +132,7 @@ class Redis * ], * ]); */ - public function __construct($options = null) - { - } + public function __construct($options = null) {} /** * Connects to a Redis instance. @@ -206,9 +204,7 @@ public function open( * * @throws RedisException */ - public function isConnected() - { - } + public function isConnected() {} /** * Retrieve our host or unix socket that we're connected to @@ -217,9 +213,7 @@ public function isConnected() * * @throws RedisException */ - public function getHost() - { - } + public function getHost() {} /** * Get the port we're connected to @@ -228,9 +222,7 @@ public function getHost() * * @throws RedisException */ - public function getPort() - { - } + public function getPort() {} /** * Get the database number phpredis is pointed to @@ -240,9 +232,7 @@ public function getPort() * * @throws RedisException */ - public function getDbNum() - { - } + public function getDbNum() {} /** * Get the (write) timeout in use for phpredis @@ -251,9 +241,7 @@ public function getDbNum() * * @throws RedisException */ - public function getTimeout() - { - } + public function getTimeout() {} /** * Get the read timeout specified to phpredis or FALSE if we're not connected @@ -263,9 +251,7 @@ public function getTimeout() * * @throws RedisException */ - public function getReadTimeout() - { - } + public function getReadTimeout() {} /** * Gets the persistent ID that phpredis is using @@ -277,9 +263,7 @@ public function getReadTimeout() * * @throws RedisException */ - public function getPersistentID() - { - } + public function getPersistentID() {} /** * Get the password used to authenticate the phpredis connection @@ -290,9 +274,7 @@ public function getPersistentID() * * @throws RedisException */ - public function getAuth() - { - } + public function getAuth() {} /** * Connects to a Redis instance or reuse a connection already established with pconnect/popen. @@ -383,9 +365,7 @@ public function popen( * * @throws RedisException */ - public function close() - { - } + public function close() {} /** * Swap one Redis database with another atomically @@ -407,9 +387,7 @@ public function close() * $redis->swapdb(0, 1); *
*/ - public function geoRadius($key, $longitude, $latitude, $radius, $radiusUnit, array $options) - { - } + public function geoRadius($key, $longitude, $latitude, $radius, $radiusUnit, array $options) {} /** * Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member @@ -3888,9 +3566,7 @@ public function geoRadius($key, $longitude, $latitude, $radius, $radiusUnit, arr * @param string $radiusUnit * @param array $options */ - public function geoRadiusByMember($key, $member, $radius, $radiusUnit, array $options) - { - } + public function geoRadiusByMember($key, $member, $radius, $radiusUnit, array $options) {} } class RedisClusterException extends Exception From fdb2c532b5deae288363c4a91d55ae9a28158f5f Mon Sep 17 00:00:00 2001 From: DmitryTronin*/ - public function setnx(string $key, string $value) {} + public function setnx(string $key, string $value) {} /** * Remove specified keys. @@ -1956,7 +1952,7 @@ public function sDiffStore($dstKey, $key1, ...$otherKeys) {} */ public function sMembers($key) {} - public function sMisMember(string $key, string $member, string ...$other_members): array|false{} + public function sMisMember(string $key, string $member, string ...$other_members): array|false {} /** * @link https://redis.io/commands/smembers @@ -2653,7 +2649,7 @@ public function bitCount($key, $start = 0, $end = -1) {} * @param string $key1 first key * @param string ...$otherKeys variadic list of keys * - * @return False|int|Redis The size of the string stored in the destination key or Redis if in multimode + * @return false|int|Redis The size of the string stored in the destination key or Redis if in multimode * * @throws RedisException * @@ -3254,13 +3250,13 @@ public function zRevRangeByScore(string $key, string $start, string $end, array */ public function zRangeByLex(string $key, string $min, string $max, int $offset = -1, int $count = -1) {} - public function zMscore(string $key, string $member, string ...$other_members): array|false{} + public function zMscore(string $key, string $member, string ...$other_members): array|false {} - public function zPopMax(string $key, int $value = null): array|false{} + public function zPopMax(string $key, int $value = null): array|false {} - public function zPopMin(string $key, int $value = null): array|false{} + public function zPopMin(string $key, int $value = null): array|false {} - public function zRandMember(string $key, array $options = null): string|array|false{} + public function zRandMember(string $key, array $options = null): string|array|false {} /** * @param string $key @@ -3291,7 +3287,6 @@ public function zRevRangeByLex(string $key, string $min, string $max, int $offse */ public function zRemRangeByLex(string $key, string $min, string $max) {} - /** * Returns the number of elements of the sorted set stored at the specified key which have * scores in the range [start,end]. Adding a parenthesis before start or end excludes it @@ -3403,7 +3398,7 @@ public function zDeleteRangeByRank($key, $start, $end) {} */ public function zCard($key) {} - public function zdiff(array $keys, array $options = null): array|false{} + public function zdiff(array $keys, array $options = null): array|false {} /** * @param string $key @@ -4192,9 +4187,9 @@ public function geoHash($key, ...$member) {} */ public function geoPos(string $key, string ...$member) {} - public function geosearch(string $key, array|string $position, array|int|float $shape, string $unit, array $options = []): array|false{} + public function geosearch(string $key, array|string $position, array|int|float $shape, string $unit, array $options = []): array|false {} - public function geosearchstore(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = []): array|false{} + public function geosearchstore(string $dst, string $src, array|string $position, array|int|float $shape, string $unit, array $options = []): array|false {} /** * Return the distance between two members in a geospatial set. @@ -5149,6 +5144,4 @@ public function xTrim($stream, $maxLen, $isApproximate) {} public function sAddArray($key, array $values) {} } -class RedisException extends Exception -{ -} +class RedisException extends Exception {} diff --git a/redis/RedisCluster.php b/redis/RedisCluster.php index 3e919dcb2..6ba8a6a7f 100644 --- a/redis/RedisCluster.php +++ b/redis/RedisCluster.php @@ -3569,6 +3569,4 @@ public function geoRadius($key, $longitude, $latitude, $radius, $radiusUnit, arr public function geoRadiusByMember($key, $member, $radius, $radiusUnit, array $options) {} } -class RedisClusterException extends Exception -{ -} +class RedisClusterException extends Exception {} diff --git a/tests/StubsPhpDocTest.php b/tests/StubsPhpDocTest.php index 3df55b8bf..ddbda74db 100644 --- a/tests/StubsPhpDocTest.php +++ b/tests/StubsPhpDocTest.php @@ -133,7 +133,7 @@ private static function checkHtmlTags(BasePHPElement $element, string $elementNa '#Date: Wed, 12 Oct 2022 17:42:00 +0200 Subject: [PATCH 199/419] more php cs fixer fixes fixed regexp for checkHtmlTags test to include union types --- redis/Redis.php | 37 +++++++++++++++---------------------- redis/RedisCluster.php | 4 +--- tests/StubsPhpDocTest.php | 2 +- 3 files changed, 17 insertions(+), 26 deletions(-) diff --git a/redis/Redis.php b/redis/Redis.php index e15e7077c..caabec813 100644 --- a/redis/Redis.php +++ b/redis/Redis.php @@ -167,8 +167,7 @@ public function connect( $retry_interval = 0, $read_timeout = 0, $context = null - ) { - } + ) {} /** * Connects to a Redis instance. @@ -194,8 +193,7 @@ public function open( $retry_interval = 0, $read_timeout = 0, $context = null - ) { - } + ) {} /** * A method to determine if a phpredis object thinks it's connected to a server @@ -326,8 +324,7 @@ public function pconnect( $retry_interval = 0, $read_timeout = 0, $context = null - ) { - } + ) {} /** * @param string $host @@ -351,8 +348,7 @@ public function popen( $retry_interval = 0, $read_timeout = 0, $context = null - ) { - } + ) {} /** * Disconnects from the Redis instance. @@ -586,7 +582,7 @@ public function psetex($key, $expire, string $value) {} * $redis->setnx('key', 'value'); // return FALSE *
.*#sU', '#
.*
#sU',
'#@author.*<.*>#U',
- '#(\s[\w]+[-][\w]+<[a-zA-Z,\s]+>[\s|]+)|([\w]+<[a-zA-Z,\s]+>[\s|\W]+)#'
+ '#(\s[\w]+[-][\w]+<[a-zA-Z,\s]+>[\s|]+)|([\w]+<[a-zA-Z,|\s]+>[\s|\W]+)#'
],
'',
$phpdoc
From e73dd985c27061300255675766c15216485607fc Mon Sep 17 00:00:00 2001
From: DmitryTronin Returns an array of information, optionally containing script specific state information
* @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|falseReturns an array of information, including ini, blacklist and version
* @since 5.5 */ +#[ArrayShape(["directives" => "array", "version" => "string[]", "blacklist" => "array"])] function opcache_get_configuration(): array|false {} /** diff --git a/bz2/bz2.php b/bz2/bz2.php index f469d9a26..a19ffc429 100644 --- a/bz2/bz2.php +++ b/bz2/bz2.php @@ -1,5 +1,6 @@ 'array', '8.0' => 'array|false'], default: 'array')] +#[ArrayShape(["errno" => "int", "errstr" => "string"])] function bzerror($bz) {} /** diff --git a/calendar/calendar.php b/calendar/calendar.php index e22256b62..3aef6c220 100644 --- a/calendar/calendar.php +++ b/calendar/calendar.php @@ -1,6 +1,7 @@ "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 {} * * @return array */ +#[ArrayShape(["months" => "array", "abbrevmonths" => "array", "maxdaysinmonth" => "int", "calname" => "string", "calsymbol" => "string"])] function cal_info(int $calendar = -1): array {} define('CAL_GREGORIAN', 0); diff --git a/curl/curl.php b/curl/curl.php index a07f73b73..92ce0b7e8 100644 --- a/curl/curl.php +++ b/curl/curl.php @@ -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 {} /** diff --git a/date/date.php b/date/date.php index b610d7665..a31adf912 100644 --- a/date/date.php +++ b/date/date.php @@ -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 {} * */ #[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|falseArray containing location information about timezone.
*/ #[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 diff --git a/date/date_c.php b/date/date_c.php index d9dff0f43..5631170bb 100644 --- a/date/date_c.php +++ b/date/date_c.php @@ -779,6 +779,12 @@ public function getName(): string {} * @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 {} /** diff --git a/gd/gd.php b/gd/gd.php index 23af9b2ae..27b74d859 100644 --- a/gd/gd.php +++ b/gd/gd.php @@ -1,5 +1,6 @@ */ #[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) {} /** diff --git a/gmp/gmp.php b/gmp/gmp.php index 90f1057e7..712828be1 100644 --- a/gmp/gmp.php +++ b/gmp/gmp.php @@ -1,6 +1,7 @@ "int", "s" => "int", "t" => "int"])] function gmp_gcdext(GMP|string|int $num1, GMP|string|int $num2): array {} /** diff --git a/iconv/iconv.php b/iconv/iconv.php index 78c928ce9..3bdb03451 100644 --- a/iconv/iconv.php +++ b/iconv/iconv.php @@ -1,6 +1,7 @@ */ #[Pure] +#[ArrayShape(["input_encoding" => "string", "output_encoding" => "string", "internal_encoding" => "string"])] function iconv_get_encoding(string $type = "all"): array|string|false {} /** diff --git a/imap/imap.php b/imap/imap.php index 99e4e0a78..86e74f986 100644 --- a/imap/imap.php +++ b/imap/imap.php @@ -1,6 +1,7 @@ "int", "limit" => "int"])] function imap_get_quota(#[LanguageLevelTypeAware(['8.1' => 'IMAP\Connection'], default: 'resource')] $imap, string $quota_root): array|false {} /** diff --git a/ldap/ldap.php b/ldap/ldap.php index fed47b9df..2fbe26406 100644 --- a/ldap/ldap.php +++ b/ldap/ldap.php @@ -1,6 +1,7 @@ "int"])] function ldap_explode_dn(string $dn, int $with_attrib): array|false {} /** diff --git a/mbstring/mbstring.php b/mbstring/mbstring.php index 349021f15..b7a755bed 100644 --- a/mbstring/mbstring.php +++ b/mbstring/mbstring.php @@ -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 {} /** diff --git a/mysqli/mysqli.php b/mysqli/mysqli.php index 8bb972691..b9dec2fa1 100644 --- a/mysqli/mysqli.php +++ b/mysqli/mysqli.php @@ -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 {} * * @since 5.6 */ +#[ArrayShape(["total" => "int", "active_plinks" => "int", "cached_plinks" => "int"])] function mysqli_get_links_stats(): array {} /** diff --git a/oci8/oci8.php b/oci8/oci8.php index 7bddeda00..fd8c1b88f 100644 --- a/oci8/oci8.php +++ b/oci8/oci8.php @@ -1,6 +1,7 @@ * */ +#[ArrayShape(["code" => "int", "message" => "string", "offset" => "int", "sqltext" => "string"])] function oci_error($resource = null) {} /** diff --git a/odbc/odbc.php b/odbc/odbc.php index cd76ebfad..85af5b678 100644 --- a/odbc/odbc.php +++ b/odbc/odbc.php @@ -1,6 +1,7 @@ * @return array|false FALSE on error, and an array upon success. */ +#[ArrayShape(["server" => "string", "description" => "string"])] function odbc_data_source($connection_id, $fetch_type) {} /** diff --git a/openssl/openssl.php b/openssl/openssl.php index 7669ec148..a4e310e50 100644 --- a/openssl/openssl.php +++ b/openssl/openssl.php @@ -1,6 +1,7 @@ '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 {} diff --git a/pgsql/pgsql.php b/pgsql/pgsql.php index 343b3086c..90d8ad290 100644 --- a/pgsql/pgsql.php +++ b/pgsql/pgsql.php @@ -1,6 +1,7 @@ 'PgSql\Connection|null'], * and server keys and values (if available). Returns * FALSE 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 FALSE 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, diff --git a/posix/posix.php b/posix/posix.php index 937332479..cde825d4f 100644 --- a/posix/posix.php +++ b/posix/posix.php @@ -1,6 +1,7 @@ '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 {} * */ #[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 {} * */ #[Pure] +#[ArrayShape([ + 'name' => 'string', + 'passwd' => 'string', + 'uid' => 'int', + 'gid' => 'int', + 'gecos' => 'string', + 'dir' => 'string', + 'shell' => 'string', +])] function posix_getpwuid(int $user_id): array|false {} /** diff --git a/readline/readline.php b/readline/readline.php index e0fd64297..60ff827e7 100644 --- a/readline/readline.php +++ b/readline/readline.php @@ -1,6 +1,7 @@ * 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 {} /** diff --git a/sockets/sockets.php b/sockets/sockets.php index e81e61019..dcae3bb59 100644 --- a/sockets/sockets.php +++ b/sockets/sockets.php @@ -1,6 +1,7 @@ 'int', + 'ai_family' => 'int', + 'ai_socktype' => 'int', + 'ai_protocol' => 'int', + 'ai_canonname' => 'string', + "ai_addr" => "array" +])] function socket_addrinfo_explain(AddressInfo $address): array {} /** diff --git a/standard/standard_0.php b/standard/standard_0.php index 997e26e26..d2a003ff7 100644 --- a/standard/standard_0.php +++ b/standard/standard_0.php @@ -216,6 +216,7 @@ function usleep(int $microseconds): void {} * remaining in the delay * */ +#[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 {} /** diff --git a/standard/standard_1.php b/standard/standard_1.php index 1b67bc7e9..1fd53aeef 100644 --- a/standard/standard_1.php +++ b/standard/standard_1.php @@ -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, diff --git a/standard/standard_4.php b/standard/standard_4.php index cecb532f0..6a2b04041 100644 --- a/standard/standard_4.php +++ b/standard/standard_4.php @@ -453,6 +453,7 @@ function ini_get(string $option): string|false {} * */ #[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 {} /** diff --git a/standard/standard_6.php b/standard/standard_6.php index 4da7b8cae..92835dd96 100644 --- a/standard/standard_6.php +++ b/standard/standard_6.php @@ -133,6 +133,7 @@ function stream_context_set_params($context, array $params): bool {} * * @return array an associate array containing all context options and parameters. */ +#[ArrayShape(["notification" => "string", "options" => "array"])] function stream_context_get_params($context): array {} /** diff --git a/standard/standard_8.php b/standard/standard_8.php index 3f9f1a6e1..ee926981c 100644 --- a/standard/standard_8.php +++ b/standard/standard_8.php @@ -1,5 +1,6 @@ '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 {} *+ * An array containing the x and y + * coordinates of the polygons vertices consecutively. + *
+ * @param int|null $color+ * A color identifier created with + * imagecolorallocate. + *
+ * @return bool true on success or false on failure. + */ +#[PhpStormStubsElementAvailable(from: '8.0')] +function imagefilledpolygon( + GdImage $image, + array $points, + ?int $color ): bool {} /** diff --git a/tests/TestData/mutedProblems.json b/tests/TestData/mutedProblems.json index e04804c68..b8033b9cc 100644 --- a/tests/TestData/mutedProblems.json +++ b/tests/TestData/mutedProblems.json @@ -574,6 +574,17 @@ } ], "functions": [ + { + "name": "imagefilledpolygon", + "problems": [ + { + "description": "has duplicate in stubs", + "versions": [ + "ALL" + ] + } + ] + }, { "name": "session_set_save_handler", "problems": [ From d0768e300b75b2123d639db9987da50001af9910 Mon Sep 17 00:00:00 2001 From: Ivan Fedorov+ * @param string|string[]|int $locales
* If locale is null or the empty string * "", the locale names will be set from the * values of environment variables with the same names as the above @@ -1087,7 +1087,7 @@ function join(array|string $separator = "", ?array $array): string {} * different names on different systems or for providing a fallback * for a possibly not available locale. *
- * @param string ...$rest + * @param string|string[] ...$rest * @return string|falsethe new current locale, or false if the locale functionality is
* not implemented on your platform, the specified locale does not exist or
* the category name is invalid.
From 279e56519e5396305d06843adbf0f04ad8fc74be Mon Sep 17 00:00:00 2001
From: Thomas Lamy
@@ -1106,7 +1106,7 @@ public function query($statement, $mode = PDO::ATTR_DEFAULT_FETCH_MODE, $arg3 =
*
* Data inside the query should be properly escaped.
*
+ * @param int|null $mode
* The fetch mode must be one of the PDO::FETCH_* constants.
*
@@ -1118,7 +1118,12 @@ public function query($statement, $mode = PDO::ATTR_DEFAULT_FETCH_MODE, $arg3 =
* @see PDOStatement::setFetchMode For a full description of the second and following parameters.
*/
#[PhpStormStubsElementAvailable('8.0')]
- public function query($statement, $mode = PDO::ATTR_DEFAULT_FETCH_MODE, ...$fetch_mode_args) {}
+ #[LanguageLevelTypeAware(['8.1' => 'PDOStatement|false'], default: '')]
+ public function query(
+ #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $statement,
+ #[LanguageLevelTypeAware(['8.0' => 'int|null'], default: '')] $mode = null,
+ #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] ...$fetch_mode_args
+ ) {}
/**
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
- * Whenever to use XHTML compatible line breaks or not.
+ * Whether to use XHTML compatible line breaks or not.
*
diff --git a/tests/StubsTypeHintsTest.php b/tests/StubsTypeHintsTest.php
index ee1d07d63..3343c3fa6 100644
--- a/tests/StubsTypeHintsTest.php
+++ b/tests/StubsTypeHintsTest.php
@@ -121,7 +121,7 @@ public function testMethodsReturnTypeHints(PHPClass|PHPInterface $class, PHPMeth
}
/**
- * @dataProvider \StubTests\TestData\Providers\Reflection\ReflectionParametersProvider::methodParametersProvider
+ * @dataProvider \StubTests\TestData\Providers\Reflection\ReflectionParametersProvider::methodParametersWithTypeHintProvider
* @throws RuntimeException
*/
public function testMethodsParametersTypeHints(PHPClass|PHPInterface $reflectionClass, PHPMethod $reflectionMethod, PHPParameter $reflectionParameter)
diff --git a/tests/TestData/Providers/Reflection/ReflectionParametersProvider.php b/tests/TestData/Providers/Reflection/ReflectionParametersProvider.php
index c873bff04..751563825 100644
--- a/tests/TestData/Providers/Reflection/ReflectionParametersProvider.php
+++ b/tests/TestData/Providers/Reflection/ReflectionParametersProvider.php
@@ -79,6 +79,26 @@ public static function methodParametersProvider(): ?Generator
}
}
+ public static function methodParametersWithTypeHintProvider(): ?Generator
+ {
+ $classesAndInterfaces = ReflectionStubsSingleton::getReflectionStubs()->getClasses() +
+ ReflectionStubsSingleton::getReflectionStubs()->getInterfaces();
+ foreach (EntitiesFilter::getFiltered($classesAndInterfaces) as $class) {
+ //exclude classes from PHPReflectionParser
+ if (strncmp($class->name, 'PHP', 3) !== 0) {
+ foreach (EntitiesFilter::getFilteredFunctions($class) as $method) {
+ foreach (EntitiesFilter::getFilteredParameters(
+ $method,
+ null,
+ StubProblemType::PARAMETER_TYPE_MISMATCH
+ ) as $parameter) {
+ yield "$class->name::$method->name($parameter->name)" => [$class, $method, $parameter];
+ }
+ }
+ }
+ }
+ }
+
public static function methodOptionalParametersProvider(): ?Generator
{
$classesAndInterfaces = ReflectionStubsSingleton::getReflectionStubs()->getClasses() +
diff --git a/tests/TestData/mutedProblems.json b/tests/TestData/mutedProblems.json
index b8033b9cc..0db910d70 100644
--- a/tests/TestData/mutedProblems.json
+++ b/tests/TestData/mutedProblems.json
@@ -3027,6 +3027,29 @@
}
]
},
+ {
+ "name": "IntlBreakIterator",
+ "methods": [
+ {
+ "name": "getPartsIterator",
+ "parameters": [
+ {
+ "name": "type",
+ "problems": [
+ {
+ "description": "parameter type mismatch",
+ "versions": [
+ 8.0,
+ 8.1,
+ 8.2
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
{
"name": "ParseError",
"problems": [
From 2e4ef19de100741c618bd488856f25887c190802 Mon Sep 17 00:00:00 2001
From: Ivan Fedorov
Date: Sat, 19 Nov 2022 16:55:55 +0100
Subject: [PATCH 224/419] Update 404 link for stream constants
---
standard/standard_defines.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/standard/standard_defines.php b/standard/standard_defines.php
index ed759df0e..d08e6d4ad 100644
--- a/standard/standard_defines.php
+++ b/standard/standard_defines.php
@@ -878,7 +878,7 @@
* not be bound to the actual resource you requested.
* If the requested resource is network based, this flag will cause the
* opener to block until the whole contents have been downloaded.
- * @link https://php.net/manual/en/internals2.ze1.streams.constants.php
+ * @link https://www.php.net/manual/en/stream.constants.php
*/
define('STREAM_MUST_SEEK', 16);
define('STREAM_URL_STAT_LINK', 1);
From 3f79c26a35a977cb7481c8ce8916698309f3b3e2 Mon Sep 17 00:00:00 2001
From: Ivan Fedorov
@@ -1091,7 +1094,7 @@ public function exec(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')]
* @see PDOStatement::setFetchMode For a full description of the second and following parameters.
*/
#[PhpStormStubsElementAvailable(to: '7.4')]
- public function query($statement, $mode = PDO::ATTR_DEFAULT_FETCH_MODE, $arg3 = null, array $ctorargs = []) {}
+ public function query($statement, $mode = PDO::ATTR_DEFAULT_FETCH_MODE, $arg3 = null, $ctorargs = []) {}
/**
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
@@ -1713,7 +1716,10 @@ public function fetchAll(
* correspond to the column names or FALSE on failure.
*/
#[TentativeType]
- public function fetchObject(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $class = "stdClass", array $constructorArgs = []): object|false {}
+ public function fetchObject(
+ #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $class = "stdClass",
+ #[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $constructorArgs = []
+ ): object|false {}
/**
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)
@@ -1877,7 +1883,7 @@ public function getColumnMeta(#[LanguageLevelTypeAware(['8.0' => 'int'], default
* @return bool TRUE on success or FALSE on failure.
*/
#[PhpStormStubsElementAvailable(to: '7.4')]
- public function setFetchMode($mode, $className = null, array $params = []) {}
+ public function setFetchMode($mode, $className = null, $params = []) {}
/**
* (PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0)
From 35e3915c9d47464a0d1238c994c88b96d50e0261 Mon Sep 17 00:00:00 2001
From: Ivan Fedorov
+ * (PHP 5 >= 5.1.0, PHP 7, PHP 8, PECL pdo >= 0.2.0)
* Executes an SQL statement, returning a result set as a PDOStatement object
* @link https://php.net/manual/en/pdo.query.php
* @param string $statement
From d07464d9afbfd62c9dd7ae830c91ec0711e13a46 Mon Sep 17 00:00:00 2001
From: Ivan Fedorov
- * Returns TRUE on success or the error code. + * Returns TRUE on success, FALSE or the error code on error. *
*
* ZipArchive::ER_EXISTS
From b2e9fffa1f16cd399c1741d638ac9028a4a864b3 Mon Sep 17 00:00:00 2001
From: Andrew Dawes
- * A character.
+ * A string.
*
+ * @param int<0,max> $seconds
* Halt time in seconds.
*
- * The column width. + * The number of characters at which the string will be wrapped. *
* @param string $break [optional]* The line is broken using the optional @@ -333,7 +333,7 @@ function flush(): void {} * a word that is larger than the given width, it is broken apart. * (See second example). *
- * @return string the given string wrapped at the specified column. + * @return string the given string wrapped at the specified length. */ #[Pure] function wordwrap(string $string, int $width = 75, string $break = "\n", bool $cut_long_words = false): string {} @@ -765,7 +765,7 @@ function get_html_translation_table( * The input string. * * @param bool $binary [optional]- * If the optional raw_output is set to true, + * If the optional binary is set to true, * then the sha1 digest is instead returned in raw binary format with a * length of 20, otherwise the returned value is a 40-character * hexadecimal number. @@ -856,11 +856,12 @@ function iptcparse(string $iptc_block): array|false {} * Path to the JPEG image. *
* @param int $spool- * Spool flag. If the spool flag is over 2 then the JPEG will be - * returned as a string. + * Spool flag. If the spool flag is less than 2 then the JPEG will + * be returned as a string. Otherwise the JPEG will be printed to + * STDOUT. *
- * @return string|bool If success and spool flag is lower than 2 then the JPEG will not be - * returned as a string, false on errors. + * @return string|bool If spool is less than 2, the JPEG will be returned, or false on + * failure. Otherwise returns true on success or false on failure. */ function iptcembed(string $iptc_data, string $filename, int $spool = 0): string|bool {} @@ -1026,7 +1027,7 @@ function image_type_to_mime_type(int $image_type): string {} * Removed since 8.0. * Whether to prepend a dot to the extension or not. Default to true. * - * @return string|false A string with the extension corresponding to the given image type. + * @return string|false A string with the extension corresponding to the given image type, or false on failure. */ #[Pure] function image_type_to_extension(int $image_type, bool $include_dot = true): string|false {} @@ -1137,7 +1138,7 @@ function phpversion(?string $extension): string|false {} * @link https://php.net/manual/en/function.phpcredits.php * @param int $flags [optional]* To generate a custom credits page, you may want to use the - * flag parameter. + * flags parameter. *
**