Bug report
PHPStan complains this function returns an array (not necessarily a list):
/**
* @return list<string>
*/
function get_cv_files(): array
{
$pdo = new PDO("");
$stmt = $pdo->prepare('SELECT `file` FROM `commonvoice`');
$stmt->execute();
return $stmt->fetchAll(PDO::FETCH_COLUMN);
}
Code snippet that reproduces the problem
https://phpstan.org/r/860e662d-152e-4631-813f-dea50f9dbb6e
Expected output
fetchAll(PDO::FETCH_COLUMN) will always return a list.
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
PHPStan complains this function returns an array (not necessarily a list):
Code snippet that reproduces the problem
https://phpstan.org/r/860e662d-152e-4631-813f-dea50f9dbb6e
Expected output
fetchAll(PDO::FETCH_COLUMN) will always return a list.
Did PHPStan help you today? Did it make you happy in any way?
No response