Incorrect return type for SplFileObject::fgetcsv#464
Incorrect return type for SplFileObject::fgetcsv#464ondrejmirtes merged 1 commit intophpstan:masterfrom
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