Skip to content

Phpstan thinks that SplFileObject::fgets return string but false is a possible return value #3365

@VincentLanglet

Description

@VincentLanglet

Bug report

Code snippet that reproduces the problem

https://phpstan.org/r/fa65d8f7-8ef3-4b99-ad70-c277ffcc3983

Expected output

No error, false is possible according to the doc
https://www.php.net/manual/fr/function.fgets.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions