1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/16955] Clean up code in db classes

PHPBB3-16955
This commit is contained in:
Marc Alexander
2022-12-27 14:13:23 +01:00
parent 3bc100c9a0
commit 948023078b
26 changed files with 277 additions and 327 deletions

View File

@@ -49,7 +49,9 @@ class factory implements driver_interface
{
if ($this->driver === null)
{
$this->driver = $this->container->get('dbal.conn.driver');
/** @var driver_interface $driver */
$driver = $this->container->get('dbal.conn.driver');
$this->driver = $driver;
}
return $this->driver;
@@ -238,13 +240,13 @@ class factory implements driver_interface
*/
public function sql_return_on_error($fail = false)
{
return $this->get_driver()->sql_return_on_error($fail);
$this->get_driver()->sql_return_on_error($fail);
}
/**
* {@inheritdoc}
*/
public function sql_build_array($query, $assoc_ary = array())
public function sql_build_array($query, $assoc_ary = [])
{
return $this->get_driver()->sql_build_array($query, $assoc_ary);
}
@@ -326,7 +328,7 @@ class factory implements driver_interface
*/
public function sql_add_num_queries($cached = false)
{
return $this->get_driver()->sql_add_num_queries($cached);
$this->get_driver()->sql_add_num_queries($cached);
}
/**
@@ -374,7 +376,7 @@ class factory implements driver_interface
*/
public function sql_freeresult($query_id = false)
{
return $this->get_driver()->sql_freeresult($query_id);
$this->get_driver()->sql_freeresult($query_id);
}
/**