Enable some additional PHPStan rules and fix some type issues

This commit is contained in:
Alex Cabal 2025-03-01 13:39:57 -06:00
parent c9e5026cf4
commit a019d5e87c
8 changed files with 21 additions and 18 deletions

View file

@ -315,7 +315,7 @@ class Db{
* @param string $sql The SQL query to execute.
* @param array<mixed> $params An array of parameters to bind to the SQL statement.
*
* @return \PdoStatement The `\PDOStatement` to be used to execute the query.
* @return \PDOStatement The `\PDOStatement` to be used to execute the query.
*
* @throws Exceptions\DatabaseQueryException When an error occurs during execution of the query.
*/
@ -360,7 +360,7 @@ class Db{
*
* @template T
*
* @param \PdoStatement $handle The PDO handle to execute.
* @param \PDOStatement $handle The PDO handle to execute.
* @param class-string<T> $class The type of object to return in the return array.
*
* @return array<T> An array of objects of type `$class`, or `stdClass` if `$class` is `null`.
@ -440,7 +440,7 @@ class Db{
*
* @template T
*
* @param \PdoStatement $handle The PDO handle to execute.
* @param \PDOStatement $handle The PDO handle to execute.
* @param class-string<T> $class The class to instantiate for each row, or `stdClass` to return an array of rows.
*
* @return array<T>|array<array<string, stdClass>> An array of `$class` if `$class` is not `stdClass`, otherwise an array of rows of the form `["LeftTableName" => $stdClass, "RightTableName" => $stdClass]`.