Add type detection for PDOStatement::fetchAll(PDO::FETCH_CLASS, SomeClass::class) #9974
Labels
easy problems
Issues that can be fixed without background knowledge of Psalm
enhancement
good first issue
Help wanted
type providers
Example fetchAll: https://psalm.dev/r/a9b0c85b47
Add type detection for PDOStatement::fetchAll(PDO::FETCH_CLASS, SomeClass::class): SomeClass[]|false;
Currently PDOStatement::fetchAll() is currently defined as:
which infers to array<array-key, mixed> instead of array<array-key, SomeClass>
The text was updated successfully, but these errors were encountered: