Uh oh!
There was an error while loading. Please reload this page.
Incorrect return type for SplFileObject::fgetcsv - #464
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
ondrejmirtes
commented
Mar 5, 2021
Thank you! |
VincentLanglet
commented
Mar 19, 2021
@tomadam@ondrejmirtes Even if the doc is saying that You can see another example here: facebook/hhvm#5823 |
ondrejmirtes
commented
Mar 19, 2021
@VincentLanglet Your code example doesn't include |
VincentLanglet
commented
Mar 19, 2021
I meant The last line of my csv was an empty line, and the last |
ondrejmirtes
commented
Mar 19, 2021
Can it be |
VincentLanglet
commented
Mar 19, 2021
It's only related to some Without |
VincentLanglet
commented
Mar 19, 2021
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