diff --git a/SPL/SPL_c1.php b/SPL/SPL_c1.php index cea492540..64892bf1a 100644 --- a/SPL/SPL_c1.php +++ b/SPL/SPL_c1.php @@ -84,6 +84,7 @@ public function getPerms(): int|false {} * @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 {} @@ -93,6 +94,7 @@ public function getInode(): int|false {} * @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 {} @@ -102,6 +104,7 @@ public function getSize(): int|false {} * @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 {} @@ -111,6 +114,7 @@ public function getOwner(): int|false {} * @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 {} @@ -120,6 +124,7 @@ public function getGroup(): int|false {} * @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 {} @@ -138,6 +143,7 @@ public function getMTime(): int|false {} * @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 {} @@ -149,6 +155,7 @@ public function getCTime(): int|false {} * May be one of file, link, * or dir * @since 5.1.2 + * @throws \RuntimeException on error. */ #[TentativeType] public function getType(): string|false {} @@ -212,6 +219,7 @@ public function isLink(): bool {} * @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 {} @@ -227,11 +235,12 @@ 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 string $class [optional]

+ * @param class-string $class [optional]

* Name of an SplFileInfo derived class to use. *

- * @return SplFileInfo An SplFileInfo object created for the file. + * @return T An SplFileInfo object created for the file. * @since 5.1.2 */ #[TentativeType] @@ -239,11 +248,12 @@ public function getFileInfo(#[LanguageLevelTypeAware(['8.0' => 'string|null'], d /** * Gets an SplFileInfo object for the path + * @template T of SplFileInfo * @link https://php.net/manual/en/splfileinfo.getpathinfo.php - * @param string $class [optional]

+ * @param class-string $class [optional]

* Name of an SplFileInfo derived class to use. *

- * @return SplFileInfo|null A SplFileInfo object for the parent path of the file on success, or NULL on failure. + * @return T|null A SplFileInfo object for the parent path of the file on success, or NULL on failure. * @since 5.1.2 */ #[TentativeType] @@ -263,6 +273,7 @@ public function getPathInfo(#[LanguageLevelTypeAware(['8.0' => 'string|null'], d *

* @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( @@ -273,8 +284,9 @@ public function openFile( /** * Sets the class name used with SplFileInfo::openFile + * @template T of SplFileObject * @link https://php.net/manual/en/splfileinfo.setfileclass.php - * @param string $class [optional]

+ * @param class-string $class [optional]

* The class name to use when openFile() is called. *

* @return void @@ -285,8 +297,9 @@ public function setFileClass(#[LanguageLevelTypeAware(['8.0' => 'string'], defau /** * Sets the class used with getFileInfo and getPathInfo + * @template T of SplFileInfo * @link https://php.net/manual/en/splfileinfo.setinfoclass.php - * @param string $class [optional]

+ * @param class-string $class [optional]

* The class name to use. *

* @return void @@ -645,6 +658,8 @@ public function __construct( * 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 {} @@ -669,6 +684,8 @@ 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 {} @@ -970,6 +987,8 @@ public function getFlags(): int {} * 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 {} @@ -1009,6 +1028,7 @@ public function getChildren() {} * 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 {}