-
Notifications
You must be signed in to change notification settings - Fork 545
Incorrect return type for SplFileObject::fgetcsv #464
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
Conversation
Return type should be `array|false` instead of `array|false|null`. See https://www.php.net/manual/en/splfileobject.fgetcsv#refsect1-splfileobject.fgetcsv-returnvalues
|
Thank you! |
|
@TomAdam @ondrejmirtes Even if the doc is saying that You can see another example here: facebook/hhvm#5823 |
|
@VincentLanglet Your code example doesn't include |
|
I meant The last line of my csv was an empty line, and the last |
|
Can it be |
|
It's only related to some Without |
|
You can look at the psalm code https://raw.githubusercontent.com/vimeo/psalm/master/dictionaries/CallMap.php They are using |
Return type should be
array|falseinstead ofarray|false|null. See https://www.php.net/manual/en/splfileobject.fgetcsv#refsect1-splfileobject.fgetcsv-returnvalues