1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 17:56:52 +02:00

[ticket/16955] Clean up installer classes for psalm

PHPBB3-16955
This commit is contained in:
Marc Alexander
2022-12-26 14:42:23 +01:00
parent d9c179f9ef
commit 40e8a737c3
22 changed files with 54 additions and 42 deletions

View File

@@ -93,9 +93,9 @@ abstract class database_task extends task_base
*
* @param string $sql The SQL.
*
* @return DriverStmt|Statement The prepared statement object.
* @return Statement|null The prepared statement object or null if preparing failed
*/
protected function create_prepared_stmt(string $sql)
protected function create_prepared_stmt(string $sql): ?Statement
{
try
{
@@ -153,13 +153,13 @@ abstract class database_task extends task_base
/**
* Returns the last insert ID.
*
* @return string|null The last insert ID.
* @return int|null The last insert ID.
*/
protected function get_last_insert_id() : ?string
protected function get_last_insert_id() : ?int
{
try
{
return $this->conn->lastInsertId();
return (int) $this->conn->lastInsertId();
}
catch (Exception $e)
{