1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
psalm/stubs/pdo.php
Holger Woltersdorf 972da55d84
Add missing param for constructor arguments in PDOStatement#fetchObject (#4915)
* Add missing param for constructor arguments

PDOStatement#fetchObject allows a second, optional parameter for constructor arguments, which - if given - will be passed to the given class' constructor.
See: https://www.php.net/manual/de/pdostatement.fetchobject.php

Also see the PhpStorm stubs: https://github.com/JetBrains/phpstorm-stubs/blob/master/PDO/PDO.php#L1441

* Fix wrong nullability for 2nd argument in PDOStatement#fetchObject
2021-01-29 11:47:24 +01:00

14 lines
286 B
PHP

<?php
class PdoStatement {
/**
* @psalm-taint-sink callable $class
*
* @template T
* @param class-string<T> $class
* @param array $ctorArgs
* @return false|T
*/
public function fetchObject($class = "stdclass", array $ctorArgs = array()) {}
}