-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SplFile{Info,Object} stub fixes #1651
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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 <b>FALSE</b> 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 <b>FALSE</b> 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 <b>FALSE</b> 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 <b>FALSE</b> 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 <b>FALSE</b> 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 <b>FALSE</b> 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 <b>FALSE</b> on failure. | ||||||
* @since 5.2.2 | ||||||
* @throws \RunTimeException on error. | ||||||
*/ | ||||||
#[TentativeType] | ||||||
public function getLinkTarget(): string|false {} | ||||||
|
@@ -227,23 +235,29 @@ 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] <p> | ||||||
* @param class-string<T> $class [optional] <p> | ||||||
* Name of an <b>SplFileInfo</b> derived class to use. | ||||||
* </p> | ||||||
* @return SplFileInfo An <b>SplFileInfo</b> object created for the file. | ||||||
* @return T An <b>SplFileInfo</b> 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 string $class [optional] <p> | ||||||
* | ||||||
* @param class-string<T> $class [optional] <p> | ||||||
* Name of an <b>SplFileInfo</b> derived class to use. | ||||||
* </p> | ||||||
* @return SplFileInfo|null A <b>SplFileInfo</b> object for the parent path of the file on success, or <b>NULL</b> on failure. | ||||||
* | ||||||
* @return T|null A <b>SplFileInfo</b> object for the parent path of the file on success, or <b>NULL</b> on failure. | ||||||
* @since 5.1.2 | ||||||
*/ | ||||||
#[TentativeType] | ||||||
|
@@ -263,6 +277,7 @@ public function getPathInfo(#[LanguageLevelTypeAware(['8.0' => 'string|null'], d | |||||
* </p> | ||||||
* @return SplFileObject The opened file as an <b>SplFileObject</b> object. | ||||||
* @since 5.1.2 | ||||||
* @throws \RuntimeException If the file cannot be opened (e.g. insufficient access rights). | ||||||
*/ | ||||||
#[TentativeType] | ||||||
public function openFile( | ||||||
|
@@ -273,8 +288,10 @@ public function openFile( | |||||
|
||||||
/** | ||||||
* Sets the class name used with <b>SplFileInfo::openFile</b> | ||||||
* | ||||||
* @template T of SplFileObject | ||||||
* @link https://php.net/manual/en/splfileinfo.setfileclass.php | ||||||
* @param string $class [optional] <p> | ||||||
* @param class-string<T> $class [optional] <p> | ||||||
* The class name to use when openFile() is called. | ||||||
* </p> | ||||||
* @return void | ||||||
|
@@ -285,10 +302,12 @@ public function setFileClass(#[LanguageLevelTypeAware(['8.0' => 'string'], defau | |||||
|
||||||
/** | ||||||
* Sets the class used with getFileInfo and getPathInfo | ||||||
* @template T of SplFileInfo* | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
no ? I never saw a syntax with |
||||||
* @link https://php.net/manual/en/splfileinfo.setinfoclass.php | ||||||
* @param string $class [optional] <p> | ||||||
* @param class-string<T> $class [optional] <p> | ||||||
* The class name to use. | ||||||
* </p> | ||||||
* | ||||||
* @return void | ||||||
* @since 5.1.2 | ||||||
*/ | ||||||
|
@@ -645,6 +664,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 +690,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 +993,8 @@ public function getFlags(): int {} | |||||
* The maximum length of a line. | ||||||
* </p> | ||||||
* @return void | ||||||
* | ||||||
* @throws DomainException When <i>maxLength</i> is less than zero. | ||||||
*/ | ||||||
#[TentativeType] | ||||||
public function setMaxLineLen(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $maxLength): void {} | ||||||
|
@@ -1009,6 +1034,7 @@ public function getChildren() {} | |||||
* The zero-based line number to seek to. | ||||||
* </p> | ||||||
* @return void | ||||||
* @throws LogicException If the <i>line</i> is negative | ||||||
*/ | ||||||
#[TentativeType] | ||||||
public function seek(#[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $line): void {} | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of template in the stub have names, like
Maybe there is something better to do here than
T
.