From 73bececaa1f096d9d2362ecedf00de1c683bdde4 Mon Sep 17 00:00:00 2001
From: Stephen Reay
- * Optional suffix to omit from the base name returned.
- *
- * Name of an SplFileInfo derived class to use.
- *
- * Name of an SplFileInfo derived class to use.
- *
- * The mode for opening the file. See the fopen
- * documentation for descriptions of possible modes. The default
- * is read only.
- *
- *
- *
- * The class name to use when openFile() is called.
- *
- * The class name to use.
- *
+ * Optional suffix to omit from the base name returned.
+ *
+ * Name of an SplFileInfo derived class to use.
+ *
+ * Name of an SplFileInfo derived class to use.
+ *
+ * The mode for opening the file. See the fopen
+ * documentation for descriptions of possible modes. The default
+ * is read only.
+ *
+ *
+ *
+ * The class name to use when openFile() is called.
+ *
+ * The class name to use.
+ *
- * The zero-based numeric position to seek to.
- *
+ * The zero-based numeric position to seek to.
+ *
- * The handling flags to set.
- * See the FilesystemIterator constants.
- *
+ * The handling flags to set.
+ * See the FilesystemIterator constants.
+ *
- *
+ *
- * The number of bytes to read.
- *
- * The field delimiter (one character only). Defaults as a comma or the value set using SplFileObject::setCsvControl.
- *
- * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl.
- *
- * The escape character (one character only). Defaults as a backslash (\) or the value set using SplFileObject::setCsvControl.
- *
- * A blank line in a CSV file will be returned as an array - * comprising a single null field unless using SplFileObject::SKIP_EMPTY | SplFileObject::DROP_NEW_LINE, - * in which case empty lines are skipped. - */ - #[TentativeType] - #[LanguageLevelTypeAware(['8.1' => 'array|false'], default: 'array|false|null')] - public function fgetcsv( - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ",", - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = "\"", - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\" - ) {} - - /** - * Write a field array as a CSV line - * @link https://php.net/manual/en/splfileobject.fputcsv.php - * @param array $fields An array of values - * @param string $separator [optional]
- * The field delimiter (one character only). Defaults as a comma or the value set using SplFileObject::setCsvControl. - *
- * @param string $enclosure [optional]- * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl. - *
- * @param string $escape The optional escape parameter sets the escape character (one character only). - * @return int|false Returns the length of the written string or FALSE on failure. - * @since 5.4 - */ - #[TentativeType] - public function fputcsv( - array $fields, - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ',', - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = '"', - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\", - #[PhpStormStubsElementAvailable('8.1')] string $eol = PHP_EOL - ): int|false {} - - /** - * Set the delimiter and enclosure character for CSV - * @link https://php.net/manual/en/splfileobject.setcsvcontrol.php - * @param string $separator [optional]- * The field delimiter (one character only). - *
- * @param string $enclosure [optional]- * The field enclosure character (one character only). - *
- * @param string $escape [optional]- * The field escape character (one character only). - *
- * @return void - */ - #[TentativeType] - public function setCsvControl( - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ",", - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = "\"", - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\" - ): void {} - - /** - * Get the delimiter and enclosure character for CSV - * @link https://php.net/manual/en/splfileobject.getcsvcontrol.php - * @return array an indexed array containing the delimiter and enclosure character. - */ - #[TentativeType] - public function getCsvControl(): array {} - - /** - * Portable file locking - * @link https://php.net/manual/en/splfileobject.flock.php - * @param int $operation- * operation is one of the following: - * LOCK_SH to acquire a shared lock (reader). - *
- * @param int &$wouldBlock [optional]- * Set to 1 if the lock would block (EWOULDBLOCK errno condition). - *
- * @return bool true on success or false on failure. - */ - #[TentativeType] - public function flock(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $operation, &$wouldBlock = null): bool {} - - /** - * Flushes the output to the file - * @link https://php.net/manual/en/splfileobject.fflush.php - * @return bool true on success or false on failure. - */ - #[TentativeType] - public function fflush(): bool {} - - /** - * Return current file position - * @link https://php.net/manual/en/splfileobject.ftell.php - * @return int|false the position of the file pointer as an integer, or false on error. - */ - #[TentativeType] - public function ftell(): int|false {} - - /** - * Seek to a position - * @link https://php.net/manual/en/splfileobject.fseek.php - * @param int $offset- * The offset. A negative value can be used to move backwards through the file which - * is useful when SEEK_END is used as the whence value. - *
- * @param int $whence [optional]- * whence values are: - * SEEK_SET - Set position equal to offset bytes. - * SEEK_CUR - Set position to current location plus offset. - * SEEK_END - Set position to end-of-file plus offset. - *
- *- * If whence is not specified, it is assumed to be SEEK_SET. - *
- * @return int 0 if the seek was successful, -1 otherwise. Note that seeking - * past EOF is not considered an error. - */ - #[TentativeType] - public function fseek( - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $whence = SEEK_SET - ): int {} - - /** - * Gets character from file - * @link https://php.net/manual/en/splfileobject.fgetc.php - * @return string|false a string containing a single character read from the file or false on EOF. - */ - #[TentativeType] - public function fgetc(): string|false {} - - /** - * Output all remaining data on a file pointer - * @link https://php.net/manual/en/splfileobject.fpassthru.php - * @return int the number of characters read from handle - * and passed through to the output. - */ - #[TentativeType] - public function fpassthru(): int {} - - /** - * Gets line from file and strip HTML tags - * @link https://php.net/manual/en/splfileobject.fgetss.php - * @param string $allowable_tags [optional]- * You can use the optional third parameter to specify tags which should - * not be stripped. - *
- * @return string|false a string containing the next line of the file with HTML and PHP - * code stripped, or false on error. - * @removed 8.0 - */ - #[Deprecated(since: '7.3')] - public function fgetss($allowable_tags = null) {} - - /** - * Parses input from file according to a format - * @link https://php.net/manual/en/splfileobject.fscanf.php - * @param string $format- * The specified format as described in the sprintf documentation. - *
- * @param mixed &...$vars [optional]- * The optional assigned values. - *
- * @return array|int|null If only one parameter is passed to this method, the values parsed will be - * returned as an array. Otherwise, if optional parameters are passed, the - * function will return the number of assigned values. The optional - * parameters must be passed by reference. - */ - #[TentativeType] - public function fscanf( - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &...$vars - ): array|int|null {} - - /** - * Write to file - * @link https://php.net/manual/en/splfileobject.fwrite.php - * @param string $data- * The string to be written to the file. - *
- * @param int $length [optional]- * If the length argument is given, writing will - * stop after length bytes have been written or - * the end of string is reached, whichever comes - * first. - *
- * @return int|false the number of bytes written, or 0 (false since 7.4) on error. - */ - #[LanguageLevelTypeAware(['7.4' => 'int|false'], default: 'int')] - #[TentativeType] - public function fwrite( - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = 0 - ): int|false {} - - /** - * Gets information about the file - * @link https://php.net/manual/en/splfileobject.fstat.php - * @return array an array with the statistics of the file; the format of the array - * is described in detail on the stat manual page. - */ - #[TentativeType] - public function fstat(): array {} - - /** - * Truncates the file to a given length - * @link https://php.net/manual/en/splfileobject.ftruncate.php - * @param int $size- * The size to truncate to. - *
- *- * If size is larger than the file it is extended with null bytes. - *
- *- * If size is smaller than the file, the extra data will be lost. - *
- * @return bool true on success or false on failure. - */ - #[TentativeType] - public function ftruncate(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size): bool {} - - /** - * Retrieve current line of file - * @link https://php.net/manual/en/splfileobject.current.php - * @return string|array|false Retrieves the current line of the file. If the SplFileObject::READ_CSV flag is set, this method returns an array containing the current line parsed as CSV data. - */ - #[TentativeType] - public function current(): string|array|false {} - - /** - * Get line number - * @link https://php.net/manual/en/splfileobject.key.php - * @return int the current line number. - */ - #[TentativeType] - public function key(): int {} - - /** - * Read next line - * @link https://php.net/manual/en/splfileobject.next.php - * @return void - */ - #[TentativeType] - public function next(): void {} - - /** - * Sets flags for the SplFileObject - * @link https://php.net/manual/en/splfileobject.setflags.php - * @param int $flags- * Bit mask of the flags to set. See - * SplFileObject constants - * for the available flags. - *
- * @return void - */ - #[TentativeType] - public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {} - - /** - * Gets flags for the SplFileObject - * @link https://php.net/manual/en/splfileobject.getflags.php - * @return int an integer representing the flags. - */ - #[TentativeType] - public function getFlags(): int {} - - /** - * Set maximum line length - * @link https://php.net/manual/en/splfileobject.setmaxlinelen.php - * @param int $maxLength- * The maximum length of a line. - *
- * @return void - */ - #[TentativeType] - public function setMaxLineLen(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength): void {} - - /** - * Get maximum line length - * @link https://php.net/manual/en/splfileobject.getmaxlinelen.php - * @return int<0, max> the maximum line length if one has been set with - * SplFileObject::setMaxLineLen, default is 0. - */ - #[TentativeType] - public function getMaxLineLen(): int {} - - /** - * SplFileObject does not have children - * @link https://php.net/manual/en/splfileobject.haschildren.php - * @return bool false - * @since 5.1.2 - */ - #[TentativeType] - #[LanguageLevelTypeAware(['8.2' => 'false'], default: 'bool')] - public function hasChildren() {} - - /** - * No purpose - * @link https://php.net/manual/en/splfileobject.getchildren.php - * @return null|RecursiveIterator An SplFileObject does not have children so this method returns NULL. - */ - #[TentativeType] - #[LanguageLevelTypeAware(['8.2' => 'null'], default: 'null|RecursiveIterator')] - public function getChildren() {} - - /** - * Seek to specified line - * @link https://php.net/manual/en/splfileobject.seek.php - * @param int $line- * The zero-based line number to seek to. - *
- * @return void - */ - #[TentativeType] - public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $line): void {} - - /** - * Alias of SplFileObject::fgets - * @link https://php.net/manual/en/splfileobject.getcurrentline.php - * @return string Returns a string containing the next line from the file. - * @since 5.1.2 - */ - #[TentativeType] - public function getCurrentLine(): string {} - - /** - * Alias of SplFileObject::current - * @link https://php.net/manual/en/splfileobject.tostring.php - */ - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] - public function __toString() {} + /** + * Drop newlines at the end of a line. + */ + public const DROP_NEW_LINE = 1; + + /** + * Read on rewind/next. + */ + public const READ_AHEAD = 2; + + /** + * Skip empty lines in the file. This requires the {@see READ_AHEAD} flag to work as expected. + */ + public const SKIP_EMPTY = 4; + + /** + * Read lines as CSV rows. + */ + public const READ_CSV = 8; + + /** + * Construct a new file object. + * + * @link https://php.net/manual/en/splfileobject.construct.php + * + * @param string $filename The file to open + * @param string $mode [optional] The mode in which to open the file. See {@see fopen} for a list of allowed modes. + * @param bool $useIncludePath [optional] Whether to search in the include_path for filename + * @param resource $context [optional] A valid context resource created with {@see stream_context_create} + * + * @throws RuntimeException When the filename cannot be opened + * @throws LogicException When the filename is a directory + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mode = 'r', + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $useIncludePath = false, + $context = null + ) {} + + /** + * Rewind the file to the first line + * @link https://php.net/manual/en/splfileobject.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Reached end of file + * @link https://php.net/manual/en/splfileobject.eof.php + * @return bool true if file is at EOF, false otherwise. + */ + #[TentativeType] + public function eof(): bool {} + + /** + * Not at EOF + * @link https://php.net/manual/en/splfileobject.valid.php + * @return bool true if not reached EOF, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Gets line from file + * @link https://php.net/manual/en/splfileobject.fgets.php + * @return string a string containing the next line from the file. + */ + #[TentativeType] + public function fgets(): string {} + + /** + * Read from file + * @link https://php.net/manual/en/splfileobject.fread.php + * @param int $length+ * The number of bytes to read. + *
+ * @return string|false returns the string read from the file or FALSE on failure. + * @since 5.5.11 + */ + #[TentativeType] + public function fread(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length): string|false {} + + /** + * Gets line from file and parse as CSV fields + * @link https://php.net/manual/en/splfileobject.fgetcsv.php + * @param string $separator [optional]+ * The field delimiter (one character only). Defaults as a comma or the value set using SplFileObject::setCsvControl. + *
+ * @param string $enclosure [optional]+ * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl. + *
+ * @param string $escape [optional]+ * The escape character (one character only). Defaults as a backslash (\) or the value set using SplFileObject::setCsvControl. + *
+ * @return array|false|null an indexed array containing the fields read, or false on error. + * + *+ * A blank line in a CSV file will be returned as an array + * comprising a single null field unless using SplFileObject::SKIP_EMPTY | SplFileObject::DROP_NEW_LINE, + * in which case empty lines are skipped. + */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.1' => 'array|false'], default: 'array|false|null')] + public function fgetcsv( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ",", + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = "\"", + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\" + ) {} + + /** + * Write a field array as a CSV line + * @link https://php.net/manual/en/splfileobject.fputcsv.php + * @param array $fields An array of values + * @param string $separator [optional]
+ * The field delimiter (one character only). Defaults as a comma or the value set using SplFileObject::setCsvControl. + *
+ * @param string $enclosure [optional]+ * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl. + *
+ * @param string $escape The optional escape parameter sets the escape character (one character only). + * @return int|false Returns the length of the written string or FALSE on failure. + * @since 5.4 + */ + #[TentativeType] + public function fputcsv( + array $fields, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ',', + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = '"', + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\", + #[PhpStormStubsElementAvailable('8.1')] string $eol = PHP_EOL + ): int|false {} + + /** + * Set the delimiter and enclosure character for CSV + * @link https://php.net/manual/en/splfileobject.setcsvcontrol.php + * @param string $separator [optional]+ * The field delimiter (one character only). + *
+ * @param string $enclosure [optional]+ * The field enclosure character (one character only). + *
+ * @param string $escape [optional]+ * The field escape character (one character only). + *
+ * @return void + */ + #[TentativeType] + public function setCsvControl( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ",", + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = "\"", + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\" + ): void {} + + /** + * Get the delimiter and enclosure character for CSV + * @link https://php.net/manual/en/splfileobject.getcsvcontrol.php + * @return array an indexed array containing the delimiter and enclosure character. + */ + #[TentativeType] + public function getCsvControl(): array {} + + /** + * Portable file locking + * @link https://php.net/manual/en/splfileobject.flock.php + * @param int $operation+ * operation is one of the following: + * LOCK_SH to acquire a shared lock (reader). + *
+ * @param int &$wouldBlock [optional]+ * Set to 1 if the lock would block (EWOULDBLOCK errno condition). + *
+ * @return bool true on success or false on failure. + */ + #[TentativeType] + public function flock(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $operation, &$wouldBlock = null): bool {} + + /** + * Flushes the output to the file + * @link https://php.net/manual/en/splfileobject.fflush.php + * @return bool true on success or false on failure. + */ + #[TentativeType] + public function fflush(): bool {} + + /** + * Return current file position + * @link https://php.net/manual/en/splfileobject.ftell.php + * @return int|false the position of the file pointer as an integer, or false on error. + */ + #[TentativeType] + public function ftell(): int|false {} + + /** + * Seek to a position + * @link https://php.net/manual/en/splfileobject.fseek.php + * @param int $offset+ * The offset. A negative value can be used to move backwards through the file which + * is useful when SEEK_END is used as the whence value. + *
+ * @param int $whence [optional]+ * whence values are: + * SEEK_SET - Set position equal to offset bytes. + * SEEK_CUR - Set position to current location plus offset. + * SEEK_END - Set position to end-of-file plus offset. + *
+ *+ * If whence is not specified, it is assumed to be SEEK_SET. + *
+ * @return int 0 if the seek was successful, -1 otherwise. Note that seeking + * past EOF is not considered an error. + */ + #[TentativeType] + public function fseek( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $whence = SEEK_SET + ): int {} + + /** + * Gets character from file + * @link https://php.net/manual/en/splfileobject.fgetc.php + * @return string|false a string containing a single character read from the file or false on EOF. + */ + #[TentativeType] + public function fgetc(): string|false {} + + /** + * Output all remaining data on a file pointer + * @link https://php.net/manual/en/splfileobject.fpassthru.php + * @return int the number of characters read from handle + * and passed through to the output. + */ + #[TentativeType] + public function fpassthru(): int {} + + /** + * Gets line from file and strip HTML tags + * @link https://php.net/manual/en/splfileobject.fgetss.php + * @param string $allowable_tags [optional]+ * You can use the optional third parameter to specify tags which should + * not be stripped. + *
+ * @return string|false a string containing the next line of the file with HTML and PHP + * code stripped, or false on error. + * @removed 8.0 + */ + #[Deprecated(since: '7.3')] + public function fgetss($allowable_tags = null) {} + + /** + * Parses input from file according to a format + * @link https://php.net/manual/en/splfileobject.fscanf.php + * @param string $format+ * The specified format as described in the sprintf documentation. + *
+ * @param mixed &...$vars [optional]+ * The optional assigned values. + *
+ * @return array|int|null If only one parameter is passed to this method, the values parsed will be + * returned as an array. Otherwise, if optional parameters are passed, the + * function will return the number of assigned values. The optional + * parameters must be passed by reference. + */ + #[TentativeType] + public function fscanf( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &...$vars + ): array|int|null {} + + /** + * Write to file + * @link https://php.net/manual/en/splfileobject.fwrite.php + * @param string $data+ * The string to be written to the file. + *
+ * @param int $length [optional]+ * If the length argument is given, writing will + * stop after length bytes have been written or + * the end of string is reached, whichever comes + * first. + *
+ * @return int|false the number of bytes written, or 0 (false since 7.4) on error. + */ + #[LanguageLevelTypeAware(['7.4' => 'int|false'], default: 'int')] + #[TentativeType] + public function fwrite( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = 0 + ): int|false {} + + /** + * Gets information about the file + * @link https://php.net/manual/en/splfileobject.fstat.php + * @return array an array with the statistics of the file; the format of the array + * is described in detail on the stat manual page. + */ + #[TentativeType] + public function fstat(): array {} + + /** + * Truncates the file to a given length + * @link https://php.net/manual/en/splfileobject.ftruncate.php + * @param int $size+ * The size to truncate to. + *
+ *+ * If size is larger than the file it is extended with null bytes. + *
+ *+ * If size is smaller than the file, the extra data will be lost. + *
+ * @return bool true on success or false on failure. + */ + #[TentativeType] + public function ftruncate(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size): bool {} + + /** + * Retrieve current line of file + * @link https://php.net/manual/en/splfileobject.current.php + * @return string|array|false Retrieves the current line of the file. If the SplFileObject::READ_CSV flag is set, this method returns an array containing the current line parsed as CSV data. + */ + #[TentativeType] + public function current(): string|array|false {} + + /** + * Get line number + * @link https://php.net/manual/en/splfileobject.key.php + * @return int the current line number. + */ + #[TentativeType] + public function key(): int {} + + /** + * Read next line + * @link https://php.net/manual/en/splfileobject.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Sets flags for the SplFileObject + * @link https://php.net/manual/en/splfileobject.setflags.php + * @param int $flags+ * Bit mask of the flags to set. See + * SplFileObject constants + * for the available flags. + *
+ * @return void + */ + #[TentativeType] + public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {} + + /** + * Gets flags for the SplFileObject + * @link https://php.net/manual/en/splfileobject.getflags.php + * @return int an integer representing the flags. + */ + #[TentativeType] + public function getFlags(): int {} + + /** + * Set maximum line length + * @link https://php.net/manual/en/splfileobject.setmaxlinelen.php + * @param int $maxLength+ * The maximum length of a line. + *
+ * @return void + */ + #[TentativeType] + public function setMaxLineLen(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength): void {} + + /** + * Get maximum line length + * @link https://php.net/manual/en/splfileobject.getmaxlinelen.php + * @return int<0, max> the maximum line length if one has been set with + * SplFileObject::setMaxLineLen, default is 0. + */ + #[TentativeType] + public function getMaxLineLen(): int {} + + /** + * SplFileObject does not have children + * @link https://php.net/manual/en/splfileobject.haschildren.php + * @return bool false + * @since 5.1.2 + */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.2' => 'false'], default: 'bool')] + public function hasChildren() {} + + /** + * No purpose + * @link https://php.net/manual/en/splfileobject.getchildren.php + * @return null|RecursiveIterator An SplFileObject does not have children so this method returns NULL. + */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.2' => 'null'], default: 'null|RecursiveIterator')] + public function getChildren() {} + + /** + * Seek to specified line + * @link https://php.net/manual/en/splfileobject.seek.php + * @param int $line+ * The zero-based line number to seek to. + *
+ * @return void + */ + #[TentativeType] + public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $line): void {} + + /** + * Alias of SplFileObject::fgets + * @link https://php.net/manual/en/splfileobject.getcurrentline.php + * @return string Returns a string containing the next line from the file. + * @since 5.1.2 + */ + #[TentativeType] + public function getCurrentLine(): string {} + + /** + * Alias of SplFileObject::current + * @link https://php.net/manual/en/splfileobject.tostring.php + */ + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] + public function __toString() {} } /** @@ -1036,14 +1055,14 @@ public function __toString() {} */ class SplTempFileObject extends SplFileObject { - /** - * Construct a new temporary file object - * @link https://php.net/manual/en/spltempfileobject.construct.php - * @param int $maxMemory [optional] - * @throws RuntimeException if an error occurs. - * @since 5.1.2 - */ - public function __construct(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxMemory = 2097152) {} + /** + * Construct a new temporary file object + * @link https://php.net/manual/en/spltempfileobject.construct.php + * @param int $maxMemory [optional] + * @throws RuntimeException if an error occurs. + * @since 5.1.2 + */ + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxMemory = 2097152) {} } /** @@ -1055,250 +1074,250 @@ public function __construct(#[LanguageLevelTypeAware(['8.0' => 'int'], default: */ class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess, Serializable { - public const IT_MODE_LIFO = 2; - public const IT_MODE_FIFO = 0; - public const IT_MODE_DELETE = 1; - public const IT_MODE_KEEP = 0; - - /** - * Add/insert a new value at the specified index - * @param mixed $index The index where the new value is to be inserted. - * @param TValue $value The new value for the index. - * @return void - * @link https://php.net/spldoublylinkedlist.add - * @since 5.5 - */ - #[TentativeType] - public function add( - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value - ): void {} - - /** - * Pops a node from the end of the doubly linked list - * @link https://php.net/manual/en/spldoublylinkedlist.pop.php - * @return TValue The value of the popped node. - */ - #[TentativeType] - public function pop(): mixed {} - - /** - * Shifts a node from the beginning of the doubly linked list - * @link https://php.net/manual/en/spldoublylinkedlist.shift.php - * @return TValue The value of the shifted node. - */ - #[TentativeType] - public function shift(): mixed {} - - /** - * Pushes an element at the end of the doubly linked list - * @link https://php.net/manual/en/spldoublylinkedlist.push.php - * @param TValue $value- * The value to push. - *
- * @return void - */ - #[TentativeType] - public function push(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} - - /** - * Prepends the doubly linked list with an element - * @link https://php.net/manual/en/spldoublylinkedlist.unshift.php - * @param TValue $value- * The value to unshift. - *
- * @return void - */ - #[TentativeType] - public function unshift(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} - - /** - * Peeks at the node from the end of the doubly linked list - * @link https://php.net/manual/en/spldoublylinkedlist.top.php - * @return TValue The value of the last node. - */ - #[TentativeType] - public function top(): mixed {} - - /** - * Peeks at the node from the beginning of the doubly linked list - * @link https://php.net/manual/en/spldoublylinkedlist.bottom.php - * @return TValue The value of the first node. - */ - #[TentativeType] - public function bottom(): mixed {} - - /** - * Counts the number of elements in the doubly linked list. - * @link https://php.net/manual/en/spldoublylinkedlist.count.php - * @return int the number of elements in the doubly linked list. - */ - #[TentativeType] - public function count(): int {} - - /** - * Checks whether the doubly linked list is empty. - * @link https://php.net/manual/en/spldoublylinkedlist.isempty.php - * @return bool whether the doubly linked list is empty. - */ - #[TentativeType] - public function isEmpty(): bool {} - - /** - * Sets the mode of iteration - * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php - * @param int $mode- * There are two orthogonal sets of modes that can be set: - *
- * The direction of the iteration (either one or the other): - * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) - * @return int - */ - #[TentativeType] - public function setIteratorMode(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode): int {} - - /** - * Returns the mode of iteration - * @link https://php.net/manual/en/spldoublylinkedlist.getiteratormode.php - * @return int the different modes and flags that affect the iteration. - */ - #[TentativeType] - public function getIteratorMode(): int {} - - /** - * Returns whether the requested $index exists - * @link https://php.net/manual/en/spldoublylinkedlist.offsetexists.php - * @param mixed $index- * The index being checked. - *
- * @return bool true if the requested index exists, otherwise false - */ - #[TentativeType] - public function offsetExists($index): bool {} - - /** - * Returns the value at the specified $index - * @link https://php.net/manual/en/spldoublylinkedlist.offsetget.php - * @param mixed $index- * The index with the value. - *
- * @return TValue The value at the specified index. - */ - #[TentativeType] - public function offsetGet($index): mixed {} - - /** - * Sets the value at the specified $index to $newval - * @link https://php.net/manual/en/spldoublylinkedlist.offsetset.php - * @param mixed $index- * The index being set. - *
- * @param TValue $value- * The new value for the index. - *
- * @return void - */ - #[TentativeType] - public function offsetSet($index, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} - - /** - * Unsets the value at the specified $index - * @link https://php.net/manual/en/spldoublylinkedlist.offsetunset.php - * @param mixed $index- * The index being unset. - *
- * @return void - */ - #[TentativeType] - public function offsetUnset($index): void {} - - /** - * Rewind iterator back to the start - * @link https://php.net/manual/en/spldoublylinkedlist.rewind.php - * @return void - */ - #[TentativeType] - public function rewind(): void {} - - /** - * Return current array entry - * @link https://php.net/manual/en/spldoublylinkedlist.current.php - * @return TValue The current node value. - */ - #[TentativeType] - public function current(): mixed {} - - /** - * Return current node index - * @link https://php.net/manual/en/spldoublylinkedlist.key.php - * @return string|float|int|bool|null The current node index. - */ - #[TentativeType] - public function key(): int {} - - /** - * Move to next entry - * @link https://php.net/manual/en/spldoublylinkedlist.next.php - * @return void - */ - #[TentativeType] - public function next(): void {} - - /** - * Move to previous entry - * @link https://php.net/manual/en/spldoublylinkedlist.prev.php - * @return void - */ - #[TentativeType] - public function prev(): void {} - - /** - * Check whether the doubly linked list contains more nodes - * @link https://php.net/manual/en/spldoublylinkedlist.valid.php - * @return bool true if the doubly linked list contains any more nodes, false otherwise. - */ - #[TentativeType] - public function valid(): bool {} - - /** - * Unserializes the storage - * @link https://php.net/manual/en/spldoublylinkedlist.serialize.php - * @param string $data The serialized string. - * @return void - * @since 5.4 - */ - #[TentativeType] - public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {} - - /** - * Serializes the storage - * @link https://php.net/manual/en/spldoublylinkedlist.unserialize.php - * @return string The serialized string. - * @since 5.4 - */ - #[TentativeType] - public function serialize(): string {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __debugInfo(): array {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __serialize(): array {} - - /** - * @param array $data - * @since 7.4 - */ - #[TentativeType] - public function __unserialize(array $data): void {} + public const IT_MODE_LIFO = 2; + public const IT_MODE_FIFO = 0; + public const IT_MODE_DELETE = 1; + public const IT_MODE_KEEP = 0; + + /** + * Add/insert a new value at the specified index + * @param mixed $index The index where the new value is to be inserted. + * @param TValue $value The new value for the index. + * @return void + * @link https://php.net/spldoublylinkedlist.add + * @since 5.5 + */ + #[TentativeType] + public function add( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value + ): void {} + + /** + * Pops a node from the end of the doubly linked list + * @link https://php.net/manual/en/spldoublylinkedlist.pop.php + * @return TValue The value of the popped node. + */ + #[TentativeType] + public function pop(): mixed {} + + /** + * Shifts a node from the beginning of the doubly linked list + * @link https://php.net/manual/en/spldoublylinkedlist.shift.php + * @return TValue The value of the shifted node. + */ + #[TentativeType] + public function shift(): mixed {} + + /** + * Pushes an element at the end of the doubly linked list + * @link https://php.net/manual/en/spldoublylinkedlist.push.php + * @param TValue $value+ * The value to push. + *
+ * @return void + */ + #[TentativeType] + public function push(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Prepends the doubly linked list with an element + * @link https://php.net/manual/en/spldoublylinkedlist.unshift.php + * @param TValue $value+ * The value to unshift. + *
+ * @return void + */ + #[TentativeType] + public function unshift(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Peeks at the node from the end of the doubly linked list + * @link https://php.net/manual/en/spldoublylinkedlist.top.php + * @return TValue The value of the last node. + */ + #[TentativeType] + public function top(): mixed {} + + /** + * Peeks at the node from the beginning of the doubly linked list + * @link https://php.net/manual/en/spldoublylinkedlist.bottom.php + * @return TValue The value of the first node. + */ + #[TentativeType] + public function bottom(): mixed {} + + /** + * Counts the number of elements in the doubly linked list. + * @link https://php.net/manual/en/spldoublylinkedlist.count.php + * @return int the number of elements in the doubly linked list. + */ + #[TentativeType] + public function count(): int {} + + /** + * Checks whether the doubly linked list is empty. + * @link https://php.net/manual/en/spldoublylinkedlist.isempty.php + * @return bool whether the doubly linked list is empty. + */ + #[TentativeType] + public function isEmpty(): bool {} + + /** + * Sets the mode of iteration + * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php + * @param int $mode+ * There are two orthogonal sets of modes that can be set: + *
+ * The direction of the iteration (either one or the other): + * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) + * @return int + */ + #[TentativeType] + public function setIteratorMode(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode): int {} + + /** + * Returns the mode of iteration + * @link https://php.net/manual/en/spldoublylinkedlist.getiteratormode.php + * @return int the different modes and flags that affect the iteration. + */ + #[TentativeType] + public function getIteratorMode(): int {} + + /** + * Returns whether the requested $index exists + * @link https://php.net/manual/en/spldoublylinkedlist.offsetexists.php + * @param mixed $index+ * The index being checked. + *
+ * @return bool true if the requested index exists, otherwise false + */ + #[TentativeType] + public function offsetExists($index): bool {} + + /** + * Returns the value at the specified $index + * @link https://php.net/manual/en/spldoublylinkedlist.offsetget.php + * @param mixed $index+ * The index with the value. + *
+ * @return TValue The value at the specified index. + */ + #[TentativeType] + public function offsetGet($index): mixed {} + + /** + * Sets the value at the specified $index to $newval + * @link https://php.net/manual/en/spldoublylinkedlist.offsetset.php + * @param mixed $index+ * The index being set. + *
+ * @param TValue $value+ * The new value for the index. + *
+ * @return void + */ + #[TentativeType] + public function offsetSet($index, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Unsets the value at the specified $index + * @link https://php.net/manual/en/spldoublylinkedlist.offsetunset.php + * @param mixed $index+ * The index being unset. + *
+ * @return void + */ + #[TentativeType] + public function offsetUnset($index): void {} + + /** + * Rewind iterator back to the start + * @link https://php.net/manual/en/spldoublylinkedlist.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Return current array entry + * @link https://php.net/manual/en/spldoublylinkedlist.current.php + * @return TValue The current node value. + */ + #[TentativeType] + public function current(): mixed {} + + /** + * Return current node index + * @link https://php.net/manual/en/spldoublylinkedlist.key.php + * @return string|float|int|bool|null The current node index. + */ + #[TentativeType] + public function key(): int {} + + /** + * Move to next entry + * @link https://php.net/manual/en/spldoublylinkedlist.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Move to previous entry + * @link https://php.net/manual/en/spldoublylinkedlist.prev.php + * @return void + */ + #[TentativeType] + public function prev(): void {} + + /** + * Check whether the doubly linked list contains more nodes + * @link https://php.net/manual/en/spldoublylinkedlist.valid.php + * @return bool true if the doubly linked list contains any more nodes, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Unserializes the storage + * @link https://php.net/manual/en/spldoublylinkedlist.serialize.php + * @param string $data The serialized string. + * @return void + * @since 5.4 + */ + #[TentativeType] + public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {} + + /** + * Serializes the storage + * @link https://php.net/manual/en/spldoublylinkedlist.unserialize.php + * @return string The serialized string. + * @since 5.4 + */ + #[TentativeType] + public function serialize(): string {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __serialize(): array {} + + /** + * @param array $data + * @since 7.4 + */ + #[TentativeType] + public function __unserialize(array $data): void {} } /** @@ -1308,36 +1327,36 @@ public function __unserialize(array $data): void {} */ class SplQueue extends SplDoublyLinkedList { - /** - * Adds an element to the queue. - * @link https://php.net/manual/en/splqueue.enqueue.php - * @param TValue $value- * The value to enqueue. - *
- * @return void - */ - #[TentativeType] - public function enqueue(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} - - /** - * Dequeues a node from the queue - * @link https://php.net/manual/en/splqueue.dequeue.php - * @return TValue The value of the dequeued node. - */ - #[TentativeType] - public function dequeue(): mixed {} - - /** - * Sets the mode of iteration - * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php - * @param int $mode- * There are two orthogonal sets of modes that can be set: - *
- * The direction of the iteration (either one or the other): - * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) - * @return void - */ - public function setIteratorMode($mode) {} + /** + * Adds an element to the queue. + * @link https://php.net/manual/en/splqueue.enqueue.php + * @param TValue $value+ * The value to enqueue. + *
+ * @return void + */ + #[TentativeType] + public function enqueue(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Dequeues a node from the queue + * @link https://php.net/manual/en/splqueue.dequeue.php + * @return TValue The value of the dequeued node. + */ + #[TentativeType] + public function dequeue(): mixed {} + + /** + * Sets the mode of iteration + * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php + * @param int $mode+ * There are two orthogonal sets of modes that can be set: + *
+ * The direction of the iteration (either one or the other): + * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) + * @return void + */ + public function setIteratorMode($mode) {} } /** @@ -1348,17 +1367,17 @@ public function setIteratorMode($mode) {} */ class SplStack extends SplDoublyLinkedList { - /** - * Sets the mode of iteration - * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php - * @param int $mode- * There are two orthogonal sets of modes that can be set: - *
- * The direction of the iteration (either one or the other): - * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) - * @return void - */ - public function setIteratorMode($mode) {} + /** + * Sets the mode of iteration + * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php + * @param int $mode+ * There are two orthogonal sets of modes that can be set: + *
+ * The direction of the iteration (either one or the other): + * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) + * @return void + */ + public function setIteratorMode($mode) {} } /** @@ -1369,125 +1388,125 @@ public function setIteratorMode($mode) {} */ abstract class SplHeap implements Iterator, Countable { - /** - * Extracts a node from top of the heap and sift up. - * @link https://php.net/manual/en/splheap.extract.php - * @return TValue The value of the extracted node. - */ - #[TentativeType] - public function extract(): mixed {} - - /** - * Inserts an element in the heap by sifting it up. - * @link https://php.net/manual/en/splheap.insert.php - * @param TValue $value- * The value to insert. - *
- * @return bool - */ - #[TentativeType] - public function insert(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): bool {} - - /** - * Peeks at the node from the top of the heap - * @link https://php.net/manual/en/splheap.top.php - * @return TValue The value of the node on the top. - */ - #[TentativeType] - public function top(): mixed {} - - /** - * Counts the number of elements in the heap. - * @link https://php.net/manual/en/splheap.count.php - * @return int the number of elements in the heap. - */ - #[TentativeType] - public function count(): int {} - - /** - * Checks whether the heap is empty. - * @link https://php.net/manual/en/splheap.isempty.php - * @return bool whether the heap is empty. - */ - #[TentativeType] - public function isEmpty(): bool {} - - /** - * Rewind iterator back to the start (no-op) - * @link https://php.net/manual/en/splheap.rewind.php - * @return void - */ - #[TentativeType] - public function rewind(): void {} - - /** - * Return current node pointed by the iterator - * @link https://php.net/manual/en/splheap.current.php - * @return TValue The current node value. - */ - #[TentativeType] - public function current(): mixed {} - - /** - * Return current node index - * @link https://php.net/manual/en/splheap.key.php - * @return int The current node index. - */ - #[TentativeType] - public function key(): int {} - - /** - * Move to the next node - * @link https://php.net/manual/en/splheap.next.php - * @return void - */ - #[TentativeType] - public function next(): void {} - - /** - * Check whether the heap contains more nodes - * @link https://php.net/manual/en/splheap.valid.php - * @return bool true if the heap contains any more nodes, false otherwise. - */ - #[TentativeType] - public function valid(): bool {} - - /** - * Recover from the corrupted state and allow further actions on the heap. - * @link https://php.net/manual/en/splheap.recoverfromcorruption.php - * @return bool - */ - #[TentativeType] - public function recoverFromCorruption(): bool {} - - /** - * Compare elements in order to place them correctly in the heap while sifting up. - * @link https://php.net/manual/en/splheap.compare.php - * @param mixed $value1- * The value of the first node being compared. - *
- * @param mixed $value2- * The value of the second node being compared. - *
- * @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. - */ - abstract protected function compare($value1, $value2); - - /** - * @return bool - */ - #[TentativeType] - public function isCorrupted(): bool {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __debugInfo(): array {} + /** + * Extracts a node from top of the heap and sift up. + * @link https://php.net/manual/en/splheap.extract.php + * @return TValue The value of the extracted node. + */ + #[TentativeType] + public function extract(): mixed {} + + /** + * Inserts an element in the heap by sifting it up. + * @link https://php.net/manual/en/splheap.insert.php + * @param TValue $value
+ * The value to insert. + *
+ * @return bool + */ + #[TentativeType] + public function insert(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): bool {} + + /** + * Peeks at the node from the top of the heap + * @link https://php.net/manual/en/splheap.top.php + * @return TValue The value of the node on the top. + */ + #[TentativeType] + public function top(): mixed {} + + /** + * Counts the number of elements in the heap. + * @link https://php.net/manual/en/splheap.count.php + * @return int the number of elements in the heap. + */ + #[TentativeType] + public function count(): int {} + + /** + * Checks whether the heap is empty. + * @link https://php.net/manual/en/splheap.isempty.php + * @return bool whether the heap is empty. + */ + #[TentativeType] + public function isEmpty(): bool {} + + /** + * Rewind iterator back to the start (no-op) + * @link https://php.net/manual/en/splheap.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Return current node pointed by the iterator + * @link https://php.net/manual/en/splheap.current.php + * @return TValue The current node value. + */ + #[TentativeType] + public function current(): mixed {} + + /** + * Return current node index + * @link https://php.net/manual/en/splheap.key.php + * @return int The current node index. + */ + #[TentativeType] + public function key(): int {} + + /** + * Move to the next node + * @link https://php.net/manual/en/splheap.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Check whether the heap contains more nodes + * @link https://php.net/manual/en/splheap.valid.php + * @return bool true if the heap contains any more nodes, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Recover from the corrupted state and allow further actions on the heap. + * @link https://php.net/manual/en/splheap.recoverfromcorruption.php + * @return bool + */ + #[TentativeType] + public function recoverFromCorruption(): bool {} + + /** + * Compare elements in order to place them correctly in the heap while sifting up. + * @link https://php.net/manual/en/splheap.compare.php + * @param mixed $value1+ * The value of the first node being compared. + *
+ * @param mixed $value2+ * The value of the second node being compared. + *
+ * @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. + */ + abstract protected function compare($value1, $value2); + + /** + * @return bool + */ + #[TentativeType] + public function isCorrupted(): bool {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} } /** @@ -1498,105 +1517,105 @@ public function __debugInfo(): array {} */ class SplMinHeap extends SplHeap { - /** - * Compare elements in order to place them correctly in the heap while sifting up. - * @link https://php.net/manual/en/splminheap.compare.php - * @param TValue $value1
- * The value of the first node being compared. - *
- * @param TValue $value2- * The value of the second node being compared. - *
- * @return int Result of the comparison, positive integer if value1 is lower 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. - */ - #[TentativeType] - protected function compare( - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value1, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value2 - ): int {} - - /** - * Extracts a node from top of the heap and sift up. - * @link https://php.net/manual/en/splheap.extract.php - * @return TValue The value of the extracted node. - */ - public function extract() {} - - /** - * Inserts an element in the heap by sifting it up. - * @link https://php.net/manual/en/splheap.insert.php - * @param TValue $value
- * The value to insert. - *
- * @return true - */ - public function insert($value) {} - - /** - * Peeks at the node from the top of the heap - * @link https://php.net/manual/en/splheap.top.php - * @return TValue The value of the node on the top. - */ - public function top() {} - - /** - * Counts the number of elements in the heap. - * @link https://php.net/manual/en/splheap.count.php - * @return int the number of elements in the heap. - */ - public function count() {} - - /** - * Checks whether the heap is empty. - * @link https://php.net/manual/en/splheap.isempty.php - * @return bool whether the heap is empty. - */ - public function isEmpty() {} - - /** - * Rewind iterator back to the start (no-op) - * @link https://php.net/manual/en/splheap.rewind.php - * @return void - */ - public function rewind() {} - - /** - * Return current node pointed by the iterator - * @link https://php.net/manual/en/splheap.current.php - * @return TValue The current node value. - */ - public function current() {} - - /** - * Return current node index - * @link https://php.net/manual/en/splheap.key.php - * @return int The current node index. - */ - public function key() {} - - /** - * Move to the next node - * @link https://php.net/manual/en/splheap.next.php - * @return void - */ - public function next() {} - - /** - * Check whether the heap contains more nodes - * @link https://php.net/manual/en/splheap.valid.php - * @return bool true if the heap contains any more nodes, false otherwise. - */ - public function valid() {} - - /** - * Recover from the corrupted state and allow further actions on the heap. - * @link https://php.net/manual/en/splheap.recoverfromcorruption.php - * @return void - */ - public function recoverFromCorruption() {} + /** + * Compare elements in order to place them correctly in the heap while sifting up. + * @link https://php.net/manual/en/splminheap.compare.php + * @param TValue $value1+ * The value of the first node being compared. + *
+ * @param TValue $value2+ * The value of the second node being compared. + *
+ * @return int Result of the comparison, positive integer if value1 is lower 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. + */ + #[TentativeType] + protected function compare( + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value1, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value2 + ): int {} + + /** + * Extracts a node from top of the heap and sift up. + * @link https://php.net/manual/en/splheap.extract.php + * @return TValue The value of the extracted node. + */ + public function extract() {} + + /** + * Inserts an element in the heap by sifting it up. + * @link https://php.net/manual/en/splheap.insert.php + * @param TValue $value
+ * The value to insert. + *
+ * @return true + */ + public function insert($value) {} + + /** + * Peeks at the node from the top of the heap + * @link https://php.net/manual/en/splheap.top.php + * @return TValue The value of the node on the top. + */ + public function top() {} + + /** + * Counts the number of elements in the heap. + * @link https://php.net/manual/en/splheap.count.php + * @return int the number of elements in the heap. + */ + public function count() {} + + /** + * Checks whether the heap is empty. + * @link https://php.net/manual/en/splheap.isempty.php + * @return bool whether the heap is empty. + */ + public function isEmpty() {} + + /** + * Rewind iterator back to the start (no-op) + * @link https://php.net/manual/en/splheap.rewind.php + * @return void + */ + public function rewind() {} + + /** + * Return current node pointed by the iterator + * @link https://php.net/manual/en/splheap.current.php + * @return TValue The current node value. + */ + public function current() {} + + /** + * Return current node index + * @link https://php.net/manual/en/splheap.key.php + * @return int The current node index. + */ + public function key() {} + + /** + * Move to the next node + * @link https://php.net/manual/en/splheap.next.php + * @return void + */ + public function next() {} + + /** + * Check whether the heap contains more nodes + * @link https://php.net/manual/en/splheap.valid.php + * @return bool true if the heap contains any more nodes, false otherwise. + */ + public function valid() {} + + /** + * Recover from the corrupted state and allow further actions on the heap. + * @link https://php.net/manual/en/splheap.recoverfromcorruption.php + * @return void + */ + public function recoverFromCorruption() {} } /** @@ -1607,25 +1626,25 @@ public function recoverFromCorruption() {} */ class SplMaxHeap extends SplHeap { - /** - * Compare elements in order to place them correctly in the heap while sifting up. - * @link https://php.net/manual/en/splmaxheap.compare.php - * @param TValue $value1- * The value of the first node being compared. - *
- * @param TValue $value2- * The value of the second node being compared. - *
- * @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. - */ - #[TentativeType] - protected function compare( - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value1, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value2 - ): int {} + /** + * Compare elements in order to place them correctly in the heap while sifting up. + * @link https://php.net/manual/en/splmaxheap.compare.php + * @param TValue $value1
+ * The value of the first node being compared. + *
+ * @param TValue $value2+ * The value of the second node being compared. + *
+ * @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. + */ + #[TentativeType] + protected function compare( + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value1, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value2 + ): int {} } /** @@ -1638,157 +1657,157 @@ protected function compare( */ class SplPriorityQueue implements Iterator, Countable { - public const EXTR_BOTH = 3; - public const EXTR_PRIORITY = 2; - public const EXTR_DATA = 1; - - /** - * Compare priorities in order to place elements correctly in the heap while sifting up. - * @link https://php.net/manual/en/splpriorityqueue.compare.php - * @param TPriority $priority1
- * The priority of the first node being compared. - *
- * @param TPriority $priority2- * The priority of the second node being compared. - *
- * @return int Result of the comparison, positive integer if priority1 is greater than priority2, 0 if they are equal, negative integer otherwise. - * - *- * Multiple elements with the same priority will get dequeued in no particular order. - */ - #[TentativeType] - public function compare( - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority1, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority2 - ): int {} - - /** - * Inserts an element in the queue by sifting it up. - * @link https://php.net/manual/en/splpriorityqueue.insert.php - * @param TValue $value
- * The value to insert. - *
- * @param TPriority $priority- * The associated priority. - *
- * @return true - */ - public function insert( - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority - ) {} - - /** - * Sets the mode of extraction - * @link https://php.net/manual/en/splpriorityqueue.setextractflags.php - * @param int $flags- * Defines what is extracted by SplPriorityQueue::current, - * SplPriorityQueue::top and - * SplPriorityQueue::extract. - *
- * SplPriorityQueue::EXTR_DATA (0x00000001): Extract the data - * @return int - */ - #[TentativeType] - public function setExtractFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): int {} - - /** - * Peeks at the node from the top of the queue - * @link https://php.net/manual/en/splpriorityqueue.top.php - * @return TValue The value or priority (or both) of the top node, depending on the extract flag. - */ - #[TentativeType] - public function top(): mixed {} - - /** - * Extracts a node from top of the heap and sift up. - * @link https://php.net/manual/en/splpriorityqueue.extract.php - * @return TValue The value or priority (or both) of the extracted node, depending on the extract flag. - */ - #[TentativeType] - public function extract(): mixed {} - - /** - * Counts the number of elements in the queue. - * @link https://php.net/manual/en/splpriorityqueue.count.php - * @return int the number of elements in the queue. - */ - #[TentativeType] - public function count(): int {} - - /** - * Checks whether the queue is empty. - * @link https://php.net/manual/en/splpriorityqueue.isempty.php - * @return bool whether the queue is empty. - */ - #[TentativeType] - public function isEmpty(): bool {} - - /** - * Rewind iterator back to the start (no-op) - * @link https://php.net/manual/en/splpriorityqueue.rewind.php - * @return void - */ - #[TentativeType] - public function rewind(): void {} - - /** - * Return current node pointed by the iterator - * @link https://php.net/manual/en/splpriorityqueue.current.php - * @return TValue The value or priority (or both) of the current node, depending on the extract flag. - */ - #[TentativeType] - public function current(): mixed {} - - /** - * Return current node index - * @link https://php.net/manual/en/splpriorityqueue.key.php - * @return int The current node index. - */ - #[TentativeType] - public function key(): int {} - - /** - * Move to the next node - * @link https://php.net/manual/en/splpriorityqueue.next.php - * @return void - */ - #[TentativeType] - public function next(): void {} - - /** - * Check whether the queue contains more nodes - * @link https://php.net/manual/en/splpriorityqueue.valid.php - * @return bool true if the queue contains any more nodes, false otherwise. - */ - #[TentativeType] - public function valid(): bool {} - - /** - * Recover from the corrupted state and allow further actions on the queue. - * @link https://php.net/manual/en/splpriorityqueue.recoverfromcorruption.php - * @return void - */ - public function recoverFromCorruption() {} - - /** - * @return bool - */ - #[TentativeType] - public function isCorrupted(): bool {} - - /** - * @return int - */ - #[TentativeType] - public function getExtractFlags(): int {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __debugInfo(): array {} + public const EXTR_BOTH = 3; + public const EXTR_PRIORITY = 2; + public const EXTR_DATA = 1; + + /** + * Compare priorities in order to place elements correctly in the heap while sifting up. + * @link https://php.net/manual/en/splpriorityqueue.compare.php + * @param TPriority $priority1+ * The priority of the first node being compared. + *
+ * @param TPriority $priority2+ * The priority of the second node being compared. + *
+ * @return int Result of the comparison, positive integer if priority1 is greater than priority2, 0 if they are equal, negative integer otherwise. + * + *+ * Multiple elements with the same priority will get dequeued in no particular order. + */ + #[TentativeType] + public function compare( + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority1, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority2 + ): int {} + + /** + * Inserts an element in the queue by sifting it up. + * @link https://php.net/manual/en/splpriorityqueue.insert.php + * @param TValue $value
+ * The value to insert. + *
+ * @param TPriority $priority+ * The associated priority. + *
+ * @return true + */ + public function insert( + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority + ) {} + + /** + * Sets the mode of extraction + * @link https://php.net/manual/en/splpriorityqueue.setextractflags.php + * @param int $flags+ * Defines what is extracted by SplPriorityQueue::current, + * SplPriorityQueue::top and + * SplPriorityQueue::extract. + *
+ * SplPriorityQueue::EXTR_DATA (0x00000001): Extract the data + * @return int + */ + #[TentativeType] + public function setExtractFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): int {} + + /** + * Peeks at the node from the top of the queue + * @link https://php.net/manual/en/splpriorityqueue.top.php + * @return TValue The value or priority (or both) of the top node, depending on the extract flag. + */ + #[TentativeType] + public function top(): mixed {} + + /** + * Extracts a node from top of the heap and sift up. + * @link https://php.net/manual/en/splpriorityqueue.extract.php + * @return TValue The value or priority (or both) of the extracted node, depending on the extract flag. + */ + #[TentativeType] + public function extract(): mixed {} + + /** + * Counts the number of elements in the queue. + * @link https://php.net/manual/en/splpriorityqueue.count.php + * @return int the number of elements in the queue. + */ + #[TentativeType] + public function count(): int {} + + /** + * Checks whether the queue is empty. + * @link https://php.net/manual/en/splpriorityqueue.isempty.php + * @return bool whether the queue is empty. + */ + #[TentativeType] + public function isEmpty(): bool {} + + /** + * Rewind iterator back to the start (no-op) + * @link https://php.net/manual/en/splpriorityqueue.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Return current node pointed by the iterator + * @link https://php.net/manual/en/splpriorityqueue.current.php + * @return TValue The value or priority (or both) of the current node, depending on the extract flag. + */ + #[TentativeType] + public function current(): mixed {} + + /** + * Return current node index + * @link https://php.net/manual/en/splpriorityqueue.key.php + * @return int The current node index. + */ + #[TentativeType] + public function key(): int {} + + /** + * Move to the next node + * @link https://php.net/manual/en/splpriorityqueue.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Check whether the queue contains more nodes + * @link https://php.net/manual/en/splpriorityqueue.valid.php + * @return bool true if the queue contains any more nodes, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Recover from the corrupted state and allow further actions on the queue. + * @link https://php.net/manual/en/splpriorityqueue.recoverfromcorruption.php + * @return void + */ + public function recoverFromCorruption() {} + + /** + * @return bool + */ + #[TentativeType] + public function isCorrupted(): bool {} + + /** + * @return int + */ + #[TentativeType] + public function getExtractFlags(): int {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} } /** @@ -1805,166 +1824,166 @@ public function __debugInfo(): array {} */ class SplFixedArray implements Iterator, ArrayAccess, Countable, IteratorAggregate, JsonSerializable { - /** - * Constructs a new fixed array - * @link https://php.net/manual/en/splfixedarray.construct.php - * @param int $size [optional] - */ - public function __construct(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size = 0) {} - - /** - * Returns the size of the array - * @link https://php.net/manual/en/splfixedarray.count.php - * @return int the size of the array. - */ - #[TentativeType] - public function count(): int {} - - /** - * Returns a PHP array from the fixed array - * @link https://php.net/manual/en/splfixedarray.toarray.php - * @return TValue[] a PHP array, similar to the fixed array. - */ - #[TentativeType] - public function toArray(): array {} - - /** - * Import a PHP array in a SplFixedArray instance - * @link https://php.net/manual/en/splfixedarray.fromarray.php - * @param array $array- * The array to import. - *
- * @param bool $preserveKeys [optional]- * Try to save the numeric indexes used in the original array. - *
- * @return SplFixedArray an instance of SplFixedArray - * containing the array content. - */ - #[TentativeType] - public static function fromArray( - #[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $array, - #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $preserveKeys = true - ): SplFixedArray {} - - /** - * Gets the size of the array - * @link https://php.net/manual/en/splfixedarray.getsize.php - * @return int the size of the array, as an integer. - */ - #[TentativeType] - public function getSize(): int {} - - /** - * Change the size of an array - * @link https://php.net/manual/en/splfixedarray.setsize.php - * @param int $size- * The new array size. - *
- * @return bool - */ - public function setSize(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size) {} - - /** - * Returns whether the requested index exists - * @link https://php.net/manual/en/splfixedarray.offsetexists.php - * @param int $index- * The index being checked. - *
- * @return bool true if the requested index exists, otherwise false - */ - #[TentativeType] - public function offsetExists($index): bool {} - - /** - * Returns the value at the specified index - * @link https://php.net/manual/en/splfixedarray.offsetget.php - * @param int $index- * The index with the value. - *
- * @return TValue The value at the specified index. - */ - #[TentativeType] - public function offsetGet($index): mixed {} - - /** - * Sets a new value at a specified index - * @link https://php.net/manual/en/splfixedarray.offsetset.php - * @param int $index- * The index being set. - *
- * @param TValue $value- * The new value for the index. - *
- * @return void - */ - #[TentativeType] - public function offsetSet($index, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} - - /** - * Unsets the value at the specified $index - * @link https://php.net/manual/en/splfixedarray.offsetunset.php - * @param int $index- * The index being unset. - *
- * @return void - */ - #[TentativeType] - public function offsetUnset($index): void {} - - /** - * Rewind iterator back to the start - * @link https://php.net/manual/en/splfixedarray.rewind.php - * @return void - */ - public function rewind() {} - - /** - * Return current array entry - * @link https://php.net/manual/en/splfixedarray.current.php - * @return TValue The current element value. - */ - public function current() {} - - /** - * Return current array index - * @link https://php.net/manual/en/splfixedarray.key.php - * @return int The current array index. - */ - public function key() {} - - /** - * Move to next entry - * @link https://php.net/manual/en/splfixedarray.next.php - * @return void - */ - public function next() {} - - /** - * Check whether the array contains more elements - * @link https://php.net/manual/en/splfixedarray.valid.php - * @return bool true if the array contains any more elements, false otherwise. - */ - #[TentativeType] - public function valid(): bool {} - - #[TentativeType] - public function __wakeup(): void {} - - #[PhpStormStubsElementAvailable(from: '8.2')] - public function __serialize(): array {} - - /** - * @param array $data - */ - #[PhpStormStubsElementAvailable(from: '8.2')] - public function __unserialize(array $data): void {} - - /** - * @return Iterator+ * The array to import. + *
+ * @param bool $preserveKeys [optional]+ * Try to save the numeric indexes used in the original array. + *
+ * @return SplFixedArray an instance of SplFixedArray + * containing the array content. + */ + #[TentativeType] + public static function fromArray( + #[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $array, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $preserveKeys = true + ): SplFixedArray {} + + /** + * Gets the size of the array + * @link https://php.net/manual/en/splfixedarray.getsize.php + * @return int the size of the array, as an integer. + */ + #[TentativeType] + public function getSize(): int {} + + /** + * Change the size of an array + * @link https://php.net/manual/en/splfixedarray.setsize.php + * @param int $size+ * The new array size. + *
+ * @return bool + */ + public function setSize(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size) {} + + /** + * Returns whether the requested index exists + * @link https://php.net/manual/en/splfixedarray.offsetexists.php + * @param int $index+ * The index being checked. + *
+ * @return bool true if the requested index exists, otherwise false + */ + #[TentativeType] + public function offsetExists($index): bool {} + + /** + * Returns the value at the specified index + * @link https://php.net/manual/en/splfixedarray.offsetget.php + * @param int $index+ * The index with the value. + *
+ * @return TValue The value at the specified index. + */ + #[TentativeType] + public function offsetGet($index): mixed {} + + /** + * Sets a new value at a specified index + * @link https://php.net/manual/en/splfixedarray.offsetset.php + * @param int $index+ * The index being set. + *
+ * @param TValue $value+ * The new value for the index. + *
+ * @return void + */ + #[TentativeType] + public function offsetSet($index, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Unsets the value at the specified $index + * @link https://php.net/manual/en/splfixedarray.offsetunset.php + * @param int $index+ * The index being unset. + *
+ * @return void + */ + #[TentativeType] + public function offsetUnset($index): void {} + + /** + * Rewind iterator back to the start + * @link https://php.net/manual/en/splfixedarray.rewind.php + * @return void + */ + public function rewind() {} + + /** + * Return current array entry + * @link https://php.net/manual/en/splfixedarray.current.php + * @return TValue The current element value. + */ + public function current() {} + + /** + * Return current array index + * @link https://php.net/manual/en/splfixedarray.key.php + * @return int The current array index. + */ + public function key() {} + + /** + * Move to next entry + * @link https://php.net/manual/en/splfixedarray.next.php + * @return void + */ + public function next() {} + + /** + * Check whether the array contains more elements + * @link https://php.net/manual/en/splfixedarray.valid.php + * @return bool true if the array contains any more elements, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + #[TentativeType] + public function __wakeup(): void {} + + #[PhpStormStubsElementAvailable(from: '8.2')] + public function __serialize(): array {} + + /** + * @param array $data + */ + #[PhpStormStubsElementAvailable(from: '8.2')] + public function __unserialize(array $data): void {} + + /** + * @return Iterator- * The SplSubject notifying the observer of an update. - *
- * @return void - */ - #[TentativeType] - public function update(SplSubject $subject): void; + /** + * Receive update from subject + * @link https://php.net/manual/en/splobserver.update.php + * @param SplSubject $subject+ * The SplSubject notifying the observer of an update. + *
+ * @return void + */ + #[TentativeType] + public function update(SplSubject $subject): void; } /** @@ -1993,35 +2012,35 @@ public function update(SplSubject $subject): void; */ interface SplSubject { - /** - * Attach an SplObserver - * @link https://php.net/manual/en/splsubject.attach.php - * @param SplObserver $observer- * The SplObserver to attach. - *
- * @return void - */ - #[TentativeType] - public function attach(SplObserver $observer): void; - - /** - * Detach an observer - * @link https://php.net/manual/en/splsubject.detach.php - * @param SplObserver $observer- * The SplObserver to detach. - *
- * @return void - */ - #[TentativeType] - public function detach(SplObserver $observer): void; - - /** - * Notify an observer - * @link https://php.net/manual/en/splsubject.notify.php - * @return void - */ - #[TentativeType] - public function notify(): void; + /** + * Attach an SplObserver + * @link https://php.net/manual/en/splsubject.attach.php + * @param SplObserver $observer+ * The SplObserver to attach. + *
+ * @return void + */ + #[TentativeType] + public function attach(SplObserver $observer): void; + + /** + * Detach an observer + * @link https://php.net/manual/en/splsubject.detach.php + * @param SplObserver $observer+ * The SplObserver to detach. + *
+ * @return void + */ + #[TentativeType] + public function detach(SplObserver $observer): void; + + /** + * Notify an observer + * @link https://php.net/manual/en/splsubject.notify.php + * @return void + */ + #[TentativeType] + public function notify(): void; } /** @@ -2036,251 +2055,251 @@ public function notify(): void; */ class SplObjectStorage implements Countable, Iterator, Serializable, ArrayAccess { - /** - * Adds an object in the storage - * @link https://php.net/manual/en/splobjectstorage.attach.php - * @param TObject $object- * The object to add. - *
- * @param TValue $info [optional]- * The data to associate with the object. - *
- * @return void - */ - #[TentativeType] - public function attach( - #[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info = null - ): void {} - - /** - * Removes an object from the storage - * @link https://php.net/manual/en/splobjectstorage.detach.php - * @param TObject $object- * The object to remove. - *
- * @return void - */ - #[TentativeType] - public function detach(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): void {} - - /** - * Checks if the storage contains a specific object - * @link https://php.net/manual/en/splobjectstorage.contains.php - * @param TObject $object- * The object to look for. - *
- * @return bool true if the object is in the storage, false otherwise. - */ - #[TentativeType] - public function contains(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): bool {} - - /** - * Adds all objects from another storage - * @link https://php.net/manual/en/splobjectstorage.addall.php - * @param SplObjectStorage- * The storage you want to import. - *
- * @return int - */ - #[TentativeType] - public function addAll(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} - - /** - * Removes objects contained in another storage from the current storage - * @link https://php.net/manual/en/splobjectstorage.removeall.php - * @param SplObjectStorage- * The storage containing the elements to remove. - *
- * @return int - */ - #[TentativeType] - public function removeAll(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} - - /** - * Removes all objects except for those contained in another storage from the current storage - * @link https://php.net/manual/en/splobjectstorage.removeallexcept.php - * @param SplObjectStorage- * The storage containing the elements to retain in the current storage. - *
- * @return int - * @since 5.3.6 - */ - #[TentativeType] - public function removeAllExcept(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} - - /** - * Returns the data associated with the current iterator entry - * @link https://php.net/manual/en/splobjectstorage.getinfo.php - * @return TValue The data associated with the current iterator position. - */ - #[TentativeType] - public function getInfo(): mixed {} - - /** - * Sets the data associated with the current iterator entry - * @link https://php.net/manual/en/splobjectstorage.setinfo.php - * @param TValue $info- * The data to associate with the current iterator entry. - *
- * @return void - */ - #[TentativeType] - public function setInfo(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info): void {} - - /** - * Returns the number of objects in the storage - * @link https://php.net/manual/en/splobjectstorage.count.php - * @param int $mode [optional] - * @return int The number of objects in the storage. - */ - #[TentativeType] - public function count(#[PhpStormStubsElementAvailable(from: '8.0')] int $mode = COUNT_NORMAL): int {} - - /** - * Rewind the iterator to the first storage element - * @link https://php.net/manual/en/splobjectstorage.rewind.php - * @return void - */ - #[TentativeType] - public function rewind(): void {} - - /** - * Returns if the current iterator entry is valid - * @link https://php.net/manual/en/splobjectstorage.valid.php - * @return bool true if the iterator entry is valid, false otherwise. - */ - #[TentativeType] - public function valid(): bool {} - - /** - * Returns the index at which the iterator currently is - * @link https://php.net/manual/en/splobjectstorage.key.php - * @return int The index corresponding to the position of the iterator. - */ - #[TentativeType] - public function key(): int {} - - /** - * Returns the current storage entry - * @link https://php.net/manual/en/splobjectstorage.current.php - * @return TObject The object at the current iterator position. - */ - #[TentativeType] - public function current(): object {} - - /** - * Move to the next entry - * @link https://php.net/manual/en/splobjectstorage.next.php - * @return void - */ - #[TentativeType] - public function next(): void {} - - /** - * Unserializes a storage from its string representation - * @link https://php.net/manual/en/splobjectstorage.unserialize.php - * @param string $data- * The serialized representation of a storage. - *
- * @return void - * @since 5.2.2 - */ - #[TentativeType] - public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {} - - /** - * Serializes the storage - * @link https://php.net/manual/en/splobjectstorage.serialize.php - * @return string A string representing the storage. - * @since 5.2.2 - */ - #[TentativeType] - public function serialize(): string {} - - /** - * Checks whether an object exists in the storage - * @link https://php.net/manual/en/splobjectstorage.offsetexists.php - * @param TObject $object- * The object to look for. - *
- * @return bool true if the object exists in the storage, - * and false otherwise. - */ - #[TentativeType] - public function offsetExists($object): bool {} - - /** - * Associates data to an object in the storage - * @link https://php.net/manual/en/splobjectstorage.offsetset.php - * @param TObject $object- * The object to associate data with. - *
- * @param TValue $info [optional]- * The data to associate with the object. - *
- * @return void - */ - #[TentativeType] - public function offsetSet( - #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')] $object, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info = null - ): void {} - - /** - * Removes an object from the storage - * @link https://php.net/manual/en/splobjectstorage.offsetunset.php - * @param TObject $object- * The object to remove. - *
- * @return void - */ - #[TentativeType] - public function offsetUnset($object): void {} - - /** - * Returns the data associated with an- * The object to look for. - *
- * @return TValue The data previously associated with the object in the storage. - */ - #[TentativeType] - public function offsetGet($object): mixed {} - - /** - * Calculate a unique identifier for the contained objects - * @link https://php.net/manual/en/splobjectstorage.gethash.php - * @param TObject $object- * object whose identifier is to be calculated. - *
- * @return string A string with the calculated identifier. - * @since 5.4 - */ - #[TentativeType] - public function getHash(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): string {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __serialize(): array {} - - /** - * @param array $data - * @since 7.4 - */ - #[TentativeType] - public function __unserialize(array $data): void {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __debugInfo(): array {} + /** + * Adds an object in the storage + * @link https://php.net/manual/en/splobjectstorage.attach.php + * @param TObject $object+ * The object to add. + *
+ * @param TValue $info [optional]+ * The data to associate with the object. + *
+ * @return void + */ + #[TentativeType] + public function attach( + #[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info = null + ): void {} + + /** + * Removes an object from the storage + * @link https://php.net/manual/en/splobjectstorage.detach.php + * @param TObject $object+ * The object to remove. + *
+ * @return void + */ + #[TentativeType] + public function detach(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): void {} + + /** + * Checks if the storage contains a specific object + * @link https://php.net/manual/en/splobjectstorage.contains.php + * @param TObject $object+ * The object to look for. + *
+ * @return bool true if the object is in the storage, false otherwise. + */ + #[TentativeType] + public function contains(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): bool {} + + /** + * Adds all objects from another storage + * @link https://php.net/manual/en/splobjectstorage.addall.php + * @param SplObjectStorage+ * The storage you want to import. + *
+ * @return int + */ + #[TentativeType] + public function addAll(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} + + /** + * Removes objects contained in another storage from the current storage + * @link https://php.net/manual/en/splobjectstorage.removeall.php + * @param SplObjectStorage+ * The storage containing the elements to remove. + *
+ * @return int + */ + #[TentativeType] + public function removeAll(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} + + /** + * Removes all objects except for those contained in another storage from the current storage + * @link https://php.net/manual/en/splobjectstorage.removeallexcept.php + * @param SplObjectStorage+ * The storage containing the elements to retain in the current storage. + *
+ * @return int + * @since 5.3.6 + */ + #[TentativeType] + public function removeAllExcept(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} + + /** + * Returns the data associated with the current iterator entry + * @link https://php.net/manual/en/splobjectstorage.getinfo.php + * @return TValue The data associated with the current iterator position. + */ + #[TentativeType] + public function getInfo(): mixed {} + + /** + * Sets the data associated with the current iterator entry + * @link https://php.net/manual/en/splobjectstorage.setinfo.php + * @param TValue $info+ * The data to associate with the current iterator entry. + *
+ * @return void + */ + #[TentativeType] + public function setInfo(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info): void {} + + /** + * Returns the number of objects in the storage + * @link https://php.net/manual/en/splobjectstorage.count.php + * @param int $mode [optional] + * @return int The number of objects in the storage. + */ + #[TentativeType] + public function count(#[PhpStormStubsElementAvailable(from: '8.0')] int $mode = COUNT_NORMAL): int {} + + /** + * Rewind the iterator to the first storage element + * @link https://php.net/manual/en/splobjectstorage.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Returns if the current iterator entry is valid + * @link https://php.net/manual/en/splobjectstorage.valid.php + * @return bool true if the iterator entry is valid, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Returns the index at which the iterator currently is + * @link https://php.net/manual/en/splobjectstorage.key.php + * @return int The index corresponding to the position of the iterator. + */ + #[TentativeType] + public function key(): int {} + + /** + * Returns the current storage entry + * @link https://php.net/manual/en/splobjectstorage.current.php + * @return TObject The object at the current iterator position. + */ + #[TentativeType] + public function current(): object {} + + /** + * Move to the next entry + * @link https://php.net/manual/en/splobjectstorage.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Unserializes a storage from its string representation + * @link https://php.net/manual/en/splobjectstorage.unserialize.php + * @param string $data+ * The serialized representation of a storage. + *
+ * @return void + * @since 5.2.2 + */ + #[TentativeType] + public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {} + + /** + * Serializes the storage + * @link https://php.net/manual/en/splobjectstorage.serialize.php + * @return string A string representing the storage. + * @since 5.2.2 + */ + #[TentativeType] + public function serialize(): string {} + + /** + * Checks whether an object exists in the storage + * @link https://php.net/manual/en/splobjectstorage.offsetexists.php + * @param TObject $object+ * The object to look for. + *
+ * @return bool true if the object exists in the storage, + * and false otherwise. + */ + #[TentativeType] + public function offsetExists($object): bool {} + + /** + * Associates data to an object in the storage + * @link https://php.net/manual/en/splobjectstorage.offsetset.php + * @param TObject $object+ * The object to associate data with. + *
+ * @param TValue $info [optional]+ * The data to associate with the object. + *
+ * @return void + */ + #[TentativeType] + public function offsetSet( + #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')] $object, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info = null + ): void {} + + /** + * Removes an object from the storage + * @link https://php.net/manual/en/splobjectstorage.offsetunset.php + * @param TObject $object+ * The object to remove. + *
+ * @return void + */ + #[TentativeType] + public function offsetUnset($object): void {} + + /** + * Returns the data associated with an+ * The object to look for. + *
+ * @return TValue The data previously associated with the object in the storage. + */ + #[TentativeType] + public function offsetGet($object): mixed {} + + /** + * Calculate a unique identifier for the contained objects + * @link https://php.net/manual/en/splobjectstorage.gethash.php + * @param TObject $object+ * object whose identifier is to be calculated. + *
+ * @return string A string with the calculated identifier. + * @since 5.4 + */ + #[TentativeType] + public function getHash(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): string {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __serialize(): array {} + + /** + * @param array $data + * @since 7.4 + */ + #[TentativeType] + public function __unserialize(array $data): void {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} } /** @@ -2289,135 +2308,135 @@ public function __debugInfo(): array {} */ class MultipleIterator implements Iterator { - public const MIT_NEED_ANY = 0; - public const MIT_NEED_ALL = 1; - public const MIT_KEYS_NUMERIC = 0; - public const MIT_KEYS_ASSOC = 2; - - /** - * Constructs a new MultipleIterator - * @link https://php.net/manual/en/multipleiterator.construct.php - * @param int $flags Defaults to MultipleIterator::MIT_NEED_ALL | MultipleIterator::MIT_KEYS_NUMERIC - */ - public function __construct( - #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $flags, - #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = MultipleIterator::MIT_NEED_ALL|MultipleIterator::MIT_KEYS_NUMERIC - ) {} - - /** - * Gets the flag information - * @link https://php.net/manual/en/multipleiterator.getflags.php - * @return int Information about the flags, as an integer. - */ - #[TentativeType] - public function getFlags(): int {} - - /** - * Sets flags - * @link https://php.net/manual/en/multipleiterator.setflags.php - * @param int $flags- * The flags to set, according to the - * Flag Constants - *
- * @return void - */ - #[TentativeType] - public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {} - - /** - * Attaches iterator information - * @link https://php.net/manual/en/multipleiterator.attachiterator.php - * @param Iterator $iterator- * The new iterator to attach. - *
- * @param int|string|null $info [optional]- * The associative information for the Iterator, which must be an - * integer, a string, or null. - *
- * @return void Description... - */ - #[TentativeType] - public function attachIterator(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int|string|null'], default: '')] $info = null): void {} - - /** - * Detaches an iterator - * @link https://php.net/manual/en/multipleiterator.detachiterator.php - * @param Iterator $iterator- * The iterator to detach. - *
- * @return void - */ - #[TentativeType] - public function detachIterator(Iterator $iterator): void {} - - /** - * Checks if an iterator is attached - * @link https://php.net/manual/en/multipleiterator.containsiterator.php - * @param Iterator $iterator- * The iterator to check. - *
- * @return bool true on success or false on failure. - */ - #[TentativeType] - public function containsIterator(Iterator $iterator): bool {} - - /** - * Gets the number of attached iterator instances - * @link https://php.net/manual/en/multipleiterator.countiterators.php - * @return int The number of attached iterator instances (as an integer). - */ - #[TentativeType] - public function countIterators(): int {} - - /** - * Rewinds all attached iterator instances - * @link https://php.net/manual/en/multipleiterator.rewind.php - * @return void - */ - #[TentativeType] - public function rewind(): void {} - - /** - * Checks the validity of sub iterators - * @link https://php.net/manual/en/multipleiterator.valid.php - * @return bool true if one or all sub iterators are valid depending on flags, - * otherwise false - */ - #[TentativeType] - public function valid(): bool {} - - /** - * Gets the registered iterator instances - * @link https://php.net/manual/en/multipleiterator.key.php - * @return array An array of all registered iterator instances, - * or false if no sub iterator is attached. - */ - #[TentativeType] - public function key(): array {} - - /** - * Gets the registered iterator instances - * @link https://php.net/manual/en/multipleiterator.current.php - * @return array An array containing the current values of each attached iterator, - * or false if no iterators are attached. - * @throws RuntimeException if mode MIT_NEED_ALL is set and at least one attached iterator is not valid. - * @throws InvalidArgumentException if a key is NULL and MIT_KEYS_ASSOC is set. - */ - #[TentativeType] - public function current(): array {} - - /** - * Moves all attached iterator instances forward - * @link https://php.net/manual/en/multipleiterator.next.php - * @return void - */ - #[TentativeType] - public function next(): void {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __debugInfo(): array {} + public const MIT_NEED_ANY = 0; + public const MIT_NEED_ALL = 1; + public const MIT_KEYS_NUMERIC = 0; + public const MIT_KEYS_ASSOC = 2; + + /** + * Constructs a new MultipleIterator + * @link https://php.net/manual/en/multipleiterator.construct.php + * @param int $flags Defaults to MultipleIterator::MIT_NEED_ALL | MultipleIterator::MIT_KEYS_NUMERIC + */ + public function __construct( + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $flags, + #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = MultipleIterator::MIT_NEED_ALL|MultipleIterator::MIT_KEYS_NUMERIC + ) {} + + /** + * Gets the flag information + * @link https://php.net/manual/en/multipleiterator.getflags.php + * @return int Information about the flags, as an integer. + */ + #[TentativeType] + public function getFlags(): int {} + + /** + * Sets flags + * @link https://php.net/manual/en/multipleiterator.setflags.php + * @param int $flags+ * The flags to set, according to the + * Flag Constants + *
+ * @return void + */ + #[TentativeType] + public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {} + + /** + * Attaches iterator information + * @link https://php.net/manual/en/multipleiterator.attachiterator.php + * @param Iterator $iterator+ * The new iterator to attach. + *
+ * @param int|string|null $info [optional]+ * The associative information for the Iterator, which must be an + * integer, a string, or null. + *
+ * @return void Description... + */ + #[TentativeType] + public function attachIterator(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int|string|null'], default: '')] $info = null): void {} + + /** + * Detaches an iterator + * @link https://php.net/manual/en/multipleiterator.detachiterator.php + * @param Iterator $iterator+ * The iterator to detach. + *
+ * @return void + */ + #[TentativeType] + public function detachIterator(Iterator $iterator): void {} + + /** + * Checks if an iterator is attached + * @link https://php.net/manual/en/multipleiterator.containsiterator.php + * @param Iterator $iterator+ * The iterator to check. + *
+ * @return bool true on success or false on failure. + */ + #[TentativeType] + public function containsIterator(Iterator $iterator): bool {} + + /** + * Gets the number of attached iterator instances + * @link https://php.net/manual/en/multipleiterator.countiterators.php + * @return int The number of attached iterator instances (as an integer). + */ + #[TentativeType] + public function countIterators(): int {} + + /** + * Rewinds all attached iterator instances + * @link https://php.net/manual/en/multipleiterator.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Checks the validity of sub iterators + * @link https://php.net/manual/en/multipleiterator.valid.php + * @return bool true if one or all sub iterators are valid depending on flags, + * otherwise false + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Gets the registered iterator instances + * @link https://php.net/manual/en/multipleiterator.key.php + * @return array An array of all registered iterator instances, + * or false if no sub iterator is attached. + */ + #[TentativeType] + public function key(): array {} + + /** + * Gets the registered iterator instances + * @link https://php.net/manual/en/multipleiterator.current.php + * @return array An array containing the current values of each attached iterator, + * or false if no iterators are attached. + * @throws RuntimeException if mode MIT_NEED_ALL is set and at least one attached iterator is not valid. + * @throws InvalidArgumentException if a key is NULL and MIT_KEYS_ASSOC is set. + */ + #[TentativeType] + public function current(): array {} + + /** + * Moves all attached iterator instances forward + * @link https://php.net/manual/en/multipleiterator.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} } From de76385e30399f0a876c99dc594c24ada7f3eb8d Mon Sep 17 00:00:00 2001 From: Stephen Reay- * Optional suffix to omit from the base name returned. - *
- * @return string the base name without path information. - * @since 5.2.2 - */ - #[TentativeType] - public function getBasename(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $suffix = ''): string {} - - /** - * Gets the path to the file - * @link https://php.net/manual/en/splfileinfo.getpathname.php - * @return string The path to the file. - * @since 5.1.2 - */ - #[TentativeType] - public function getPathname(): string {} - - /** - * Gets file permissions - * @link https://php.net/manual/en/splfileinfo.getperms.php - * @return int|false The file permissions on success, or FALSE on failure. - * @since 5.1.2 - */ - #[TentativeType] - public function getPerms(): int|false {} - - /** - * Gets the inode for the file - * @link https://php.net/manual/en/splfileinfo.getinode.php - * @return int|false The inode number for the filesystem object on success, or FALSE on failure. - * @since 5.1.2 - * @throws \RunTimeException on error. - */ - #[TentativeType] - public function getInode(): int|false {} - - /** - * Gets file size - * @link https://php.net/manual/en/splfileinfo.getsize.php - * @return int|false The filesize in bytes on success, or FALSE on failure. - * @since 5.1.2 - * @throws \RunTimeException on error. - */ - #[TentativeType] - public function getSize(): int|false {} - - /** - * Gets the owner of the file - * @link https://php.net/manual/en/splfileinfo.getowner.php - * @return int|false The owner id in numerical format on success, or FALSE on failure. - * @since 5.1.2 - * @throws \RunTimeException on error. - */ - #[TentativeType] - public function getOwner(): int|false {} - - /** - * Gets the file group - * @link https://php.net/manual/en/splfileinfo.getgroup.php - * @return int|false The group id in numerical format on success, or FALSE on failure. - * @since 5.1.2 - * @throws \RunTimeException on error. - */ - #[TentativeType] - public function getGroup(): int|false {} - - /** - * Gets last access time of the file - * @link https://php.net/manual/en/splfileinfo.getatime.php - * @return int|false The time the file was last accessed on success, or FALSE on failure. - * @since 5.1.2 - * @throws \RunTimeException on error. - */ - #[TentativeType] - public function getATime(): int|false {} - - /** - * Gets the last modified time - * @link https://php.net/manual/en/splfileinfo.getmtime.php - * @return int|false The last modified time for the file, in a Unix timestamp on success, or FALSE on failure. - * @since 5.1.2 - */ - #[TentativeType] - public function getMTime(): int|false {} - - /** - * Gets the inode change time - * @link https://php.net/manual/en/splfileinfo.getctime.php - * @return int|false The last change time, in a Unix timestamp on success, or FALSE on failure. - * @since 5.1.2 - * @throws \RunTimeException on error. - */ - #[TentativeType] - public function getCTime(): int|false {} - - /** - * Gets file type - * @link https://php.net/manual/en/splfileinfo.gettype.php - * @return string|false A string representing the type of the entry. May be one of file, link, dir, block, fifo, char, socket, or unknown, or FALSE on failure. - * May be one of file, link, - * or dir - * @since 5.1.2 - * @throws \RunTimeException on error. - */ - #[TentativeType] - public function getType(): string|false {} - - /** - * Tells if the entry is writable - * @link https://php.net/manual/en/splfileinfo.iswritable.php - * @return bool true if writable, false otherwise; - * @since 5.1.2 - */ - #[TentativeType] - public function isWritable(): bool {} - - /** - * Tells if file is readable - * @link https://php.net/manual/en/splfileinfo.isreadable.php - * @return bool true if readable, false otherwise. - * @since 5.1.2 - */ - #[TentativeType] - public function isReadable(): bool {} - - /** - * Tells if the file is executable - * @link https://php.net/manual/en/splfileinfo.isexecutable.php - * @return bool true if executable, false otherwise. - * @since 5.1.2 - */ - #[TentativeType] - public function isExecutable(): bool {} - - /** - * Tells if the object references a regular file - * @link https://php.net/manual/en/splfileinfo.isfile.php - * @return bool true if the file exists and is a regular file (not a link), false otherwise. - * @since 5.1.2 - */ - #[TentativeType] - public function isFile(): bool {} - - /** - * Tells if the file is a directory - * @link https://php.net/manual/en/splfileinfo.isdir.php - * @return bool true if a directory, false otherwise. - * @since 5.1.2 - */ - #[TentativeType] - public function isDir(): bool {} - - /** - * Tells if the file is a link - * @link https://php.net/manual/en/splfileinfo.islink.php - * @return bool true if the file is a link, false otherwise. - * @since 5.1.2 - */ - #[TentativeType] - public function isLink(): bool {} - - /** - * Gets the target of a link - * @link https://php.net/manual/en/splfileinfo.getlinktarget.php - * @return string|false The target of the filesystem link on success, or FALSE on failure. - * @since 5.2.2 - * @throws \RunTimeException on error. - */ - #[TentativeType] - public function getLinkTarget(): string|false {} - - /** - * Gets absolute path to file - * @link https://php.net/manual/en/splfileinfo.getrealpath.php - * @return string|false the path to the file, or FALSE if the file does not exist. - * @since 5.2.2 - */ - #[TentativeType] - public function getRealPath(): string|false {} - - /** - * Gets an SplFileInfo object for the file - * - * @template T of SplFileInfo - * @link https://php.net/manual/en/splfileinfo.getfileinfo.php - * @param class-string- * Name of an SplFileInfo derived class to use. - *
- * @return T An SplFileInfo object created for the file. - * @since 5.1.2 - */ - #[TentativeType] - public function getFileInfo(#[LanguageLevelTypeAware(['8.0' => 'class-string- * Name of an SplFileInfo derived class to use. - *
- * - * @return T|null A SplFileInfo object for the parent path of the file on success, or NULL on failure. - * @since 5.1.2 - */ - #[TentativeType] - public function getPathInfo(#[LanguageLevelTypeAware(['8.0' => 'class-string- * The mode for opening the file. See the fopen - * documentation for descriptions of possible modes. The default - * is read only. - *
- * @param bool $useIncludePath [optional]- *
- * @param resource $context [optional]- *
- * @return SplFileObject The opened file as an SplFileObject object. - * @since 5.1.2 - * @throws \RuntimeException If the file cannot be opened (e.g. insufficient access rights). - */ - #[TentativeType] - public function openFile( - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mode = 'r', - #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $useIncludePath = false, - $context = null - ): SplFileObject {} - - /** - * Sets the class name used with SplFileInfo::openFile - * - * @template T of SplFileObject - * @link https://php.net/manual/en/splfileinfo.setfileclass.php - * @param class-string- * The class name to use when openFile() is called. - *
- * @return void - * @since 5.1.2 - */ - #[TentativeType] - public function setFileClass(#[LanguageLevelTypeAware(['8.0' => 'class-string- * The class name to use. - *
- * - * @return void - * @since 5.1.2 - */ - #[TentativeType] - public function setInfoClass(#[LanguageLevelTypeAware(['8.0' => 'class-string+ * Optional suffix to omit from the base name returned. + *
+ * @return string the base name without path information. + * @since 5.2.2 + */ + #[TentativeType] + public function getBasename(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $suffix = ''): string {} + + /** + * Gets the path to the file + * @link https://php.net/manual/en/splfileinfo.getpathname.php + * @return string The path to the file. + * @since 5.1.2 + */ + #[TentativeType] + public function getPathname(): string {} + + /** + * Gets file permissions + * @link https://php.net/manual/en/splfileinfo.getperms.php + * @return int|false The file permissions on success, or FALSE on failure. + * @since 5.1.2 + */ + #[TentativeType] + public function getPerms(): int|false {} + + /** + * Gets the inode for the file + * @link https://php.net/manual/en/splfileinfo.getinode.php + * @return int|false The inode number for the filesystem object on success, or FALSE on failure. + * @since 5.1.2 + * @throws \RunTimeException on error. + */ + #[TentativeType] + public function getInode(): int|false {} + + /** + * Gets file size + * @link https://php.net/manual/en/splfileinfo.getsize.php + * @return int|false The filesize in bytes on success, or FALSE on failure. + * @since 5.1.2 + * @throws \RunTimeException on error. + */ + #[TentativeType] + public function getSize(): int|false {} + + /** + * Gets the owner of the file + * @link https://php.net/manual/en/splfileinfo.getowner.php + * @return int|false The owner id in numerical format on success, or FALSE on failure. + * @since 5.1.2 + * @throws \RunTimeException on error. + */ + #[TentativeType] + public function getOwner(): int|false {} + + /** + * Gets the file group + * @link https://php.net/manual/en/splfileinfo.getgroup.php + * @return int|false The group id in numerical format on success, or FALSE on failure. + * @since 5.1.2 + * @throws \RunTimeException on error. + */ + #[TentativeType] + public function getGroup(): int|false {} + + /** + * Gets last access time of the file + * @link https://php.net/manual/en/splfileinfo.getatime.php + * @return int|false The time the file was last accessed on success, or FALSE on failure. + * @since 5.1.2 + * @throws \RunTimeException on error. + */ + #[TentativeType] + public function getATime(): int|false {} + + /** + * Gets the last modified time + * @link https://php.net/manual/en/splfileinfo.getmtime.php + * @return int|false The last modified time for the file, in a Unix timestamp on success, or FALSE on failure. + * @since 5.1.2 + */ + #[TentativeType] + public function getMTime(): int|false {} + + /** + * Gets the inode change time + * @link https://php.net/manual/en/splfileinfo.getctime.php + * @return int|false The last change time, in a Unix timestamp on success, or FALSE on failure. + * @since 5.1.2 + * @throws \RunTimeException on error. + */ + #[TentativeType] + public function getCTime(): int|false {} + + /** + * Gets file type + * @link https://php.net/manual/en/splfileinfo.gettype.php + * @return string|false A string representing the type of the entry. May be one of file, link, dir, block, fifo, char, socket, or unknown, or FALSE on failure. + * May be one of file, link, + * or dir + * @since 5.1.2 + * @throws \RunTimeException on error. + */ + #[TentativeType] + public function getType(): string|false {} + + /** + * Tells if the entry is writable + * @link https://php.net/manual/en/splfileinfo.iswritable.php + * @return bool true if writable, false otherwise; + * @since 5.1.2 + */ + #[TentativeType] + public function isWritable(): bool {} + + /** + * Tells if file is readable + * @link https://php.net/manual/en/splfileinfo.isreadable.php + * @return bool true if readable, false otherwise. + * @since 5.1.2 + */ + #[TentativeType] + public function isReadable(): bool {} + + /** + * Tells if the file is executable + * @link https://php.net/manual/en/splfileinfo.isexecutable.php + * @return bool true if executable, false otherwise. + * @since 5.1.2 + */ + #[TentativeType] + public function isExecutable(): bool {} + + /** + * Tells if the object references a regular file + * @link https://php.net/manual/en/splfileinfo.isfile.php + * @return bool true if the file exists and is a regular file (not a link), false otherwise. + * @since 5.1.2 + */ + #[TentativeType] + public function isFile(): bool {} + + /** + * Tells if the file is a directory + * @link https://php.net/manual/en/splfileinfo.isdir.php + * @return bool true if a directory, false otherwise. + * @since 5.1.2 + */ + #[TentativeType] + public function isDir(): bool {} + + /** + * Tells if the file is a link + * @link https://php.net/manual/en/splfileinfo.islink.php + * @return bool true if the file is a link, false otherwise. + * @since 5.1.2 + */ + #[TentativeType] + public function isLink(): bool {} + + /** + * Gets the target of a link + * @link https://php.net/manual/en/splfileinfo.getlinktarget.php + * @return string|false The target of the filesystem link on success, or FALSE on failure. + * @since 5.2.2 + * @throws \RunTimeException on error. + */ + #[TentativeType] + public function getLinkTarget(): string|false {} + + /** + * Gets absolute path to file + * @link https://php.net/manual/en/splfileinfo.getrealpath.php + * @return string|false the path to the file, or FALSE if the file does not exist. + * @since 5.2.2 + */ + #[TentativeType] + public function getRealPath(): string|false {} + + /** + * Gets an SplFileInfo object for the file + * + * @template T of SplFileInfo + * @link https://php.net/manual/en/splfileinfo.getfileinfo.php + * @param class-string+ * Name of an SplFileInfo derived class to use. + *
+ * @return T An SplFileInfo object created for the file. + * @since 5.1.2 + */ + #[TentativeType] + public function getFileInfo(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $class = null): SplFileInfo {} + + /** + * Gets an SplFileInfo object for the path + * + * @template T of SplFileInfo + * @link https://php.net/manual/en/splfileinfo.getpathinfo.php + * + * @param class-string+ * Name of an SplFileInfo derived class to use. + *
+ * + * @return T|null A SplFileInfo object for the parent path of the file on success, or NULL on failure. + * @since 5.1.2 + */ + #[TentativeType] + public function getPathInfo(#[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $class = null): ?SplFileInfo {} + + /** + * Gets an SplFileObject object for the file + * @link https://php.net/manual/en/splfileinfo.openfile.php + * @param string $mode [optional]+ * The mode for opening the file. See the fopen + * documentation for descriptions of possible modes. The default + * is read only. + *
+ * @param bool $useIncludePath [optional]+ *
+ * @param resource $context [optional]+ *
+ * @return SplFileObject The opened file as an SplFileObject object. + * @since 5.1.2 + * @throws \RuntimeException If the file cannot be opened (e.g. insufficient access rights). + */ + #[TentativeType] + public function openFile( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mode = 'r', + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $useIncludePath = false, + $context = null + ): SplFileObject {} + + /** + * Sets the class name used with SplFileInfo::openFile + * + * @template T of SplFileObject + * @link https://php.net/manual/en/splfileinfo.setfileclass.php + * @param class-string+ * The class name to use when openFile() is called. + *
+ * @return void + * @since 5.1.2 + */ + #[TentativeType] + public function setFileClass(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $class = SplFileObject::class): void {} + + /** + * Sets the class used with getFileInfo and getPathInfo + * @template T of SplFileInfo* + * @link https://php.net/manual/en/splfileinfo.setinfoclass.php + * @param class-string+ * The class name to use. + *
+ * + * @return void + * @since 5.1.2 + */ + #[TentativeType] + public function setInfoClass(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $class = SplFileInfo::class): void {} + + /** + * Returns the path to the file as a string + * @link https://php.net/manual/en/splfileinfo.tostring.php + * @return string the path to the file. + * @since 5.1.2 + */ + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] + public function __toString() {} + + #[TentativeType] + final public function _bad_state_ex(): void {} + + public function __wakeup() {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} } /** @@ -343,74 +343,74 @@ public function __debugInfo(): array {} */ class DirectoryIterator extends SplFileInfo implements SeekableIterator { - /** - * Constructs a new directory iterator from a path - * @link https://php.net/manual/en/directoryiterator.construct.php - * @param string $directory - * @throws UnexpectedValueException if the path cannot be opened. - * @throws RuntimeException if the path is an empty string. - */ - public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory) {} - - /** - * Determine if current DirectoryIterator item is '.' or '..' - * @link https://php.net/manual/en/directoryiterator.isdot.php - * @return bool true if the entry is . or .., - * otherwise false - */ - #[TentativeType] - public function isDot(): bool {} - - /** - * Rewind the DirectoryIterator back to the start - * @link https://php.net/manual/en/directoryiterator.rewind.php - * @return void - */ - #[TentativeType] - public function rewind(): void {} - - /** - * Check whether current DirectoryIterator position is a valid file - * @link https://php.net/manual/en/directoryiterator.valid.php - * @return bool true if the position is valid, otherwise false - */ - #[TentativeType] - public function valid(): bool {} - - /** - * Return the key for the current DirectoryIterator item - * @link https://php.net/manual/en/directoryiterator.key.php - * @return string The key for the current DirectoryIterator item. - */ - #[TentativeType] - public function key(): mixed {} - - /** - * Return the current DirectoryIterator item. - * @link https://php.net/manual/en/directoryiterator.current.php - * @return DirectoryIterator The current DirectoryIterator item. - */ - #[TentativeType] - public function current(): mixed {} - - /** - * Move forward to next DirectoryIterator item - * @link https://php.net/manual/en/directoryiterator.next.php - * @return void - */ - #[TentativeType] - public function next(): void {} - - /** - * Seek to a DirectoryIterator item - * @link https://php.net/manual/en/directoryiterator.seek.php - * @param int $offset- * The zero-based numeric position to seek to. - *
- * @return void - */ - #[TentativeType] - public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset): void {} + /** + * Constructs a new directory iterator from a path + * @link https://php.net/manual/en/directoryiterator.construct.php + * @param string $directory + * @throws UnexpectedValueException if the path cannot be opened. + * @throws RuntimeException if the path is an empty string. + */ + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory) {} + + /** + * Determine if current DirectoryIterator item is '.' or '..' + * @link https://php.net/manual/en/directoryiterator.isdot.php + * @return bool true if the entry is . or .., + * otherwise false + */ + #[TentativeType] + public function isDot(): bool {} + + /** + * Rewind the DirectoryIterator back to the start + * @link https://php.net/manual/en/directoryiterator.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Check whether current DirectoryIterator position is a valid file + * @link https://php.net/manual/en/directoryiterator.valid.php + * @return bool true if the position is valid, otherwise false + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Return the key for the current DirectoryIterator item + * @link https://php.net/manual/en/directoryiterator.key.php + * @return string The key for the current DirectoryIterator item. + */ + #[TentativeType] + public function key(): mixed {} + + /** + * Return the current DirectoryIterator item. + * @link https://php.net/manual/en/directoryiterator.current.php + * @return DirectoryIterator The current DirectoryIterator item. + */ + #[TentativeType] + public function current(): mixed {} + + /** + * Move forward to next DirectoryIterator item + * @link https://php.net/manual/en/directoryiterator.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Seek to a DirectoryIterator item + * @link https://php.net/manual/en/directoryiterator.seek.php + * @param int $offset+ * The zero-based numeric position to seek to. + *
+ * @return void + */ + #[TentativeType] + public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset): void {} } /** @@ -419,86 +419,86 @@ public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $o */ class FilesystemIterator extends DirectoryIterator { - public const CURRENT_MODE_MASK = 240; - public const CURRENT_AS_PATHNAME = 32; - public const CURRENT_AS_FILEINFO = 0; - public const CURRENT_AS_SELF = 16; - public const KEY_MODE_MASK = 3840; - public const KEY_AS_PATHNAME = 0; - public const FOLLOW_SYMLINKS = 16384; - public const KEY_AS_FILENAME = 256; - public const NEW_CURRENT_AND_KEY = 256; - public const SKIP_DOTS = 4096; - public const UNIX_PATHS = 8192; - public const OTHER_MODE_MASK = 28672; - - /** - * Constructs a new filesystem iterator - * @link https://php.net/manual/en/filesystemiterator.construct.php - * @param string $directory - * @param int $flags [optional] - * @throws UnexpectedValueException if the path cannot be found. - */ - public function __construct( - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO|FilesystemIterator::SKIP_DOTS - ) {} - - /** - * Rewinds back to the beginning - * @link https://php.net/manual/en/filesystemiterator.rewind.php - * @return void - */ - #[TentativeType] - public function rewind(): void {} - - /** - * Move to the next file - * @link https://php.net/manual/en/filesystemiterator.next.php - * @return void - */ - public function next() {} - - /** - * Retrieve the key for the current file - * @link https://php.net/manual/en/filesystemiterator.key.php - * @return string the pathname or filename depending on the set flags. - * See the FilesystemIterator constants. - */ - #[TentativeType] - public function key(): string {} - - /** - * The current file - * @link https://php.net/manual/en/filesystemiterator.current.php - * @return string|SplFileInfo|self The filename, file information, or $this depending on the set flags. - * See the FilesystemIterator constants. - */ - #[TentativeType] - public function current(): SplFileInfo|FilesystemIterator|string {} - - /** - * Get the handling flags - * @link https://php.net/manual/en/filesystemiterator.getflags.php - * @return int The integer value of the set flags. - */ - #[TentativeType] - public function getFlags(): int {} - - /** - * Sets handling flags - * @link https://php.net/manual/en/filesystemiterator.setflags.php - * @param int $flags- * The handling flags to set. - * See the FilesystemIterator constants. - *
- * @return void - */ - #[TentativeType] - public function setFlags( - #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $flags = null, - #[PhpStormStubsElementAvailable(from: '8.0')] int $flags - ): void {} + public const CURRENT_MODE_MASK = 240; + public const CURRENT_AS_PATHNAME = 32; + public const CURRENT_AS_FILEINFO = 0; + public const CURRENT_AS_SELF = 16; + public const KEY_MODE_MASK = 3840; + public const KEY_AS_PATHNAME = 0; + public const FOLLOW_SYMLINKS = 16384; + public const KEY_AS_FILENAME = 256; + public const NEW_CURRENT_AND_KEY = 256; + public const SKIP_DOTS = 4096; + public const UNIX_PATHS = 8192; + public const OTHER_MODE_MASK = 28672; + + /** + * Constructs a new filesystem iterator + * @link https://php.net/manual/en/filesystemiterator.construct.php + * @param string $directory + * @param int $flags [optional] + * @throws UnexpectedValueException if the path cannot be found. + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO|FilesystemIterator::SKIP_DOTS + ) {} + + /** + * Rewinds back to the beginning + * @link https://php.net/manual/en/filesystemiterator.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Move to the next file + * @link https://php.net/manual/en/filesystemiterator.next.php + * @return void + */ + public function next() {} + + /** + * Retrieve the key for the current file + * @link https://php.net/manual/en/filesystemiterator.key.php + * @return string the pathname or filename depending on the set flags. + * See the FilesystemIterator constants. + */ + #[TentativeType] + public function key(): string {} + + /** + * The current file + * @link https://php.net/manual/en/filesystemiterator.current.php + * @return string|SplFileInfo|self The filename, file information, or $this depending on the set flags. + * See the FilesystemIterator constants. + */ + #[TentativeType] + public function current(): SplFileInfo|FilesystemIterator|string {} + + /** + * Get the handling flags + * @link https://php.net/manual/en/filesystemiterator.getflags.php + * @return int The integer value of the set flags. + */ + #[TentativeType] + public function getFlags(): int {} + + /** + * Sets handling flags + * @link https://php.net/manual/en/filesystemiterator.setflags.php + * @param int $flags+ * The handling flags to set. + * See the FilesystemIterator constants. + *
+ * @return void + */ + #[TentativeType] + public function setFlags( + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $flags = null, + #[PhpStormStubsElementAvailable(from: '8.0')] int $flags + ): void {} } /** @@ -508,82 +508,82 @@ public function setFlags( */ class RecursiveDirectoryIterator extends FilesystemIterator implements RecursiveIterator { - /** - * Constructs a RecursiveDirectoryIterator - * @link https://php.net/manual/en/recursivedirectoryiterator.construct.php - * @param string $directory - * @param int $flags [optional] - * @throws UnexpectedValueException if the path cannot be found or is not a directory. - * @since 5.1.2 - */ - public function __construct( - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO - ) {} - - /** - * Returns whether current entry is a directory and not '.' or '..' - * @link https://php.net/manual/en/recursivedirectoryiterator.haschildren.php - * @param bool $allowLinks [optional]- *
- * @return bool whether the current entry is a directory, but not '.' or '..' - */ - #[TentativeType] - public function hasChildren(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $allowLinks = false): bool {} - - /** - * Returns an iterator for the current entry if it is a directory - * @link https://php.net/manual/en/recursivedirectoryiterator.getchildren.php - * @return RecursiveDirectoryIterator An iterator for the current entry, if it is a directory. - */ - #[TentativeType] - public function getChildren(): RecursiveDirectoryIterator {} - - /** - * Get sub path - * @link https://php.net/manual/en/recursivedirectoryiterator.getsubpath.php - * @return string The sub path (sub directory). - */ - #[TentativeType] - public function getSubPath(): string {} - - /** - * Get sub path and name - * @link https://php.net/manual/en/recursivedirectoryiterator.getsubpathname.php - * @return string The sub path (sub directory) and filename. - */ - #[TentativeType] - public function getSubPathname(): string {} - - /** - * Rewinds back to the beginning - * @link https://php.net/manual/en/filesystemiterator.rewind.php - * @return void - */ - public function rewind() {} - - /** - * Move to the next file - * @link https://php.net/manual/en/filesystemiterator.next.php - * @return void - */ - public function next() {} - - /** - * Retrieve the key for the current file - * @link https://php.net/manual/en/filesystemiterator.key.php - * @return string the pathname or filename depending on the set flags. - * See the FilesystemIterator constants. - */ - public function key() {} - - /** - * The current file - * @link https://php.net/manual/en/filesystemiterator.current.php - * @return string|SplFileInfo|self The filename, file information, or $this depending on the set flags. - * See the FilesystemIterator constants. - */ - public function current() {} + /** + * Constructs a RecursiveDirectoryIterator + * @link https://php.net/manual/en/recursivedirectoryiterator.construct.php + * @param string $directory + * @param int $flags [optional] + * @throws UnexpectedValueException if the path cannot be found or is not a directory. + * @since 5.1.2 + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $directory, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO + ) {} + + /** + * Returns whether current entry is a directory and not '.' or '..' + * @link https://php.net/manual/en/recursivedirectoryiterator.haschildren.php + * @param bool $allowLinks [optional]+ *
+ * @return bool whether the current entry is a directory, but not '.' or '..' + */ + #[TentativeType] + public function hasChildren(#[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $allowLinks = false): bool {} + + /** + * Returns an iterator for the current entry if it is a directory + * @link https://php.net/manual/en/recursivedirectoryiterator.getchildren.php + * @return RecursiveDirectoryIterator An iterator for the current entry, if it is a directory. + */ + #[TentativeType] + public function getChildren(): RecursiveDirectoryIterator {} + + /** + * Get sub path + * @link https://php.net/manual/en/recursivedirectoryiterator.getsubpath.php + * @return string The sub path (sub directory). + */ + #[TentativeType] + public function getSubPath(): string {} + + /** + * Get sub path and name + * @link https://php.net/manual/en/recursivedirectoryiterator.getsubpathname.php + * @return string The sub path (sub directory) and filename. + */ + #[TentativeType] + public function getSubPathname(): string {} + + /** + * Rewinds back to the beginning + * @link https://php.net/manual/en/filesystemiterator.rewind.php + * @return void + */ + public function rewind() {} + + /** + * Move to the next file + * @link https://php.net/manual/en/filesystemiterator.next.php + * @return void + */ + public function next() {} + + /** + * Retrieve the key for the current file + * @link https://php.net/manual/en/filesystemiterator.key.php + * @return string the pathname or filename depending on the set flags. + * See the FilesystemIterator constants. + */ + public function key() {} + + /** + * The current file + * @link https://php.net/manual/en/filesystemiterator.current.php + * @return string|SplFileInfo|self The filename, file information, or $this depending on the set flags. + * See the FilesystemIterator constants. + */ + public function current() {} } /** @@ -593,25 +593,25 @@ public function current() {} */ class GlobIterator extends FilesystemIterator implements Countable { - /** - * Construct a directory using glob - * @link https://php.net/manual/en/globiterator.construct.php - * @param $pattern - * @param int $flags [optional] - */ - public function __construct( - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO - ) {} - - /** - * Get the number of directories and files - * @link https://php.net/manual/en/globiterator.count.php - * @return int<0,max> The number of returned directories and files, as an - * integer. - */ - #[TentativeType] - public function count(): int {} + /** + * Construct a directory using glob + * @link https://php.net/manual/en/globiterator.construct.php + * @param $pattern + * @param int $flags [optional] + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $pattern, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FilesystemIterator::KEY_AS_PATHNAME|FilesystemIterator::CURRENT_AS_FILEINFO + ) {} + + /** + * Get the number of directories and files + * @link https://php.net/manual/en/globiterator.count.php + * @return int<0,max> The number of returned directories and files, as an + * integer. + */ + #[TentativeType] + public function count(): int {} } /** @@ -620,440 +620,440 @@ public function count(): int {} */ class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIterator { - /** - * Drop newlines at the end of a line. - */ - public const DROP_NEW_LINE = 1; - - /** - * Read on rewind/next. - */ - public const READ_AHEAD = 2; - - /** - * Skip empty lines in the file. This requires the {@see READ_AHEAD} flag to work as expected. - */ - public const SKIP_EMPTY = 4; - - /** - * Read lines as CSV rows. - */ - public const READ_CSV = 8; - - /** - * Construct a new file object. - * - * @link https://php.net/manual/en/splfileobject.construct.php - * - * @param string $filename The file to open - * @param string $mode [optional] The mode in which to open the file. See {@see fopen} for a list of allowed modes. - * @param bool $useIncludePath [optional] Whether to search in the include_path for filename - * @param resource $context [optional] A valid context resource created with {@see stream_context_create} - * - * @throws RuntimeException When the filename cannot be opened - * @throws LogicException When the filename is a directory - */ - public function __construct( - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mode = 'r', - #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $useIncludePath = false, - $context = null - ) {} - - /** - * Rewind the file to the first line - * @link https://php.net/manual/en/splfileobject.rewind.php - * @return void - * - * @throws RuntimeException If cannot be rewound - */ - #[TentativeType] - public function rewind(): void {} - - /** - * Reached end of file - * @link https://php.net/manual/en/splfileobject.eof.php - * @return bool true if file is at EOF, false otherwise. - */ - #[TentativeType] - public function eof(): bool {} - - /** - * Not at EOF - * @link https://php.net/manual/en/splfileobject.valid.php - * @return bool true if not reached EOF, false otherwise. - */ - #[TentativeType] - public function valid(): bool {} - - /** - * Gets line from file - * @link https://php.net/manual/en/splfileobject.fgets.php - * @return string a string containing the next line from the file. - * - * @throws RuntimeException If the file cannot be read - */ - #[TentativeType] - public function fgets(): string {} - - /** - * Read from file - * @link https://php.net/manual/en/splfileobject.fread.php - * @param int $length- * The number of bytes to read. - *
- * @return string|false returns the string read from the file or FALSE on failure. - * @since 5.5.11 - */ - #[TentativeType] - public function fread(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length): string|false {} - - /** - * Gets line from file and parse as CSV fields - * @link https://php.net/manual/en/splfileobject.fgetcsv.php - * @param string $separator [optional]- * The field delimiter (one character only). Defaults as a comma or the value set using SplFileObject::setCsvControl. - *
- * @param string $enclosure [optional]- * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl. - *
- * @param string $escape [optional]- * The escape character (one character only). Defaults as a backslash (\) or the value set using SplFileObject::setCsvControl. - *
- * @return array|false|null an indexed array containing the fields read, or false on error. - * - *- * A blank line in a CSV file will be returned as an array - * comprising a single null field unless using SplFileObject::SKIP_EMPTY | SplFileObject::DROP_NEW_LINE, - * in which case empty lines are skipped. - */ - #[TentativeType] - #[LanguageLevelTypeAware(['8.1' => 'array|false'], default: 'array|false|null')] - public function fgetcsv( - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ",", - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = "\"", - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\" - ) {} - - /** - * Write a field array as a CSV line - * @link https://php.net/manual/en/splfileobject.fputcsv.php - * @param array $fields An array of values - * @param string $separator [optional]
- * The field delimiter (one character only). Defaults as a comma or the value set using SplFileObject::setCsvControl. - *
- * @param string $enclosure [optional]- * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl. - *
- * @param string $escape The optional escape parameter sets the escape character (one character only). - * @return int|false Returns the length of the written string or FALSE on failure. - * @since 5.4 - */ - #[TentativeType] - public function fputcsv( - array $fields, - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ',', - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = '"', - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\", - #[PhpStormStubsElementAvailable('8.1')] string $eol = PHP_EOL - ): int|false {} - - /** - * Set the delimiter and enclosure character for CSV - * @link https://php.net/manual/en/splfileobject.setcsvcontrol.php - * @param string $separator [optional]- * The field delimiter (one character only). - *
- * @param string $enclosure [optional]- * The field enclosure character (one character only). - *
- * @param string $escape [optional]- * The field escape character (one character only). - *
- * @return void - */ - #[TentativeType] - public function setCsvControl( - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ",", - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = "\"", - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\" - ): void {} - - /** - * Get the delimiter and enclosure character for CSV - * @link https://php.net/manual/en/splfileobject.getcsvcontrol.php - * @return array an indexed array containing the delimiter and enclosure character. - */ - #[TentativeType] - public function getCsvControl(): array {} - - /** - * Portable file locking - * @link https://php.net/manual/en/splfileobject.flock.php - * @param int $operation- * operation is one of the following: - * LOCK_SH to acquire a shared lock (reader). - *
- * @param int &$wouldBlock [optional]- * Set to 1 if the lock would block (EWOULDBLOCK errno condition). - *
- * @return bool true on success or false on failure. - */ - #[TentativeType] - public function flock(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $operation, &$wouldBlock = null): bool {} - - /** - * Flushes the output to the file - * @link https://php.net/manual/en/splfileobject.fflush.php - * @return bool true on success or false on failure. - */ - #[TentativeType] - public function fflush(): bool {} - - /** - * Return current file position - * @link https://php.net/manual/en/splfileobject.ftell.php - * @return int|false the position of the file pointer as an integer, or false on error. - */ - #[TentativeType] - public function ftell(): int|false {} - - /** - * Seek to a position - * @link https://php.net/manual/en/splfileobject.fseek.php - * @param int $offset- * The offset. A negative value can be used to move backwards through the file which - * is useful when SEEK_END is used as the whence value. - *
- * @param int $whence [optional]- * whence values are: - * SEEK_SET - Set position equal to offset bytes. - * SEEK_CUR - Set position to current location plus offset. - * SEEK_END - Set position to end-of-file plus offset. - *
- *- * If whence is not specified, it is assumed to be SEEK_SET. - *
- * @return int 0 if the seek was successful, -1 otherwise. Note that seeking - * past EOF is not considered an error. - */ - #[TentativeType] - public function fseek( - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $whence = SEEK_SET - ): int {} - - /** - * Gets character from file - * @link https://php.net/manual/en/splfileobject.fgetc.php - * @return string|false a string containing a single character read from the file or false on EOF. - */ - #[TentativeType] - public function fgetc(): string|false {} - - /** - * Output all remaining data on a file pointer - * @link https://php.net/manual/en/splfileobject.fpassthru.php - * @return int the number of characters read from handle - * and passed through to the output. - */ - #[TentativeType] - public function fpassthru(): int {} - - /** - * Gets line from file and strip HTML tags - * @link https://php.net/manual/en/splfileobject.fgetss.php - * @param string $allowable_tags [optional]- * You can use the optional third parameter to specify tags which should - * not be stripped. - *
- * @return string|false a string containing the next line of the file with HTML and PHP - * code stripped, or false on error. - * @removed 8.0 - */ - #[Deprecated(since: '7.3')] - public function fgetss($allowable_tags = null) {} - - /** - * Parses input from file according to a format - * @link https://php.net/manual/en/splfileobject.fscanf.php - * @param string $format- * The specified format as described in the sprintf documentation. - *
- * @param mixed &...$vars [optional]- * The optional assigned values. - *
- * @return array|int|null If only one parameter is passed to this method, the values parsed will be - * returned as an array. Otherwise, if optional parameters are passed, the - * function will return the number of assigned values. The optional - * parameters must be passed by reference. - */ - #[TentativeType] - public function fscanf( - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &...$vars - ): array|int|null {} - - /** - * Write to file - * @link https://php.net/manual/en/splfileobject.fwrite.php - * @param string $data- * The string to be written to the file. - *
- * @param int $length [optional]- * If the length argument is given, writing will - * stop after length bytes have been written or - * the end of string is reached, whichever comes - * first. - *
- * @return int|false the number of bytes written, or 0 (false since 7.4) on error. - */ - #[LanguageLevelTypeAware(['7.4' => 'int|false'], default: 'int')] - #[TentativeType] - public function fwrite( - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data, - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = 0 - ): int|false {} - - /** - * Gets information about the file - * @link https://php.net/manual/en/splfileobject.fstat.php - * @return array an array with the statistics of the file; the format of the array - * is described in detail on the stat manual page. - */ - #[TentativeType] - public function fstat(): array {} - - /** - * Truncates the file to a given length - * @link https://php.net/manual/en/splfileobject.ftruncate.php - * @param int $size- * The size to truncate to. - *
- *- * If size is larger than the file it is extended with null bytes. - *
- *- * If size is smaller than the file, the extra data will be lost. - *
- * @return bool true on success or false on failure. - */ - #[TentativeType] - public function ftruncate(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size): bool {} - - /** - * Retrieve current line of file - * @link https://php.net/manual/en/splfileobject.current.php - * @return string|array|false Retrieves the current line of the file. If the SplFileObject::READ_CSV flag is set, this method returns an array containing the current line parsed as CSV data. - */ - #[TentativeType] - public function current(): string|array|false {} - - /** - * Get line number - * @link https://php.net/manual/en/splfileobject.key.php - * @return int the current line number. - */ - #[TentativeType] - public function key(): int {} - - /** - * Read next line - * @link https://php.net/manual/en/splfileobject.next.php - * @return void - */ - #[TentativeType] - public function next(): void {} - - /** - * Sets flags for the SplFileObject - * @link https://php.net/manual/en/splfileobject.setflags.php - * @param int $flags- * Bit mask of the flags to set. See - * SplFileObject constants - * for the available flags. - *
- * @return void - */ - #[TentativeType] - public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {} - - /** - * Gets flags for the SplFileObject - * @link https://php.net/manual/en/splfileobject.getflags.php - * @return int an integer representing the flags. - */ - #[TentativeType] - public function getFlags(): int {} - - /** - * Set maximum line length - * @link https://php.net/manual/en/splfileobject.setmaxlinelen.php - * @param int $maxLength- * The maximum length of a line. - *
- * @return void - * - * @throws DomainException When maxLength is less than zero. - */ - #[TentativeType] - public function setMaxLineLen(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength): void {} - - /** - * Get maximum line length - * @link https://php.net/manual/en/splfileobject.getmaxlinelen.php - * @return int<0, max> the maximum line length if one has been set with - * SplFileObject::setMaxLineLen, default is 0. - */ - #[TentativeType] - public function getMaxLineLen(): int {} - - /** - * SplFileObject does not have children - * @link https://php.net/manual/en/splfileobject.haschildren.php - * @return bool false - * @since 5.1.2 - */ - #[TentativeType] - #[LanguageLevelTypeAware(['8.2' => 'false'], default: 'bool')] - public function hasChildren() {} - - /** - * No purpose - * @link https://php.net/manual/en/splfileobject.getchildren.php - * @return null|RecursiveIterator An SplFileObject does not have children so this method returns NULL. - */ - #[TentativeType] - #[LanguageLevelTypeAware(['8.2' => 'null'], default: 'null|RecursiveIterator')] - public function getChildren() {} - - /** - * Seek to specified line - * @link https://php.net/manual/en/splfileobject.seek.php - * @param int $line- * The zero-based line number to seek to. - *
- * @return void - * @throws LogicException If the line is negative - */ - #[TentativeType] - public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $line): void {} - - /** - * Alias of SplFileObject::fgets - * @link https://php.net/manual/en/splfileobject.getcurrentline.php - * @return string Returns a string containing the next line from the file. - * @since 5.1.2 - */ - #[TentativeType] - public function getCurrentLine(): string {} - - /** - * Alias of SplFileObject::current - * @link https://php.net/manual/en/splfileobject.tostring.php - */ - #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] - public function __toString() {} + /** + * Drop newlines at the end of a line. + */ + public const DROP_NEW_LINE = 1; + + /** + * Read on rewind/next. + */ + public const READ_AHEAD = 2; + + /** + * Skip empty lines in the file. This requires the {@see READ_AHEAD} flag to work as expected. + */ + public const SKIP_EMPTY = 4; + + /** + * Read lines as CSV rows. + */ + public const READ_CSV = 8; + + /** + * Construct a new file object. + * + * @link https://php.net/manual/en/splfileobject.construct.php + * + * @param string $filename The file to open + * @param string $mode [optional] The mode in which to open the file. See {@see fopen} for a list of allowed modes. + * @param bool $useIncludePath [optional] Whether to search in the include_path for filename + * @param resource $context [optional] A valid context resource created with {@see stream_context_create} + * + * @throws RuntimeException When the filename cannot be opened + * @throws LogicException When the filename is a directory + */ + public function __construct( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $mode = 'r', + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $useIncludePath = false, + $context = null + ) {} + + /** + * Rewind the file to the first line + * @link https://php.net/manual/en/splfileobject.rewind.php + * @return void + * + * @throws RuntimeException If cannot be rewound + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Reached end of file + * @link https://php.net/manual/en/splfileobject.eof.php + * @return bool true if file is at EOF, false otherwise. + */ + #[TentativeType] + public function eof(): bool {} + + /** + * Not at EOF + * @link https://php.net/manual/en/splfileobject.valid.php + * @return bool true if not reached EOF, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Gets line from file + * @link https://php.net/manual/en/splfileobject.fgets.php + * @return string a string containing the next line from the file. + * + * @throws RuntimeException If the file cannot be read + */ + #[TentativeType] + public function fgets(): string {} + + /** + * Read from file + * @link https://php.net/manual/en/splfileobject.fread.php + * @param int $length+ * The number of bytes to read. + *
+ * @return string|false returns the string read from the file or FALSE on failure. + * @since 5.5.11 + */ + #[TentativeType] + public function fread(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length): string|false {} + + /** + * Gets line from file and parse as CSV fields + * @link https://php.net/manual/en/splfileobject.fgetcsv.php + * @param string $separator [optional]+ * The field delimiter (one character only). Defaults as a comma or the value set using SplFileObject::setCsvControl. + *
+ * @param string $enclosure [optional]+ * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl. + *
+ * @param string $escape [optional]+ * The escape character (one character only). Defaults as a backslash (\) or the value set using SplFileObject::setCsvControl. + *
+ * @return array|false|null an indexed array containing the fields read, or false on error. + * + *+ * A blank line in a CSV file will be returned as an array + * comprising a single null field unless using SplFileObject::SKIP_EMPTY | SplFileObject::DROP_NEW_LINE, + * in which case empty lines are skipped. + */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.1' => 'array|false'], default: 'array|false|null')] + public function fgetcsv( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ",", + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = "\"", + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\" + ) {} + + /** + * Write a field array as a CSV line + * @link https://php.net/manual/en/splfileobject.fputcsv.php + * @param array $fields An array of values + * @param string $separator [optional]
+ * The field delimiter (one character only). Defaults as a comma or the value set using SplFileObject::setCsvControl. + *
+ * @param string $enclosure [optional]+ * The field enclosure character (one character only). Defaults as a double quotation mark or the value set using SplFileObject::setCsvControl. + *
+ * @param string $escape The optional escape parameter sets the escape character (one character only). + * @return int|false Returns the length of the written string or FALSE on failure. + * @since 5.4 + */ + #[TentativeType] + public function fputcsv( + array $fields, + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ',', + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = '"', + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\", + #[PhpStormStubsElementAvailable('8.1')] string $eol = PHP_EOL + ): int|false {} + + /** + * Set the delimiter and enclosure character for CSV + * @link https://php.net/manual/en/splfileobject.setcsvcontrol.php + * @param string $separator [optional]+ * The field delimiter (one character only). + *
+ * @param string $enclosure [optional]+ * The field enclosure character (one character only). + *
+ * @param string $escape [optional]+ * The field escape character (one character only). + *
+ * @return void + */ + #[TentativeType] + public function setCsvControl( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $separator = ",", + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $enclosure = "\"", + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $escape = "\\" + ): void {} + + /** + * Get the delimiter and enclosure character for CSV + * @link https://php.net/manual/en/splfileobject.getcsvcontrol.php + * @return array an indexed array containing the delimiter and enclosure character. + */ + #[TentativeType] + public function getCsvControl(): array {} + + /** + * Portable file locking + * @link https://php.net/manual/en/splfileobject.flock.php + * @param int $operation+ * operation is one of the following: + * LOCK_SH to acquire a shared lock (reader). + *
+ * @param int &$wouldBlock [optional]+ * Set to 1 if the lock would block (EWOULDBLOCK errno condition). + *
+ * @return bool true on success or false on failure. + */ + #[TentativeType] + public function flock(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $operation, &$wouldBlock = null): bool {} + + /** + * Flushes the output to the file + * @link https://php.net/manual/en/splfileobject.fflush.php + * @return bool true on success or false on failure. + */ + #[TentativeType] + public function fflush(): bool {} + + /** + * Return current file position + * @link https://php.net/manual/en/splfileobject.ftell.php + * @return int|false the position of the file pointer as an integer, or false on error. + */ + #[TentativeType] + public function ftell(): int|false {} + + /** + * Seek to a position + * @link https://php.net/manual/en/splfileobject.fseek.php + * @param int $offset+ * The offset. A negative value can be used to move backwards through the file which + * is useful when SEEK_END is used as the whence value. + *
+ * @param int $whence [optional]+ * whence values are: + * SEEK_SET - Set position equal to offset bytes. + * SEEK_CUR - Set position to current location plus offset. + * SEEK_END - Set position to end-of-file plus offset. + *
+ *+ * If whence is not specified, it is assumed to be SEEK_SET. + *
+ * @return int 0 if the seek was successful, -1 otherwise. Note that seeking + * past EOF is not considered an error. + */ + #[TentativeType] + public function fseek( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $offset, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $whence = SEEK_SET + ): int {} + + /** + * Gets character from file + * @link https://php.net/manual/en/splfileobject.fgetc.php + * @return string|false a string containing a single character read from the file or false on EOF. + */ + #[TentativeType] + public function fgetc(): string|false {} + + /** + * Output all remaining data on a file pointer + * @link https://php.net/manual/en/splfileobject.fpassthru.php + * @return int the number of characters read from handle + * and passed through to the output. + */ + #[TentativeType] + public function fpassthru(): int {} + + /** + * Gets line from file and strip HTML tags + * @link https://php.net/manual/en/splfileobject.fgetss.php + * @param string $allowable_tags [optional]+ * You can use the optional third parameter to specify tags which should + * not be stripped. + *
+ * @return string|false a string containing the next line of the file with HTML and PHP + * code stripped, or false on error. + * @removed 8.0 + */ + #[Deprecated(since: '7.3')] + public function fgetss($allowable_tags = null) {} + + /** + * Parses input from file according to a format + * @link https://php.net/manual/en/splfileobject.fscanf.php + * @param string $format+ * The specified format as described in the sprintf documentation. + *
+ * @param mixed &...$vars [optional]+ * The optional assigned values. + *
+ * @return array|int|null If only one parameter is passed to this method, the values parsed will be + * returned as an array. Otherwise, if optional parameters are passed, the + * function will return the number of assigned values. The optional + * parameters must be passed by reference. + */ + #[TentativeType] + public function fscanf( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $format, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] &...$vars + ): array|int|null {} + + /** + * Write to file + * @link https://php.net/manual/en/splfileobject.fwrite.php + * @param string $data+ * The string to be written to the file. + *
+ * @param int $length [optional]+ * If the length argument is given, writing will + * stop after length bytes have been written or + * the end of string is reached, whichever comes + * first. + *
+ * @return int|false the number of bytes written, or 0 (false since 7.4) on error. + */ + #[LanguageLevelTypeAware(['7.4' => 'int|false'], default: 'int')] + #[TentativeType] + public function fwrite( + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data, + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $length = 0 + ): int|false {} + + /** + * Gets information about the file + * @link https://php.net/manual/en/splfileobject.fstat.php + * @return array an array with the statistics of the file; the format of the array + * is described in detail on the stat manual page. + */ + #[TentativeType] + public function fstat(): array {} + + /** + * Truncates the file to a given length + * @link https://php.net/manual/en/splfileobject.ftruncate.php + * @param int $size+ * The size to truncate to. + *
+ *+ * If size is larger than the file it is extended with null bytes. + *
+ *+ * If size is smaller than the file, the extra data will be lost. + *
+ * @return bool true on success or false on failure. + */ + #[TentativeType] + public function ftruncate(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size): bool {} + + /** + * Retrieve current line of file + * @link https://php.net/manual/en/splfileobject.current.php + * @return string|array|false Retrieves the current line of the file. If the SplFileObject::READ_CSV flag is set, this method returns an array containing the current line parsed as CSV data. + */ + #[TentativeType] + public function current(): string|array|false {} + + /** + * Get line number + * @link https://php.net/manual/en/splfileobject.key.php + * @return int the current line number. + */ + #[TentativeType] + public function key(): int {} + + /** + * Read next line + * @link https://php.net/manual/en/splfileobject.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Sets flags for the SplFileObject + * @link https://php.net/manual/en/splfileobject.setflags.php + * @param int $flags+ * Bit mask of the flags to set. See + * SplFileObject constants + * for the available flags. + *
+ * @return void + */ + #[TentativeType] + public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {} + + /** + * Gets flags for the SplFileObject + * @link https://php.net/manual/en/splfileobject.getflags.php + * @return int an integer representing the flags. + */ + #[TentativeType] + public function getFlags(): int {} + + /** + * Set maximum line length + * @link https://php.net/manual/en/splfileobject.setmaxlinelen.php + * @param int $maxLength+ * The maximum length of a line. + *
+ * @return void + * + * @throws DomainException When maxLength is less than zero. + */ + #[TentativeType] + public function setMaxLineLen(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength): void {} + + /** + * Get maximum line length + * @link https://php.net/manual/en/splfileobject.getmaxlinelen.php + * @return int<0, max> the maximum line length if one has been set with + * SplFileObject::setMaxLineLen, default is 0. + */ + #[TentativeType] + public function getMaxLineLen(): int {} + + /** + * SplFileObject does not have children + * @link https://php.net/manual/en/splfileobject.haschildren.php + * @return bool false + * @since 5.1.2 + */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.2' => 'false'], default: 'bool')] + public function hasChildren() {} + + /** + * No purpose + * @link https://php.net/manual/en/splfileobject.getchildren.php + * @return null|RecursiveIterator An SplFileObject does not have children so this method returns NULL. + */ + #[TentativeType] + #[LanguageLevelTypeAware(['8.2' => 'null'], default: 'null|RecursiveIterator')] + public function getChildren() {} + + /** + * Seek to specified line + * @link https://php.net/manual/en/splfileobject.seek.php + * @param int $line+ * The zero-based line number to seek to. + *
+ * @return void + * @throws LogicException If the line is negative + */ + #[TentativeType] + public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $line): void {} + + /** + * Alias of SplFileObject::fgets + * @link https://php.net/manual/en/splfileobject.getcurrentline.php + * @return string Returns a string containing the next line from the file. + * @since 5.1.2 + */ + #[TentativeType] + public function getCurrentLine(): string {} + + /** + * Alias of SplFileObject::current + * @link https://php.net/manual/en/splfileobject.tostring.php + */ + #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] + public function __toString() {} } /** @@ -1062,14 +1062,14 @@ public function __toString() {} */ class SplTempFileObject extends SplFileObject { - /** - * Construct a new temporary file object - * @link https://php.net/manual/en/spltempfileobject.construct.php - * @param int $maxMemory [optional] - * @throws RuntimeException if an error occurs. - * @since 5.1.2 - */ - public function __construct(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxMemory = 2097152) {} + /** + * Construct a new temporary file object + * @link https://php.net/manual/en/spltempfileobject.construct.php + * @param int $maxMemory [optional] + * @throws RuntimeException if an error occurs. + * @since 5.1.2 + */ + public function __construct(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxMemory = 2097152) {} } /** @@ -1081,250 +1081,250 @@ public function __construct(#[LanguageLevelTypeAware(['8.0' => 'int'], default: */ class SplDoublyLinkedList implements Iterator, Countable, ArrayAccess, Serializable { - public const IT_MODE_LIFO = 2; - public const IT_MODE_FIFO = 0; - public const IT_MODE_DELETE = 1; - public const IT_MODE_KEEP = 0; - - /** - * Add/insert a new value at the specified index - * @param mixed $index The index where the new value is to be inserted. - * @param TValue $value The new value for the index. - * @return void - * @link https://php.net/spldoublylinkedlist.add - * @since 5.5 - */ - #[TentativeType] - public function add( - #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value - ): void {} - - /** - * Pops a node from the end of the doubly linked list - * @link https://php.net/manual/en/spldoublylinkedlist.pop.php - * @return TValue The value of the popped node. - */ - #[TentativeType] - public function pop(): mixed {} - - /** - * Shifts a node from the beginning of the doubly linked list - * @link https://php.net/manual/en/spldoublylinkedlist.shift.php - * @return TValue The value of the shifted node. - */ - #[TentativeType] - public function shift(): mixed {} - - /** - * Pushes an element at the end of the doubly linked list - * @link https://php.net/manual/en/spldoublylinkedlist.push.php - * @param TValue $value- * The value to push. - *
- * @return void - */ - #[TentativeType] - public function push(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} - - /** - * Prepends the doubly linked list with an element - * @link https://php.net/manual/en/spldoublylinkedlist.unshift.php - * @param TValue $value- * The value to unshift. - *
- * @return void - */ - #[TentativeType] - public function unshift(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} - - /** - * Peeks at the node from the end of the doubly linked list - * @link https://php.net/manual/en/spldoublylinkedlist.top.php - * @return TValue The value of the last node. - */ - #[TentativeType] - public function top(): mixed {} - - /** - * Peeks at the node from the beginning of the doubly linked list - * @link https://php.net/manual/en/spldoublylinkedlist.bottom.php - * @return TValue The value of the first node. - */ - #[TentativeType] - public function bottom(): mixed {} - - /** - * Counts the number of elements in the doubly linked list. - * @link https://php.net/manual/en/spldoublylinkedlist.count.php - * @return int the number of elements in the doubly linked list. - */ - #[TentativeType] - public function count(): int {} - - /** - * Checks whether the doubly linked list is empty. - * @link https://php.net/manual/en/spldoublylinkedlist.isempty.php - * @return bool whether the doubly linked list is empty. - */ - #[TentativeType] - public function isEmpty(): bool {} - - /** - * Sets the mode of iteration - * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php - * @param int $mode- * There are two orthogonal sets of modes that can be set: - *
- * The direction of the iteration (either one or the other): - * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) - * @return int - */ - #[TentativeType] - public function setIteratorMode(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode): int {} - - /** - * Returns the mode of iteration - * @link https://php.net/manual/en/spldoublylinkedlist.getiteratormode.php - * @return int the different modes and flags that affect the iteration. - */ - #[TentativeType] - public function getIteratorMode(): int {} - - /** - * Returns whether the requested $index exists - * @link https://php.net/manual/en/spldoublylinkedlist.offsetexists.php - * @param mixed $index- * The index being checked. - *
- * @return bool true if the requested index exists, otherwise false - */ - #[TentativeType] - public function offsetExists($index): bool {} - - /** - * Returns the value at the specified $index - * @link https://php.net/manual/en/spldoublylinkedlist.offsetget.php - * @param mixed $index- * The index with the value. - *
- * @return TValue The value at the specified index. - */ - #[TentativeType] - public function offsetGet($index): mixed {} - - /** - * Sets the value at the specified $index to $newval - * @link https://php.net/manual/en/spldoublylinkedlist.offsetset.php - * @param mixed $index- * The index being set. - *
- * @param TValue $value- * The new value for the index. - *
- * @return void - */ - #[TentativeType] - public function offsetSet($index, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} - - /** - * Unsets the value at the specified $index - * @link https://php.net/manual/en/spldoublylinkedlist.offsetunset.php - * @param mixed $index- * The index being unset. - *
- * @return void - */ - #[TentativeType] - public function offsetUnset($index): void {} - - /** - * Rewind iterator back to the start - * @link https://php.net/manual/en/spldoublylinkedlist.rewind.php - * @return void - */ - #[TentativeType] - public function rewind(): void {} - - /** - * Return current array entry - * @link https://php.net/manual/en/spldoublylinkedlist.current.php - * @return TValue The current node value. - */ - #[TentativeType] - public function current(): mixed {} - - /** - * Return current node index - * @link https://php.net/manual/en/spldoublylinkedlist.key.php - * @return string|float|int|bool|null The current node index. - */ - #[TentativeType] - public function key(): int {} - - /** - * Move to next entry - * @link https://php.net/manual/en/spldoublylinkedlist.next.php - * @return void - */ - #[TentativeType] - public function next(): void {} - - /** - * Move to previous entry - * @link https://php.net/manual/en/spldoublylinkedlist.prev.php - * @return void - */ - #[TentativeType] - public function prev(): void {} - - /** - * Check whether the doubly linked list contains more nodes - * @link https://php.net/manual/en/spldoublylinkedlist.valid.php - * @return bool true if the doubly linked list contains any more nodes, false otherwise. - */ - #[TentativeType] - public function valid(): bool {} - - /** - * Unserializes the storage - * @link https://php.net/manual/en/spldoublylinkedlist.serialize.php - * @param string $data The serialized string. - * @return void - * @since 5.4 - */ - #[TentativeType] - public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {} - - /** - * Serializes the storage - * @link https://php.net/manual/en/spldoublylinkedlist.unserialize.php - * @return string The serialized string. - * @since 5.4 - */ - #[TentativeType] - public function serialize(): string {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __debugInfo(): array {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __serialize(): array {} - - /** - * @param array $data - * @since 7.4 - */ - #[TentativeType] - public function __unserialize(array $data): void {} + public const IT_MODE_LIFO = 2; + public const IT_MODE_FIFO = 0; + public const IT_MODE_DELETE = 1; + public const IT_MODE_KEEP = 0; + + /** + * Add/insert a new value at the specified index + * @param mixed $index The index where the new value is to be inserted. + * @param TValue $value The new value for the index. + * @return void + * @link https://php.net/spldoublylinkedlist.add + * @since 5.5 + */ + #[TentativeType] + public function add( + #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $index, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value + ): void {} + + /** + * Pops a node from the end of the doubly linked list + * @link https://php.net/manual/en/spldoublylinkedlist.pop.php + * @return TValue The value of the popped node. + */ + #[TentativeType] + public function pop(): mixed {} + + /** + * Shifts a node from the beginning of the doubly linked list + * @link https://php.net/manual/en/spldoublylinkedlist.shift.php + * @return TValue The value of the shifted node. + */ + #[TentativeType] + public function shift(): mixed {} + + /** + * Pushes an element at the end of the doubly linked list + * @link https://php.net/manual/en/spldoublylinkedlist.push.php + * @param TValue $value+ * The value to push. + *
+ * @return void + */ + #[TentativeType] + public function push(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Prepends the doubly linked list with an element + * @link https://php.net/manual/en/spldoublylinkedlist.unshift.php + * @param TValue $value+ * The value to unshift. + *
+ * @return void + */ + #[TentativeType] + public function unshift(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Peeks at the node from the end of the doubly linked list + * @link https://php.net/manual/en/spldoublylinkedlist.top.php + * @return TValue The value of the last node. + */ + #[TentativeType] + public function top(): mixed {} + + /** + * Peeks at the node from the beginning of the doubly linked list + * @link https://php.net/manual/en/spldoublylinkedlist.bottom.php + * @return TValue The value of the first node. + */ + #[TentativeType] + public function bottom(): mixed {} + + /** + * Counts the number of elements in the doubly linked list. + * @link https://php.net/manual/en/spldoublylinkedlist.count.php + * @return int the number of elements in the doubly linked list. + */ + #[TentativeType] + public function count(): int {} + + /** + * Checks whether the doubly linked list is empty. + * @link https://php.net/manual/en/spldoublylinkedlist.isempty.php + * @return bool whether the doubly linked list is empty. + */ + #[TentativeType] + public function isEmpty(): bool {} + + /** + * Sets the mode of iteration + * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php + * @param int $mode+ * There are two orthogonal sets of modes that can be set: + *
+ * The direction of the iteration (either one or the other): + * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) + * @return int + */ + #[TentativeType] + public function setIteratorMode(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $mode): int {} + + /** + * Returns the mode of iteration + * @link https://php.net/manual/en/spldoublylinkedlist.getiteratormode.php + * @return int the different modes and flags that affect the iteration. + */ + #[TentativeType] + public function getIteratorMode(): int {} + + /** + * Returns whether the requested $index exists + * @link https://php.net/manual/en/spldoublylinkedlist.offsetexists.php + * @param mixed $index+ * The index being checked. + *
+ * @return bool true if the requested index exists, otherwise false + */ + #[TentativeType] + public function offsetExists($index): bool {} + + /** + * Returns the value at the specified $index + * @link https://php.net/manual/en/spldoublylinkedlist.offsetget.php + * @param mixed $index+ * The index with the value. + *
+ * @return TValue The value at the specified index. + */ + #[TentativeType] + public function offsetGet($index): mixed {} + + /** + * Sets the value at the specified $index to $newval + * @link https://php.net/manual/en/spldoublylinkedlist.offsetset.php + * @param mixed $index+ * The index being set. + *
+ * @param TValue $value+ * The new value for the index. + *
+ * @return void + */ + #[TentativeType] + public function offsetSet($index, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Unsets the value at the specified $index + * @link https://php.net/manual/en/spldoublylinkedlist.offsetunset.php + * @param mixed $index+ * The index being unset. + *
+ * @return void + */ + #[TentativeType] + public function offsetUnset($index): void {} + + /** + * Rewind iterator back to the start + * @link https://php.net/manual/en/spldoublylinkedlist.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Return current array entry + * @link https://php.net/manual/en/spldoublylinkedlist.current.php + * @return TValue The current node value. + */ + #[TentativeType] + public function current(): mixed {} + + /** + * Return current node index + * @link https://php.net/manual/en/spldoublylinkedlist.key.php + * @return string|float|int|bool|null The current node index. + */ + #[TentativeType] + public function key(): int {} + + /** + * Move to next entry + * @link https://php.net/manual/en/spldoublylinkedlist.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Move to previous entry + * @link https://php.net/manual/en/spldoublylinkedlist.prev.php + * @return void + */ + #[TentativeType] + public function prev(): void {} + + /** + * Check whether the doubly linked list contains more nodes + * @link https://php.net/manual/en/spldoublylinkedlist.valid.php + * @return bool true if the doubly linked list contains any more nodes, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Unserializes the storage + * @link https://php.net/manual/en/spldoublylinkedlist.serialize.php + * @param string $data The serialized string. + * @return void + * @since 5.4 + */ + #[TentativeType] + public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {} + + /** + * Serializes the storage + * @link https://php.net/manual/en/spldoublylinkedlist.unserialize.php + * @return string The serialized string. + * @since 5.4 + */ + #[TentativeType] + public function serialize(): string {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __serialize(): array {} + + /** + * @param array $data + * @since 7.4 + */ + #[TentativeType] + public function __unserialize(array $data): void {} } /** @@ -1334,36 +1334,36 @@ public function __unserialize(array $data): void {} */ class SplQueue extends SplDoublyLinkedList { - /** - * Adds an element to the queue. - * @link https://php.net/manual/en/splqueue.enqueue.php - * @param TValue $value- * The value to enqueue. - *
- * @return void - */ - #[TentativeType] - public function enqueue(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} - - /** - * Dequeues a node from the queue - * @link https://php.net/manual/en/splqueue.dequeue.php - * @return TValue The value of the dequeued node. - */ - #[TentativeType] - public function dequeue(): mixed {} - - /** - * Sets the mode of iteration - * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php - * @param int $mode- * There are two orthogonal sets of modes that can be set: - *
- * The direction of the iteration (either one or the other): - * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) - * @return void - */ - public function setIteratorMode($mode) {} + /** + * Adds an element to the queue. + * @link https://php.net/manual/en/splqueue.enqueue.php + * @param TValue $value+ * The value to enqueue. + *
+ * @return void + */ + #[TentativeType] + public function enqueue(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Dequeues a node from the queue + * @link https://php.net/manual/en/splqueue.dequeue.php + * @return TValue The value of the dequeued node. + */ + #[TentativeType] + public function dequeue(): mixed {} + + /** + * Sets the mode of iteration + * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php + * @param int $mode+ * There are two orthogonal sets of modes that can be set: + *
+ * The direction of the iteration (either one or the other): + * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) + * @return void + */ + public function setIteratorMode($mode) {} } /** @@ -1374,17 +1374,17 @@ public function setIteratorMode($mode) {} */ class SplStack extends SplDoublyLinkedList { - /** - * Sets the mode of iteration - * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php - * @param int $mode- * There are two orthogonal sets of modes that can be set: - *
- * The direction of the iteration (either one or the other): - * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) - * @return void - */ - public function setIteratorMode($mode) {} + /** + * Sets the mode of iteration + * @link https://php.net/manual/en/spldoublylinkedlist.setiteratormode.php + * @param int $mode+ * There are two orthogonal sets of modes that can be set: + *
+ * The direction of the iteration (either one or the other): + * SplDoublyLinkedList::IT_MODE_LIFO (Stack style) + * @return void + */ + public function setIteratorMode($mode) {} } /** @@ -1395,125 +1395,125 @@ public function setIteratorMode($mode) {} */ abstract class SplHeap implements Iterator, Countable { - /** - * Extracts a node from top of the heap and sift up. - * @link https://php.net/manual/en/splheap.extract.php - * @return TValue The value of the extracted node. - */ - #[TentativeType] - public function extract(): mixed {} - - /** - * Inserts an element in the heap by sifting it up. - * @link https://php.net/manual/en/splheap.insert.php - * @param TValue $value- * The value to insert. - *
- * @return bool - */ - #[TentativeType] - public function insert(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): bool {} - - /** - * Peeks at the node from the top of the heap - * @link https://php.net/manual/en/splheap.top.php - * @return TValue The value of the node on the top. - */ - #[TentativeType] - public function top(): mixed {} - - /** - * Counts the number of elements in the heap. - * @link https://php.net/manual/en/splheap.count.php - * @return int the number of elements in the heap. - */ - #[TentativeType] - public function count(): int {} - - /** - * Checks whether the heap is empty. - * @link https://php.net/manual/en/splheap.isempty.php - * @return bool whether the heap is empty. - */ - #[TentativeType] - public function isEmpty(): bool {} - - /** - * Rewind iterator back to the start (no-op) - * @link https://php.net/manual/en/splheap.rewind.php - * @return void - */ - #[TentativeType] - public function rewind(): void {} - - /** - * Return current node pointed by the iterator - * @link https://php.net/manual/en/splheap.current.php - * @return TValue The current node value. - */ - #[TentativeType] - public function current(): mixed {} - - /** - * Return current node index - * @link https://php.net/manual/en/splheap.key.php - * @return int The current node index. - */ - #[TentativeType] - public function key(): int {} - - /** - * Move to the next node - * @link https://php.net/manual/en/splheap.next.php - * @return void - */ - #[TentativeType] - public function next(): void {} - - /** - * Check whether the heap contains more nodes - * @link https://php.net/manual/en/splheap.valid.php - * @return bool true if the heap contains any more nodes, false otherwise. - */ - #[TentativeType] - public function valid(): bool {} - - /** - * Recover from the corrupted state and allow further actions on the heap. - * @link https://php.net/manual/en/splheap.recoverfromcorruption.php - * @return bool - */ - #[TentativeType] - public function recoverFromCorruption(): bool {} - - /** - * Compare elements in order to place them correctly in the heap while sifting up. - * @link https://php.net/manual/en/splheap.compare.php - * @param mixed $value1- * The value of the first node being compared. - *
- * @param mixed $value2- * The value of the second node being compared. - *
- * @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. - */ - abstract protected function compare($value1, $value2); - - /** - * @return bool - */ - #[TentativeType] - public function isCorrupted(): bool {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __debugInfo(): array {} + /** + * Extracts a node from top of the heap and sift up. + * @link https://php.net/manual/en/splheap.extract.php + * @return TValue The value of the extracted node. + */ + #[TentativeType] + public function extract(): mixed {} + + /** + * Inserts an element in the heap by sifting it up. + * @link https://php.net/manual/en/splheap.insert.php + * @param TValue $value
+ * The value to insert. + *
+ * @return bool + */ + #[TentativeType] + public function insert(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): bool {} + + /** + * Peeks at the node from the top of the heap + * @link https://php.net/manual/en/splheap.top.php + * @return TValue The value of the node on the top. + */ + #[TentativeType] + public function top(): mixed {} + + /** + * Counts the number of elements in the heap. + * @link https://php.net/manual/en/splheap.count.php + * @return int the number of elements in the heap. + */ + #[TentativeType] + public function count(): int {} + + /** + * Checks whether the heap is empty. + * @link https://php.net/manual/en/splheap.isempty.php + * @return bool whether the heap is empty. + */ + #[TentativeType] + public function isEmpty(): bool {} + + /** + * Rewind iterator back to the start (no-op) + * @link https://php.net/manual/en/splheap.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Return current node pointed by the iterator + * @link https://php.net/manual/en/splheap.current.php + * @return TValue The current node value. + */ + #[TentativeType] + public function current(): mixed {} + + /** + * Return current node index + * @link https://php.net/manual/en/splheap.key.php + * @return int The current node index. + */ + #[TentativeType] + public function key(): int {} + + /** + * Move to the next node + * @link https://php.net/manual/en/splheap.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Check whether the heap contains more nodes + * @link https://php.net/manual/en/splheap.valid.php + * @return bool true if the heap contains any more nodes, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Recover from the corrupted state and allow further actions on the heap. + * @link https://php.net/manual/en/splheap.recoverfromcorruption.php + * @return bool + */ + #[TentativeType] + public function recoverFromCorruption(): bool {} + + /** + * Compare elements in order to place them correctly in the heap while sifting up. + * @link https://php.net/manual/en/splheap.compare.php + * @param mixed $value1+ * The value of the first node being compared. + *
+ * @param mixed $value2+ * The value of the second node being compared. + *
+ * @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. + */ + abstract protected function compare($value1, $value2); + + /** + * @return bool + */ + #[TentativeType] + public function isCorrupted(): bool {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} } /** @@ -1524,105 +1524,105 @@ public function __debugInfo(): array {} */ class SplMinHeap extends SplHeap { - /** - * Compare elements in order to place them correctly in the heap while sifting up. - * @link https://php.net/manual/en/splminheap.compare.php - * @param TValue $value1
- * The value of the first node being compared. - *
- * @param TValue $value2- * The value of the second node being compared. - *
- * @return int Result of the comparison, positive integer if value1 is lower 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. - */ - #[TentativeType] - protected function compare( - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value1, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value2 - ): int {} - - /** - * Extracts a node from top of the heap and sift up. - * @link https://php.net/manual/en/splheap.extract.php - * @return TValue The value of the extracted node. - */ - public function extract() {} - - /** - * Inserts an element in the heap by sifting it up. - * @link https://php.net/manual/en/splheap.insert.php - * @param TValue $value
- * The value to insert. - *
- * @return true - */ - public function insert($value) {} - - /** - * Peeks at the node from the top of the heap - * @link https://php.net/manual/en/splheap.top.php - * @return TValue The value of the node on the top. - */ - public function top() {} - - /** - * Counts the number of elements in the heap. - * @link https://php.net/manual/en/splheap.count.php - * @return int the number of elements in the heap. - */ - public function count() {} - - /** - * Checks whether the heap is empty. - * @link https://php.net/manual/en/splheap.isempty.php - * @return bool whether the heap is empty. - */ - public function isEmpty() {} - - /** - * Rewind iterator back to the start (no-op) - * @link https://php.net/manual/en/splheap.rewind.php - * @return void - */ - public function rewind() {} - - /** - * Return current node pointed by the iterator - * @link https://php.net/manual/en/splheap.current.php - * @return TValue The current node value. - */ - public function current() {} - - /** - * Return current node index - * @link https://php.net/manual/en/splheap.key.php - * @return int The current node index. - */ - public function key() {} - - /** - * Move to the next node - * @link https://php.net/manual/en/splheap.next.php - * @return void - */ - public function next() {} - - /** - * Check whether the heap contains more nodes - * @link https://php.net/manual/en/splheap.valid.php - * @return bool true if the heap contains any more nodes, false otherwise. - */ - public function valid() {} - - /** - * Recover from the corrupted state and allow further actions on the heap. - * @link https://php.net/manual/en/splheap.recoverfromcorruption.php - * @return void - */ - public function recoverFromCorruption() {} + /** + * Compare elements in order to place them correctly in the heap while sifting up. + * @link https://php.net/manual/en/splminheap.compare.php + * @param TValue $value1+ * The value of the first node being compared. + *
+ * @param TValue $value2+ * The value of the second node being compared. + *
+ * @return int Result of the comparison, positive integer if value1 is lower 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. + */ + #[TentativeType] + protected function compare( + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value1, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value2 + ): int {} + + /** + * Extracts a node from top of the heap and sift up. + * @link https://php.net/manual/en/splheap.extract.php + * @return TValue The value of the extracted node. + */ + public function extract() {} + + /** + * Inserts an element in the heap by sifting it up. + * @link https://php.net/manual/en/splheap.insert.php + * @param TValue $value
+ * The value to insert. + *
+ * @return true + */ + public function insert($value) {} + + /** + * Peeks at the node from the top of the heap + * @link https://php.net/manual/en/splheap.top.php + * @return TValue The value of the node on the top. + */ + public function top() {} + + /** + * Counts the number of elements in the heap. + * @link https://php.net/manual/en/splheap.count.php + * @return int the number of elements in the heap. + */ + public function count() {} + + /** + * Checks whether the heap is empty. + * @link https://php.net/manual/en/splheap.isempty.php + * @return bool whether the heap is empty. + */ + public function isEmpty() {} + + /** + * Rewind iterator back to the start (no-op) + * @link https://php.net/manual/en/splheap.rewind.php + * @return void + */ + public function rewind() {} + + /** + * Return current node pointed by the iterator + * @link https://php.net/manual/en/splheap.current.php + * @return TValue The current node value. + */ + public function current() {} + + /** + * Return current node index + * @link https://php.net/manual/en/splheap.key.php + * @return int The current node index. + */ + public function key() {} + + /** + * Move to the next node + * @link https://php.net/manual/en/splheap.next.php + * @return void + */ + public function next() {} + + /** + * Check whether the heap contains more nodes + * @link https://php.net/manual/en/splheap.valid.php + * @return bool true if the heap contains any more nodes, false otherwise. + */ + public function valid() {} + + /** + * Recover from the corrupted state and allow further actions on the heap. + * @link https://php.net/manual/en/splheap.recoverfromcorruption.php + * @return void + */ + public function recoverFromCorruption() {} } /** @@ -1633,25 +1633,25 @@ public function recoverFromCorruption() {} */ class SplMaxHeap extends SplHeap { - /** - * Compare elements in order to place them correctly in the heap while sifting up. - * @link https://php.net/manual/en/splmaxheap.compare.php - * @param TValue $value1- * The value of the first node being compared. - *
- * @param TValue $value2- * The value of the second node being compared. - *
- * @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. - */ - #[TentativeType] - protected function compare( - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value1, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value2 - ): int {} + /** + * Compare elements in order to place them correctly in the heap while sifting up. + * @link https://php.net/manual/en/splmaxheap.compare.php + * @param TValue $value1
+ * The value of the first node being compared. + *
+ * @param TValue $value2+ * The value of the second node being compared. + *
+ * @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. + */ + #[TentativeType] + protected function compare( + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value1, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value2 + ): int {} } /** @@ -1664,157 +1664,157 @@ protected function compare( */ class SplPriorityQueue implements Iterator, Countable { - public const EXTR_BOTH = 3; - public const EXTR_PRIORITY = 2; - public const EXTR_DATA = 1; - - /** - * Compare priorities in order to place elements correctly in the heap while sifting up. - * @link https://php.net/manual/en/splpriorityqueue.compare.php - * @param TPriority $priority1
- * The priority of the first node being compared. - *
- * @param TPriority $priority2- * The priority of the second node being compared. - *
- * @return int Result of the comparison, positive integer if priority1 is greater than priority2, 0 if they are equal, negative integer otherwise. - * - *- * Multiple elements with the same priority will get dequeued in no particular order. - */ - #[TentativeType] - public function compare( - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority1, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority2 - ): int {} - - /** - * Inserts an element in the queue by sifting it up. - * @link https://php.net/manual/en/splpriorityqueue.insert.php - * @param TValue $value
- * The value to insert. - *
- * @param TPriority $priority- * The associated priority. - *
- * @return true - */ - public function insert( - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority - ) {} - - /** - * Sets the mode of extraction - * @link https://php.net/manual/en/splpriorityqueue.setextractflags.php - * @param int $flags- * Defines what is extracted by SplPriorityQueue::current, - * SplPriorityQueue::top and - * SplPriorityQueue::extract. - *
- * SplPriorityQueue::EXTR_DATA (0x00000001): Extract the data - * @return int - */ - #[TentativeType] - public function setExtractFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): int {} - - /** - * Peeks at the node from the top of the queue - * @link https://php.net/manual/en/splpriorityqueue.top.php - * @return TValue The value or priority (or both) of the top node, depending on the extract flag. - */ - #[TentativeType] - public function top(): mixed {} - - /** - * Extracts a node from top of the heap and sift up. - * @link https://php.net/manual/en/splpriorityqueue.extract.php - * @return TValue The value or priority (or both) of the extracted node, depending on the extract flag. - */ - #[TentativeType] - public function extract(): mixed {} - - /** - * Counts the number of elements in the queue. - * @link https://php.net/manual/en/splpriorityqueue.count.php - * @return int the number of elements in the queue. - */ - #[TentativeType] - public function count(): int {} - - /** - * Checks whether the queue is empty. - * @link https://php.net/manual/en/splpriorityqueue.isempty.php - * @return bool whether the queue is empty. - */ - #[TentativeType] - public function isEmpty(): bool {} - - /** - * Rewind iterator back to the start (no-op) - * @link https://php.net/manual/en/splpriorityqueue.rewind.php - * @return void - */ - #[TentativeType] - public function rewind(): void {} - - /** - * Return current node pointed by the iterator - * @link https://php.net/manual/en/splpriorityqueue.current.php - * @return TValue The value or priority (or both) of the current node, depending on the extract flag. - */ - #[TentativeType] - public function current(): mixed {} - - /** - * Return current node index - * @link https://php.net/manual/en/splpriorityqueue.key.php - * @return int The current node index. - */ - #[TentativeType] - public function key(): int {} - - /** - * Move to the next node - * @link https://php.net/manual/en/splpriorityqueue.next.php - * @return void - */ - #[TentativeType] - public function next(): void {} - - /** - * Check whether the queue contains more nodes - * @link https://php.net/manual/en/splpriorityqueue.valid.php - * @return bool true if the queue contains any more nodes, false otherwise. - */ - #[TentativeType] - public function valid(): bool {} - - /** - * Recover from the corrupted state and allow further actions on the queue. - * @link https://php.net/manual/en/splpriorityqueue.recoverfromcorruption.php - * @return void - */ - public function recoverFromCorruption() {} - - /** - * @return bool - */ - #[TentativeType] - public function isCorrupted(): bool {} - - /** - * @return int - */ - #[TentativeType] - public function getExtractFlags(): int {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __debugInfo(): array {} + public const EXTR_BOTH = 3; + public const EXTR_PRIORITY = 2; + public const EXTR_DATA = 1; + + /** + * Compare priorities in order to place elements correctly in the heap while sifting up. + * @link https://php.net/manual/en/splpriorityqueue.compare.php + * @param TPriority $priority1+ * The priority of the first node being compared. + *
+ * @param TPriority $priority2+ * The priority of the second node being compared. + *
+ * @return int Result of the comparison, positive integer if priority1 is greater than priority2, 0 if they are equal, negative integer otherwise. + * + *+ * Multiple elements with the same priority will get dequeued in no particular order. + */ + #[TentativeType] + public function compare( + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority1, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority2 + ): int {} + + /** + * Inserts an element in the queue by sifting it up. + * @link https://php.net/manual/en/splpriorityqueue.insert.php + * @param TValue $value
+ * The value to insert. + *
+ * @param TPriority $priority+ * The associated priority. + *
+ * @return true + */ + public function insert( + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $priority + ) {} + + /** + * Sets the mode of extraction + * @link https://php.net/manual/en/splpriorityqueue.setextractflags.php + * @param int $flags+ * Defines what is extracted by SplPriorityQueue::current, + * SplPriorityQueue::top and + * SplPriorityQueue::extract. + *
+ * SplPriorityQueue::EXTR_DATA (0x00000001): Extract the data + * @return int + */ + #[TentativeType] + public function setExtractFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): int {} + + /** + * Peeks at the node from the top of the queue + * @link https://php.net/manual/en/splpriorityqueue.top.php + * @return TValue The value or priority (or both) of the top node, depending on the extract flag. + */ + #[TentativeType] + public function top(): mixed {} + + /** + * Extracts a node from top of the heap and sift up. + * @link https://php.net/manual/en/splpriorityqueue.extract.php + * @return TValue The value or priority (or both) of the extracted node, depending on the extract flag. + */ + #[TentativeType] + public function extract(): mixed {} + + /** + * Counts the number of elements in the queue. + * @link https://php.net/manual/en/splpriorityqueue.count.php + * @return int the number of elements in the queue. + */ + #[TentativeType] + public function count(): int {} + + /** + * Checks whether the queue is empty. + * @link https://php.net/manual/en/splpriorityqueue.isempty.php + * @return bool whether the queue is empty. + */ + #[TentativeType] + public function isEmpty(): bool {} + + /** + * Rewind iterator back to the start (no-op) + * @link https://php.net/manual/en/splpriorityqueue.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Return current node pointed by the iterator + * @link https://php.net/manual/en/splpriorityqueue.current.php + * @return TValue The value or priority (or both) of the current node, depending on the extract flag. + */ + #[TentativeType] + public function current(): mixed {} + + /** + * Return current node index + * @link https://php.net/manual/en/splpriorityqueue.key.php + * @return int The current node index. + */ + #[TentativeType] + public function key(): int {} + + /** + * Move to the next node + * @link https://php.net/manual/en/splpriorityqueue.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Check whether the queue contains more nodes + * @link https://php.net/manual/en/splpriorityqueue.valid.php + * @return bool true if the queue contains any more nodes, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Recover from the corrupted state and allow further actions on the queue. + * @link https://php.net/manual/en/splpriorityqueue.recoverfromcorruption.php + * @return void + */ + public function recoverFromCorruption() {} + + /** + * @return bool + */ + #[TentativeType] + public function isCorrupted(): bool {} + + /** + * @return int + */ + #[TentativeType] + public function getExtractFlags(): int {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} } /** @@ -1831,166 +1831,166 @@ public function __debugInfo(): array {} */ class SplFixedArray implements Iterator, ArrayAccess, Countable, IteratorAggregate, JsonSerializable { - /** - * Constructs a new fixed array - * @link https://php.net/manual/en/splfixedarray.construct.php - * @param int $size [optional] - */ - public function __construct(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size = 0) {} - - /** - * Returns the size of the array - * @link https://php.net/manual/en/splfixedarray.count.php - * @return int the size of the array. - */ - #[TentativeType] - public function count(): int {} - - /** - * Returns a PHP array from the fixed array - * @link https://php.net/manual/en/splfixedarray.toarray.php - * @return TValue[] a PHP array, similar to the fixed array. - */ - #[TentativeType] - public function toArray(): array {} - - /** - * Import a PHP array in a SplFixedArray instance - * @link https://php.net/manual/en/splfixedarray.fromarray.php - * @param array $array- * The array to import. - *
- * @param bool $preserveKeys [optional]- * Try to save the numeric indexes used in the original array. - *
- * @return SplFixedArray an instance of SplFixedArray - * containing the array content. - */ - #[TentativeType] - public static function fromArray( - #[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $array, - #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $preserveKeys = true - ): SplFixedArray {} - - /** - * Gets the size of the array - * @link https://php.net/manual/en/splfixedarray.getsize.php - * @return int the size of the array, as an integer. - */ - #[TentativeType] - public function getSize(): int {} - - /** - * Change the size of an array - * @link https://php.net/manual/en/splfixedarray.setsize.php - * @param int $size- * The new array size. - *
- * @return bool - */ - public function setSize(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size) {} - - /** - * Returns whether the requested index exists - * @link https://php.net/manual/en/splfixedarray.offsetexists.php - * @param int $index- * The index being checked. - *
- * @return bool true if the requested index exists, otherwise false - */ - #[TentativeType] - public function offsetExists($index): bool {} - - /** - * Returns the value at the specified index - * @link https://php.net/manual/en/splfixedarray.offsetget.php - * @param int $index- * The index with the value. - *
- * @return TValue The value at the specified index. - */ - #[TentativeType] - public function offsetGet($index): mixed {} - - /** - * Sets a new value at a specified index - * @link https://php.net/manual/en/splfixedarray.offsetset.php - * @param int $index- * The index being set. - *
- * @param TValue $value- * The new value for the index. - *
- * @return void - */ - #[TentativeType] - public function offsetSet($index, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} - - /** - * Unsets the value at the specified $index - * @link https://php.net/manual/en/splfixedarray.offsetunset.php - * @param int $index- * The index being unset. - *
- * @return void - */ - #[TentativeType] - public function offsetUnset($index): void {} - - /** - * Rewind iterator back to the start - * @link https://php.net/manual/en/splfixedarray.rewind.php - * @return void - */ - public function rewind() {} - - /** - * Return current array entry - * @link https://php.net/manual/en/splfixedarray.current.php - * @return TValue The current element value. - */ - public function current() {} - - /** - * Return current array index - * @link https://php.net/manual/en/splfixedarray.key.php - * @return int The current array index. - */ - public function key() {} - - /** - * Move to next entry - * @link https://php.net/manual/en/splfixedarray.next.php - * @return void - */ - public function next() {} - - /** - * Check whether the array contains more elements - * @link https://php.net/manual/en/splfixedarray.valid.php - * @return bool true if the array contains any more elements, false otherwise. - */ - #[TentativeType] - public function valid(): bool {} - - #[TentativeType] - public function __wakeup(): void {} - - #[PhpStormStubsElementAvailable(from: '8.2')] - public function __serialize(): array {} - - /** - * @param array $data - */ - #[PhpStormStubsElementAvailable(from: '8.2')] - public function __unserialize(array $data): void {} - - /** - * @return Iterator+ * The array to import. + *
+ * @param bool $preserveKeys [optional]+ * Try to save the numeric indexes used in the original array. + *
+ * @return SplFixedArray an instance of SplFixedArray + * containing the array content. + */ + #[TentativeType] + public static function fromArray( + #[LanguageLevelTypeAware(['8.0' => 'array'], default: '')] $array, + #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $preserveKeys = true + ): SplFixedArray {} + + /** + * Gets the size of the array + * @link https://php.net/manual/en/splfixedarray.getsize.php + * @return int the size of the array, as an integer. + */ + #[TentativeType] + public function getSize(): int {} + + /** + * Change the size of an array + * @link https://php.net/manual/en/splfixedarray.setsize.php + * @param int $size+ * The new array size. + *
+ * @return bool + */ + public function setSize(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $size) {} + + /** + * Returns whether the requested index exists + * @link https://php.net/manual/en/splfixedarray.offsetexists.php + * @param int $index+ * The index being checked. + *
+ * @return bool true if the requested index exists, otherwise false + */ + #[TentativeType] + public function offsetExists($index): bool {} + + /** + * Returns the value at the specified index + * @link https://php.net/manual/en/splfixedarray.offsetget.php + * @param int $index+ * The index with the value. + *
+ * @return TValue The value at the specified index. + */ + #[TentativeType] + public function offsetGet($index): mixed {} + + /** + * Sets a new value at a specified index + * @link https://php.net/manual/en/splfixedarray.offsetset.php + * @param int $index+ * The index being set. + *
+ * @param TValue $value+ * The new value for the index. + *
+ * @return void + */ + #[TentativeType] + public function offsetSet($index, #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $value): void {} + + /** + * Unsets the value at the specified $index + * @link https://php.net/manual/en/splfixedarray.offsetunset.php + * @param int $index+ * The index being unset. + *
+ * @return void + */ + #[TentativeType] + public function offsetUnset($index): void {} + + /** + * Rewind iterator back to the start + * @link https://php.net/manual/en/splfixedarray.rewind.php + * @return void + */ + public function rewind() {} + + /** + * Return current array entry + * @link https://php.net/manual/en/splfixedarray.current.php + * @return TValue The current element value. + */ + public function current() {} + + /** + * Return current array index + * @link https://php.net/manual/en/splfixedarray.key.php + * @return int The current array index. + */ + public function key() {} + + /** + * Move to next entry + * @link https://php.net/manual/en/splfixedarray.next.php + * @return void + */ + public function next() {} + + /** + * Check whether the array contains more elements + * @link https://php.net/manual/en/splfixedarray.valid.php + * @return bool true if the array contains any more elements, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + #[TentativeType] + public function __wakeup(): void {} + + #[PhpStormStubsElementAvailable(from: '8.2')] + public function __serialize(): array {} + + /** + * @param array $data + */ + #[PhpStormStubsElementAvailable(from: '8.2')] + public function __unserialize(array $data): void {} + + /** + * @return Iterator- * The SplSubject notifying the observer of an update. - *
- * @return void - */ - #[TentativeType] - public function update(SplSubject $subject): void; + /** + * Receive update from subject + * @link https://php.net/manual/en/splobserver.update.php + * @param SplSubject $subject+ * The SplSubject notifying the observer of an update. + *
+ * @return void + */ + #[TentativeType] + public function update(SplSubject $subject): void; } /** @@ -2019,35 +2019,35 @@ public function update(SplSubject $subject): void; */ interface SplSubject { - /** - * Attach an SplObserver - * @link https://php.net/manual/en/splsubject.attach.php - * @param SplObserver $observer- * The SplObserver to attach. - *
- * @return void - */ - #[TentativeType] - public function attach(SplObserver $observer): void; - - /** - * Detach an observer - * @link https://php.net/manual/en/splsubject.detach.php - * @param SplObserver $observer- * The SplObserver to detach. - *
- * @return void - */ - #[TentativeType] - public function detach(SplObserver $observer): void; - - /** - * Notify an observer - * @link https://php.net/manual/en/splsubject.notify.php - * @return void - */ - #[TentativeType] - public function notify(): void; + /** + * Attach an SplObserver + * @link https://php.net/manual/en/splsubject.attach.php + * @param SplObserver $observer+ * The SplObserver to attach. + *
+ * @return void + */ + #[TentativeType] + public function attach(SplObserver $observer): void; + + /** + * Detach an observer + * @link https://php.net/manual/en/splsubject.detach.php + * @param SplObserver $observer+ * The SplObserver to detach. + *
+ * @return void + */ + #[TentativeType] + public function detach(SplObserver $observer): void; + + /** + * Notify an observer + * @link https://php.net/manual/en/splsubject.notify.php + * @return void + */ + #[TentativeType] + public function notify(): void; } /** @@ -2062,251 +2062,251 @@ public function notify(): void; */ class SplObjectStorage implements Countable, Iterator, Serializable, ArrayAccess { - /** - * Adds an object in the storage - * @link https://php.net/manual/en/splobjectstorage.attach.php - * @param TObject $object- * The object to add. - *
- * @param TValue $info [optional]- * The data to associate with the object. - *
- * @return void - */ - #[TentativeType] - public function attach( - #[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info = null - ): void {} - - /** - * Removes an object from the storage - * @link https://php.net/manual/en/splobjectstorage.detach.php - * @param TObject $object- * The object to remove. - *
- * @return void - */ - #[TentativeType] - public function detach(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): void {} - - /** - * Checks if the storage contains a specific object - * @link https://php.net/manual/en/splobjectstorage.contains.php - * @param TObject $object- * The object to look for. - *
- * @return bool true if the object is in the storage, false otherwise. - */ - #[TentativeType] - public function contains(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): bool {} - - /** - * Adds all objects from another storage - * @link https://php.net/manual/en/splobjectstorage.addall.php - * @param SplObjectStorage- * The storage you want to import. - *
- * @return int - */ - #[TentativeType] - public function addAll(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} - - /** - * Removes objects contained in another storage from the current storage - * @link https://php.net/manual/en/splobjectstorage.removeall.php - * @param SplObjectStorage- * The storage containing the elements to remove. - *
- * @return int - */ - #[TentativeType] - public function removeAll(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} - - /** - * Removes all objects except for those contained in another storage from the current storage - * @link https://php.net/manual/en/splobjectstorage.removeallexcept.php - * @param SplObjectStorage- * The storage containing the elements to retain in the current storage. - *
- * @return int - * @since 5.3.6 - */ - #[TentativeType] - public function removeAllExcept(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} - - /** - * Returns the data associated with the current iterator entry - * @link https://php.net/manual/en/splobjectstorage.getinfo.php - * @return TValue The data associated with the current iterator position. - */ - #[TentativeType] - public function getInfo(): mixed {} - - /** - * Sets the data associated with the current iterator entry - * @link https://php.net/manual/en/splobjectstorage.setinfo.php - * @param TValue $info- * The data to associate with the current iterator entry. - *
- * @return void - */ - #[TentativeType] - public function setInfo(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info): void {} - - /** - * Returns the number of objects in the storage - * @link https://php.net/manual/en/splobjectstorage.count.php - * @param int $mode [optional] - * @return int The number of objects in the storage. - */ - #[TentativeType] - public function count(#[PhpStormStubsElementAvailable(from: '8.0')] int $mode = COUNT_NORMAL): int {} - - /** - * Rewind the iterator to the first storage element - * @link https://php.net/manual/en/splobjectstorage.rewind.php - * @return void - */ - #[TentativeType] - public function rewind(): void {} - - /** - * Returns if the current iterator entry is valid - * @link https://php.net/manual/en/splobjectstorage.valid.php - * @return bool true if the iterator entry is valid, false otherwise. - */ - #[TentativeType] - public function valid(): bool {} - - /** - * Returns the index at which the iterator currently is - * @link https://php.net/manual/en/splobjectstorage.key.php - * @return int The index corresponding to the position of the iterator. - */ - #[TentativeType] - public function key(): int {} - - /** - * Returns the current storage entry - * @link https://php.net/manual/en/splobjectstorage.current.php - * @return TObject The object at the current iterator position. - */ - #[TentativeType] - public function current(): object {} - - /** - * Move to the next entry - * @link https://php.net/manual/en/splobjectstorage.next.php - * @return void - */ - #[TentativeType] - public function next(): void {} - - /** - * Unserializes a storage from its string representation - * @link https://php.net/manual/en/splobjectstorage.unserialize.php - * @param string $data- * The serialized representation of a storage. - *
- * @return void - * @since 5.2.2 - */ - #[TentativeType] - public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {} - - /** - * Serializes the storage - * @link https://php.net/manual/en/splobjectstorage.serialize.php - * @return string A string representing the storage. - * @since 5.2.2 - */ - #[TentativeType] - public function serialize(): string {} - - /** - * Checks whether an object exists in the storage - * @link https://php.net/manual/en/splobjectstorage.offsetexists.php - * @param TObject $object- * The object to look for. - *
- * @return bool true if the object exists in the storage, - * and false otherwise. - */ - #[TentativeType] - public function offsetExists($object): bool {} - - /** - * Associates data to an object in the storage - * @link https://php.net/manual/en/splobjectstorage.offsetset.php - * @param TObject $object- * The object to associate data with. - *
- * @param TValue $info [optional]- * The data to associate with the object. - *
- * @return void - */ - #[TentativeType] - public function offsetSet( - #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')] $object, - #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info = null - ): void {} - - /** - * Removes an object from the storage - * @link https://php.net/manual/en/splobjectstorage.offsetunset.php - * @param TObject $object- * The object to remove. - *
- * @return void - */ - #[TentativeType] - public function offsetUnset($object): void {} - - /** - * Returns the data associated with an- * The object to look for. - *
- * @return TValue The data previously associated with the object in the storage. - */ - #[TentativeType] - public function offsetGet($object): mixed {} - - /** - * Calculate a unique identifier for the contained objects - * @link https://php.net/manual/en/splobjectstorage.gethash.php - * @param TObject $object- * object whose identifier is to be calculated. - *
- * @return string A string with the calculated identifier. - * @since 5.4 - */ - #[TentativeType] - public function getHash(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): string {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __serialize(): array {} - - /** - * @param array $data - * @since 7.4 - */ - #[TentativeType] - public function __unserialize(array $data): void {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __debugInfo(): array {} + /** + * Adds an object in the storage + * @link https://php.net/manual/en/splobjectstorage.attach.php + * @param TObject $object+ * The object to add. + *
+ * @param TValue $info [optional]+ * The data to associate with the object. + *
+ * @return void + */ + #[TentativeType] + public function attach( + #[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info = null + ): void {} + + /** + * Removes an object from the storage + * @link https://php.net/manual/en/splobjectstorage.detach.php + * @param TObject $object+ * The object to remove. + *
+ * @return void + */ + #[TentativeType] + public function detach(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): void {} + + /** + * Checks if the storage contains a specific object + * @link https://php.net/manual/en/splobjectstorage.contains.php + * @param TObject $object+ * The object to look for. + *
+ * @return bool true if the object is in the storage, false otherwise. + */ + #[TentativeType] + public function contains(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): bool {} + + /** + * Adds all objects from another storage + * @link https://php.net/manual/en/splobjectstorage.addall.php + * @param SplObjectStorage+ * The storage you want to import. + *
+ * @return int + */ + #[TentativeType] + public function addAll(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} + + /** + * Removes objects contained in another storage from the current storage + * @link https://php.net/manual/en/splobjectstorage.removeall.php + * @param SplObjectStorage+ * The storage containing the elements to remove. + *
+ * @return int + */ + #[TentativeType] + public function removeAll(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} + + /** + * Removes all objects except for those contained in another storage from the current storage + * @link https://php.net/manual/en/splobjectstorage.removeallexcept.php + * @param SplObjectStorage+ * The storage containing the elements to retain in the current storage. + *
+ * @return int + * @since 5.3.6 + */ + #[TentativeType] + public function removeAllExcept(#[LanguageLevelTypeAware(['8.0' => 'SplObjectStorage'], default: '')] $storage): int {} + + /** + * Returns the data associated with the current iterator entry + * @link https://php.net/manual/en/splobjectstorage.getinfo.php + * @return TValue The data associated with the current iterator position. + */ + #[TentativeType] + public function getInfo(): mixed {} + + /** + * Sets the data associated with the current iterator entry + * @link https://php.net/manual/en/splobjectstorage.setinfo.php + * @param TValue $info+ * The data to associate with the current iterator entry. + *
+ * @return void + */ + #[TentativeType] + public function setInfo(#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info): void {} + + /** + * Returns the number of objects in the storage + * @link https://php.net/manual/en/splobjectstorage.count.php + * @param int $mode [optional] + * @return int The number of objects in the storage. + */ + #[TentativeType] + public function count(#[PhpStormStubsElementAvailable(from: '8.0')] int $mode = COUNT_NORMAL): int {} + + /** + * Rewind the iterator to the first storage element + * @link https://php.net/manual/en/splobjectstorage.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Returns if the current iterator entry is valid + * @link https://php.net/manual/en/splobjectstorage.valid.php + * @return bool true if the iterator entry is valid, false otherwise. + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Returns the index at which the iterator currently is + * @link https://php.net/manual/en/splobjectstorage.key.php + * @return int The index corresponding to the position of the iterator. + */ + #[TentativeType] + public function key(): int {} + + /** + * Returns the current storage entry + * @link https://php.net/manual/en/splobjectstorage.current.php + * @return TObject The object at the current iterator position. + */ + #[TentativeType] + public function current(): object {} + + /** + * Move to the next entry + * @link https://php.net/manual/en/splobjectstorage.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * Unserializes a storage from its string representation + * @link https://php.net/manual/en/splobjectstorage.unserialize.php + * @param string $data+ * The serialized representation of a storage. + *
+ * @return void + * @since 5.2.2 + */ + #[TentativeType] + public function unserialize(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $data): void {} + + /** + * Serializes the storage + * @link https://php.net/manual/en/splobjectstorage.serialize.php + * @return string A string representing the storage. + * @since 5.2.2 + */ + #[TentativeType] + public function serialize(): string {} + + /** + * Checks whether an object exists in the storage + * @link https://php.net/manual/en/splobjectstorage.offsetexists.php + * @param TObject $object+ * The object to look for. + *
+ * @return bool true if the object exists in the storage, + * and false otherwise. + */ + #[TentativeType] + public function offsetExists($object): bool {} + + /** + * Associates data to an object in the storage + * @link https://php.net/manual/en/splobjectstorage.offsetset.php + * @param TObject $object+ * The object to associate data with. + *
+ * @param TValue $info [optional]+ * The data to associate with the object. + *
+ * @return void + */ + #[TentativeType] + public function offsetSet( + #[LanguageLevelTypeAware(['8.1' => 'mixed'], default: '')] $object, + #[LanguageLevelTypeAware(['8.0' => 'mixed'], default: '')] $info = null + ): void {} + + /** + * Removes an object from the storage + * @link https://php.net/manual/en/splobjectstorage.offsetunset.php + * @param TObject $object+ * The object to remove. + *
+ * @return void + */ + #[TentativeType] + public function offsetUnset($object): void {} + + /** + * Returns the data associated with an+ * The object to look for. + *
+ * @return TValue The data previously associated with the object in the storage. + */ + #[TentativeType] + public function offsetGet($object): mixed {} + + /** + * Calculate a unique identifier for the contained objects + * @link https://php.net/manual/en/splobjectstorage.gethash.php + * @param TObject $object+ * object whose identifier is to be calculated. + *
+ * @return string A string with the calculated identifier. + * @since 5.4 + */ + #[TentativeType] + public function getHash(#[LanguageLevelTypeAware(['8.0' => 'object'], default: '')] $object): string {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __serialize(): array {} + + /** + * @param array $data + * @since 7.4 + */ + #[TentativeType] + public function __unserialize(array $data): void {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} } /** @@ -2315,135 +2315,135 @@ public function __debugInfo(): array {} */ class MultipleIterator implements Iterator { - public const MIT_NEED_ANY = 0; - public const MIT_NEED_ALL = 1; - public const MIT_KEYS_NUMERIC = 0; - public const MIT_KEYS_ASSOC = 2; - - /** - * Constructs a new MultipleIterator - * @link https://php.net/manual/en/multipleiterator.construct.php - * @param int $flags Defaults to MultipleIterator::MIT_NEED_ALL | MultipleIterator::MIT_KEYS_NUMERIC - */ - public function __construct( - #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $flags, - #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = MultipleIterator::MIT_NEED_ALL|MultipleIterator::MIT_KEYS_NUMERIC - ) {} - - /** - * Gets the flag information - * @link https://php.net/manual/en/multipleiterator.getflags.php - * @return int Information about the flags, as an integer. - */ - #[TentativeType] - public function getFlags(): int {} - - /** - * Sets flags - * @link https://php.net/manual/en/multipleiterator.setflags.php - * @param int $flags- * The flags to set, according to the - * Flag Constants - *
- * @return void - */ - #[TentativeType] - public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {} - - /** - * Attaches iterator information - * @link https://php.net/manual/en/multipleiterator.attachiterator.php - * @param Iterator $iterator- * The new iterator to attach. - *
- * @param int|string|null $info [optional]- * The associative information for the Iterator, which must be an - * integer, a string, or null. - *
- * @return void Description... - */ - #[TentativeType] - public function attachIterator(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int|string|null'], default: '')] $info = null): void {} - - /** - * Detaches an iterator - * @link https://php.net/manual/en/multipleiterator.detachiterator.php - * @param Iterator $iterator- * The iterator to detach. - *
- * @return void - */ - #[TentativeType] - public function detachIterator(Iterator $iterator): void {} - - /** - * Checks if an iterator is attached - * @link https://php.net/manual/en/multipleiterator.containsiterator.php - * @param Iterator $iterator- * The iterator to check. - *
- * @return bool true on success or false on failure. - */ - #[TentativeType] - public function containsIterator(Iterator $iterator): bool {} - - /** - * Gets the number of attached iterator instances - * @link https://php.net/manual/en/multipleiterator.countiterators.php - * @return int The number of attached iterator instances (as an integer). - */ - #[TentativeType] - public function countIterators(): int {} - - /** - * Rewinds all attached iterator instances - * @link https://php.net/manual/en/multipleiterator.rewind.php - * @return void - */ - #[TentativeType] - public function rewind(): void {} - - /** - * Checks the validity of sub iterators - * @link https://php.net/manual/en/multipleiterator.valid.php - * @return bool true if one or all sub iterators are valid depending on flags, - * otherwise false - */ - #[TentativeType] - public function valid(): bool {} - - /** - * Gets the registered iterator instances - * @link https://php.net/manual/en/multipleiterator.key.php - * @return array An array of all registered iterator instances, - * or false if no sub iterator is attached. - */ - #[TentativeType] - public function key(): array {} - - /** - * Gets the registered iterator instances - * @link https://php.net/manual/en/multipleiterator.current.php - * @return array An array containing the current values of each attached iterator, - * or false if no iterators are attached. - * @throws RuntimeException if mode MIT_NEED_ALL is set and at least one attached iterator is not valid. - * @throws InvalidArgumentException if a key is NULL and MIT_KEYS_ASSOC is set. - */ - #[TentativeType] - public function current(): array {} - - /** - * Moves all attached iterator instances forward - * @link https://php.net/manual/en/multipleiterator.next.php - * @return void - */ - #[TentativeType] - public function next(): void {} - - /** - * @return array - * @since 7.4 - */ - #[TentativeType] - public function __debugInfo(): array {} + public const MIT_NEED_ANY = 0; + public const MIT_NEED_ALL = 1; + public const MIT_KEYS_NUMERIC = 0; + public const MIT_KEYS_ASSOC = 2; + + /** + * Constructs a new MultipleIterator + * @link https://php.net/manual/en/multipleiterator.construct.php + * @param int $flags Defaults to MultipleIterator::MIT_NEED_ALL | MultipleIterator::MIT_KEYS_NUMERIC + */ + public function __construct( + #[PhpStormStubsElementAvailable(from: '5.3', to: '7.4')] $flags, + #[PhpStormStubsElementAvailable(from: '8.0')] int $flags = MultipleIterator::MIT_NEED_ALL|MultipleIterator::MIT_KEYS_NUMERIC + ) {} + + /** + * Gets the flag information + * @link https://php.net/manual/en/multipleiterator.getflags.php + * @return int Information about the flags, as an integer. + */ + #[TentativeType] + public function getFlags(): int {} + + /** + * Sets flags + * @link https://php.net/manual/en/multipleiterator.setflags.php + * @param int $flags+ * The flags to set, according to the + * Flag Constants + *
+ * @return void + */ + #[TentativeType] + public function setFlags(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags): void {} + + /** + * Attaches iterator information + * @link https://php.net/manual/en/multipleiterator.attachiterator.php + * @param Iterator $iterator+ * The new iterator to attach. + *
+ * @param int|string|null $info [optional]+ * The associative information for the Iterator, which must be an + * integer, a string, or null. + *
+ * @return void Description... + */ + #[TentativeType] + public function attachIterator(Iterator $iterator, #[LanguageLevelTypeAware(['8.0' => 'int|string|null'], default: '')] $info = null): void {} + + /** + * Detaches an iterator + * @link https://php.net/manual/en/multipleiterator.detachiterator.php + * @param Iterator $iterator+ * The iterator to detach. + *
+ * @return void + */ + #[TentativeType] + public function detachIterator(Iterator $iterator): void {} + + /** + * Checks if an iterator is attached + * @link https://php.net/manual/en/multipleiterator.containsiterator.php + * @param Iterator $iterator+ * The iterator to check. + *
+ * @return bool true on success or false on failure. + */ + #[TentativeType] + public function containsIterator(Iterator $iterator): bool {} + + /** + * Gets the number of attached iterator instances + * @link https://php.net/manual/en/multipleiterator.countiterators.php + * @return int The number of attached iterator instances (as an integer). + */ + #[TentativeType] + public function countIterators(): int {} + + /** + * Rewinds all attached iterator instances + * @link https://php.net/manual/en/multipleiterator.rewind.php + * @return void + */ + #[TentativeType] + public function rewind(): void {} + + /** + * Checks the validity of sub iterators + * @link https://php.net/manual/en/multipleiterator.valid.php + * @return bool true if one or all sub iterators are valid depending on flags, + * otherwise false + */ + #[TentativeType] + public function valid(): bool {} + + /** + * Gets the registered iterator instances + * @link https://php.net/manual/en/multipleiterator.key.php + * @return array An array of all registered iterator instances, + * or false if no sub iterator is attached. + */ + #[TentativeType] + public function key(): array {} + + /** + * Gets the registered iterator instances + * @link https://php.net/manual/en/multipleiterator.current.php + * @return array An array containing the current values of each attached iterator, + * or false if no iterators are attached. + * @throws RuntimeException if mode MIT_NEED_ALL is set and at least one attached iterator is not valid. + * @throws InvalidArgumentException if a key is NULL and MIT_KEYS_ASSOC is set. + */ + #[TentativeType] + public function current(): array {} + + /** + * Moves all attached iterator instances forward + * @link https://php.net/manual/en/multipleiterator.next.php + * @return void + */ + #[TentativeType] + public function next(): void {} + + /** + * @return array + * @since 7.4 + */ + #[TentativeType] + public function __debugInfo(): array {} }