[ticket/12282] Use interface for type hinting

PHPBB3-12282
This commit is contained in:
Joas Schilling 2014-03-17 13:29:35 +01:00
parent 1f28451d58
commit 11a9104b8a
50 changed files with 114 additions and 114 deletions

View file

@ -20,7 +20,7 @@ if (!defined('IN_PHPBB'))
*/ */
class acp_attachments class acp_attachments
{ {
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
/** @var \phpbb\config\config */ /** @var \phpbb\config\config */

View file

@ -2399,7 +2399,7 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
* via admin_permissions. Changes of usernames and group names * via admin_permissions. Changes of usernames and group names
* must be carried through for the moderators table. * must be carried through for the moderators table.
* *
* @param \phpbb\db\driver\driver $db Database connection * @param \phpbb\db\driver\driver_interface $db Database connection
* @param \phpbb\cache\driver\driver_interface Cache driver * @param \phpbb\cache\driver\driver_interface Cache driver
* @param \phpbb\auth\auth $auth Authentication object * @param \phpbb\auth\auth $auth Authentication object
* @return null * @return null
@ -2622,7 +2622,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
/** /**
* Removes moderators and administrators from foe lists. * Removes moderators and administrators from foe lists.
* *
* @param \phpbb\db\driver\driver $db Database connection * @param \phpbb\db\driver\driver_interface $db Database connection
* @param \phpbb\auth\auth $auth Authentication object * @param \phpbb\auth\auth $auth Authentication object
* @param array|bool $group_id If an array, remove all members of this group from foe lists, or false to ignore * @param array|bool $group_id If an array, remove all members of this group from foe lists, or false to ignore
* @param array|bool $user_id If an array, remove this user from foe lists, or false to ignore * @param array|bool $user_id If an array, remove this user from foe lists, or false to ignore

View file

@ -26,7 +26,7 @@ if (!defined('IN_PHPBB'))
* Used to bootstrap the container. * Used to bootstrap the container.
* *
* @param string $config_file * @param string $config_file
* @return \phpbb\db\driver\driver * @return \phpbb\db\driver\driver_interface
*/ */
function phpbb_bootstrap_db_connection($config_file) function phpbb_bootstrap_db_connection($config_file)
{ {

View file

@ -22,14 +22,14 @@ if (!defined('IN_PHPBB'))
* *
* The only supported table is bookmarks. * The only supported table is bookmarks.
* *
* @param \phpbb\db\driver\driver $db Database object * @param \phpbb\db\driver\driver_interface $db Database object
* @param string $table Table on which to perform the update * @param string $table Table on which to perform the update
* @param string $column Column whose values to change * @param string $column Column whose values to change
* @param array $from_values An array of values that should be changed * @param array $from_values An array of values that should be changed
* @param int $to_value The new value * @param int $to_value The new value
* @return null * @return null
*/ */
function phpbb_update_rows_avoiding_duplicates(\phpbb\db\driver\driver $db, $table, $column, $from_values, $to_value) function phpbb_update_rows_avoiding_duplicates(\phpbb\db\driver\driver_interface $db, $table, $column, $from_values, $to_value)
{ {
$sql = "SELECT $column, user_id $sql = "SELECT $column, user_id
FROM $table FROM $table
@ -107,14 +107,14 @@ function phpbb_update_rows_avoiding_duplicates(\phpbb\db\driver\driver $db, $tab
* *
* The only supported table is topics_watch. * The only supported table is topics_watch.
* *
* @param \phpbb\db\driver\driver $db Database object * @param \phpbb\db\driver\driver_interface $db Database object
* @param string $table Table on which to perform the update * @param string $table Table on which to perform the update
* @param string $column Column whose values to change * @param string $column Column whose values to change
* @param array $from_values An array of values that should be changed * @param array $from_values An array of values that should be changed
* @param int $to_value The new value * @param int $to_value The new value
* @return null * @return null
*/ */
function phpbb_update_rows_avoiding_duplicates_notify_status(\phpbb\db\driver\driver $db, $table, $column, $from_values, $to_value) function phpbb_update_rows_avoiding_duplicates_notify_status(\phpbb\db\driver\driver_interface $db, $table, $column, $from_values, $to_value)
{ {
$sql = "SELECT $column, user_id, notify_status $sql = "SELECT $column, user_id, notify_status
FROM $table FROM $table

View file

@ -596,7 +596,7 @@ function phpbb_parse_range_request($request_array, $filesize)
/** /**
* Increments the download count of all provided attachments * Increments the download count of all provided attachments
* *
* @param \phpbb\db\driver\driver $db The database object * @param \phpbb\db\driver\driver_interface $db The database object
* @param array|int $ids The attach_id of each attachment * @param array|int $ids The attach_id of each attachment
* *
* @return null * @return null
@ -617,7 +617,7 @@ function phpbb_increment_downloads($db, $ids)
/** /**
* Handles authentication when downloading attachments from a post or topic * Handles authentication when downloading attachments from a post or topic
* *
* @param \phpbb\db\driver\driver $db The database object * @param \phpbb\db\driver\driver_interface $db The database object
* @param \phpbb\auth\auth $auth The authentication object * @param \phpbb\auth\auth $auth The authentication object
* @param int $topic_id The id of the topic that we are downloading from * @param int $topic_id The id of the topic that we are downloading from
* *
@ -663,7 +663,7 @@ function phpbb_download_handle_forum_auth($db, $auth, $topic_id)
/** /**
* Handles authentication when downloading attachments from PMs * Handles authentication when downloading attachments from PMs
* *
* @param \phpbb\db\driver\driver $db The database object * @param \phpbb\db\driver\driver_interface $db The database object
* @param \phpbb\auth\auth $auth The authentication object * @param \phpbb\auth\auth $auth The authentication object
* @param int $user_id The user id * @param int $user_id The user id
* @param int $msg_id The id of the PM that we are downloading from * @param int $msg_id The id of the PM that we are downloading from
@ -690,7 +690,7 @@ function phpbb_download_handle_pm_auth($db, $auth, $user_id, $msg_id)
/** /**
* Checks whether a user can download from a particular PM * Checks whether a user can download from a particular PM
* *
* @param \phpbb\db\driver\driver $db The database object * @param \phpbb\db\driver\driver_interface $db The database object
* @param int $user_id The user id * @param int $user_id The user id
* @param int $msg_id The id of the PM that we are downloading from * @param int $msg_id The id of the PM that we are downloading from
* *

View file

@ -26,7 +26,7 @@ class apache extends \phpbb\auth\provider\base
/** /**
* Apache Authentication Constructor * Apache Authentication Constructor
* *
* @param \phpbb\db\driver\driver $db * @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\config\config $config * @param \phpbb\config\config $config
* @param \phpbb\passwords\manager $passwords_manager * @param \phpbb\passwords\manager $passwords_manager
* @param \phpbb\request\request $request * @param \phpbb\request\request $request
@ -34,7 +34,7 @@ class apache extends \phpbb\auth\provider\base
* @param string $phpbb_root_path * @param string $phpbb_root_path
* @param string $php_ext * @param string $php_ext
*/ */
public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request $request, \phpbb\user $user, $phpbb_root_path, $php_ext) public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request $request, \phpbb\user $user, $phpbb_root_path, $php_ext)
{ {
$this->db = $db; $this->db = $db;
$this->config = $config; $this->config = $config;

View file

@ -28,7 +28,7 @@ class db extends \phpbb\auth\provider\base
/** /**
* Database Authentication Constructor * Database Authentication Constructor
* *
* @param \phpbb\db\driver\driver $db * @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\config\config $config * @param \phpbb\config\config $config
* @param \phpbb\passwords\manager $passwords_manager * @param \phpbb\passwords\manager $passwords_manager
* @param \phpbb\request\request $request * @param \phpbb\request\request $request
@ -36,7 +36,7 @@ class db extends \phpbb\auth\provider\base
* @param string $phpbb_root_path * @param string $phpbb_root_path
* @param string $php_ext * @param string $php_ext
*/ */
public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request $request, \phpbb\user $user, $phpbb_root_path, $php_ext) public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request $request, \phpbb\user $user, $phpbb_root_path, $php_ext)
{ {
$this->db = $db; $this->db = $db;
$this->config = $config; $this->config = $config;

View file

@ -28,12 +28,12 @@ class ldap extends \phpbb\auth\provider\base
/** /**
* LDAP Authentication Constructor * LDAP Authentication Constructor
* *
* @param \phpbb\db\driver\driver $db * @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\config\config $config * @param \phpbb\config\config $config
* @param \phpbb\passwords\manager $passwords_manager * @param \phpbb\passwords\manager $passwords_manager
* @param \phpbb\user $user * @param \phpbb\user $user
*/ */
public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\user $user) public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\user $user)
{ {
$this->db = $db; $this->db = $db;
$this->config = $config; $this->config = $config;

View file

@ -22,7 +22,7 @@ class oauth extends \phpbb\auth\provider\base
/** /**
* Database driver * Database driver
* *
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;
@ -106,7 +106,7 @@ class oauth extends \phpbb\auth\provider\base
/** /**
* OAuth Authentication Constructor * OAuth Authentication Constructor
* *
* @param \phpbb\db\driver\driver $db * @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\config\config $config * @param \phpbb\config\config $config
* @param \phpbb\passwords\manager $passwords_manager * @param \phpbb\passwords\manager $passwords_manager
* @param \phpbb\request\request_interface $request * @param \phpbb\request\request_interface $request
@ -118,7 +118,7 @@ class oauth extends \phpbb\auth\provider\base
* @param string $phpbb_root_path * @param string $phpbb_root_path
* @param string $php_ext * @param string $php_ext
*/ */
public function __construct(\phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request_interface $request, \phpbb\user $user, $auth_provider_oauth_token_storage_table, $auth_provider_oauth_token_account_assoc, \phpbb\di\service_collection $service_providers, $users_table, $phpbb_root_path, $php_ext) public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\passwords\manager $passwords_manager, \phpbb\request\request_interface $request, \phpbb\user $user, $auth_provider_oauth_token_storage_table, $auth_provider_oauth_token_account_assoc, \phpbb\di\service_collection $service_providers, $users_table, $phpbb_root_path, $php_ext)
{ {
$this->db = $db; $this->db = $db;
$this->config = $config; $this->config = $config;

View file

@ -26,7 +26,7 @@ class token_storage implements TokenStorageInterface
/** /**
* Cache driver. * Cache driver.
* *
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;
@ -52,11 +52,11 @@ class token_storage implements TokenStorageInterface
/** /**
* Creates token storage for phpBB. * Creates token storage for phpBB.
* *
* @param \phpbb\db\driver\driver $db * @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\user $user * @param \phpbb\user $user
* @param string $auth_provider_oauth_table * @param string $auth_provider_oauth_table
*/ */
public function __construct(\phpbb\db\driver\driver $db, \phpbb\user $user, $auth_provider_oauth_table) public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\user $user, $auth_provider_oauth_table)
{ {
$this->db = $db; $this->db = $db;
$this->user = $user; $this->user = $user;

View file

@ -106,7 +106,7 @@ interface driver_interface
* result to persistent storage. In other words, there is no need * result to persistent storage. In other words, there is no need
* to call save() afterwards. * to call save() afterwards.
* *
* @param \phpbb\db\driver\driver $db Database connection * @param \phpbb\db\driver\driver_interface $db Database connection
* @param string $query SQL query, should be used for generating storage key * @param string $query SQL query, should be used for generating storage key
* @param mixed $query_result The result from \dbal::sql_query, to be passed to * @param mixed $query_result The result from \dbal::sql_query, to be passed to
* \dbal::sql_fetchrow to get all rows and store them * \dbal::sql_fetchrow to get all rows and store them
@ -117,7 +117,7 @@ interface driver_interface
* representing the query should be returned. Otherwise * representing the query should be returned. Otherwise
* the original $query_result should be returned. * the original $query_result should be returned.
*/ */
public function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl); public function sql_save(\phpbb\db\driver\driver_interface $db, $query, $query_result, $ttl);
/** /**
* Check if result for a given SQL query exists in cache. * Check if result for a given SQL query exists in cache.

View file

@ -407,7 +407,7 @@ class file extends \phpbb\cache\driver\base
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl) function sql_save(\phpbb\db\driver\driver_interface $db, $query, $query_result, $ttl)
{ {
// Remove extra spaces and tabs // Remove extra spaces and tabs
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query); $query = preg_replace('/[\n\r\s\t]+/', ' ', $query);

View file

@ -279,7 +279,7 @@ abstract class memory extends \phpbb\cache\driver\base
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl) function sql_save(\phpbb\db\driver\driver_interface $db, $query, $query_result, $ttl)
{ {
// Remove extra spaces and tabs // Remove extra spaces and tabs
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query); $query = preg_replace('/[\n\r\s\t]+/', ' ', $query);

View file

@ -101,7 +101,7 @@ class null extends \phpbb\cache\driver\base
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl) function sql_save(\phpbb\db\driver\driver_interface $db, $query, $query_result, $ttl)
{ {
return $query_result; return $query_result;
} }

View file

@ -32,7 +32,7 @@ class service
/** /**
* Database connection. * Database connection.
* *
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;
@ -55,11 +55,11 @@ class service
* *
* @param \phpbb\cache\driver\driver_interface $driver The cache driver * @param \phpbb\cache\driver\driver_interface $driver The cache driver
* @param \phpbb\config\config $config The config * @param \phpbb\config\config $config The config
* @param \phpbb\db\driver\driver $db Database connection * @param \phpbb\db\driver\driver_interface $db Database connection
* @param string $phpbb_root_path Root path * @param string $phpbb_root_path Root path
* @param string $php_ext PHP extension * @param string $php_ext PHP extension
*/ */
public function __construct(\phpbb\cache\driver\driver_interface $driver, \phpbb\config\config $config, \phpbb\db\driver\driver $db, $phpbb_root_path, $php_ext) public function __construct(\phpbb\cache\driver\driver_interface $driver, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, $phpbb_root_path, $php_ext)
{ {
$this->set_driver($driver); $this->set_driver($driver);
$this->config = $config; $this->config = $config;

View file

@ -23,7 +23,7 @@ class db extends \phpbb\config\config
/** /**
* Database connection * Database connection
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;
@ -36,11 +36,11 @@ class db extends \phpbb\config\config
/** /**
* Creates a configuration container with a default set of values * Creates a configuration container with a default set of values
* *
* @param \phpbb\db\driver\driver $db Database connection * @param \phpbb\db\driver\driver_interface $db Database connection
* @param \phpbb\cache\driver\driver_interface $cache Cache instance * @param \phpbb\cache\driver\driver_interface $cache Cache instance
* @param string $table Configuration table name * @param string $table Configuration table name
*/ */
public function __construct(\phpbb\db\driver\driver $db, \phpbb\cache\driver\driver_interface $cache, $table) public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\cache\driver\driver_interface $cache, $table)
{ {
$this->db = $db; $this->db = $db;
$this->cache = $cache; $this->cache = $cache;

View file

@ -20,7 +20,7 @@ class db_text
{ {
/** /**
* Database connection * Database connection
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;
@ -31,10 +31,10 @@ class db_text
protected $table; protected $table;
/** /**
* @param \phpbb\db\driver\driver $db Database connection * @param \phpbb\db\driver\driver_interface $db Database connection
* @param string $table Table name * @param string $table Table name
*/ */
public function __construct(\phpbb\db\driver\driver $db, $table) public function __construct(\phpbb\db\driver\driver_interface $db, $table)
{ {
$this->db = $db; $this->db = $db;
$this->table = $this->db->sql_escape($table); $this->table = $this->db->sql_escape($table);

View file

@ -13,10 +13,10 @@ use Symfony\Component\Console\Output\OutputInterface;
class recalculate_email_hash extends \phpbb\console\command\command class recalculate_email_hash extends \phpbb\console\command\command
{ {
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
function __construct(\phpbb\db\driver\driver $db) function __construct(\phpbb\db\driver\driver_interface $db)
{ {
$this->db = $db; $this->db = $db;

View file

@ -18,7 +18,7 @@ class content_visibility
{ {
/** /**
* Database object * Database object
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;
@ -50,13 +50,13 @@ class content_visibility
* Constructor * Constructor
* *
* @param \phpbb\auth\auth $auth Auth object * @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\db\driver\driver $db Database object * @param \phpbb\db\driver\driver_interface $db Database object
* @param \phpbb\user $user User object * @param \phpbb\user $user User object
* @param string $phpbb_root_path Root path * @param string $phpbb_root_path Root path
* @param string $php_ext PHP Extension * @param string $php_ext PHP Extension
* @return null * @return null
*/ */
public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table) public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table)
{ {
$this->auth = $auth; $this->auth = $auth;
$this->db = $db; $this->db = $db;

View file

@ -31,9 +31,9 @@ class prune_all_forums extends \phpbb\cron\task\base
* @param string $phpbb_root_path The root path * @param string $phpbb_root_path The root path
* @param string $php_ext The PHP extension * @param string $php_ext The PHP extension
* @param \phpbb\config\config $config The config * @param \phpbb\config\config $config The config
* @param \phpbb\db\driver\driver $db The db connection * @param \phpbb\db\driver\driver_interface $db The db connection
*/ */
public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, \phpbb\db\driver\driver $db) public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db)
{ {
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext; $this->php_ext = $php_ext;

View file

@ -41,9 +41,9 @@ class prune_forum extends \phpbb\cron\task\base implements \phpbb\cron\task\para
* @param string $phpbb_root_path The root path * @param string $phpbb_root_path The root path
* @param string $php_ext The PHP extension * @param string $php_ext The PHP extension
* @param \phpbb\config\config $config The config * @param \phpbb\config\config $config The config
* @param \phpbb\db\driver\driver $db The db connection * @param \phpbb\db\driver\driver_interface $db The db connection
*/ */
public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, \phpbb\db\driver\driver $db) public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db)
{ {
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext; $this->php_ext = $php_ext;

View file

@ -32,10 +32,10 @@ class tidy_search extends \phpbb\cron\task\base
* @param string $php_ext The PHP extension * @param string $php_ext The PHP extension
* @param \phpbb\auth\auth $auth The auth * @param \phpbb\auth\auth $auth The auth
* @param \phpbb\config\config $config The config * @param \phpbb\config\config $config The config
* @param \phpbb\db\driver\driver $db The db connection * @param \phpbb\db\driver\driver_interface $db The db connection
* @param \phpbb\user $user The user * @param \phpbb\user $user The user
*/ */
public function __construct($phpbb_root_path, $php_ext, \phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\user $user) public function __construct($phpbb_root_path, $php_ext, \phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\user $user)
{ {
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->php_ext = $php_ext; $this->php_ext = $php_ext;

View file

@ -23,7 +23,7 @@ abstract class migration
/** @var \phpbb\config\config */ /** @var \phpbb\config\config */
protected $config; protected $config;
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
/** @var \phpbb\db\tools */ /** @var \phpbb\db\tools */
@ -48,13 +48,13 @@ abstract class migration
* Constructor * Constructor
* *
* @param \phpbb\config\config $config * @param \phpbb\config\config $config
* @param \phpbb\db\driver\driver $db * @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\db\tools $db_tools * @param \phpbb\db\tools $db_tools
* @param string $phpbb_root_path * @param string $phpbb_root_path
* @param string $php_ext * @param string $php_ext
* @param string $table_prefix * @param string $table_prefix
*/ */
public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\db\tools $db_tools, $phpbb_root_path, $php_ext, $table_prefix) public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\db\tools $db_tools, $phpbb_root_path, $php_ext, $table_prefix)
{ {
$this->config = $config; $this->config = $config;
$this->db = $db; $this->db = $db;

View file

@ -19,7 +19,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
/** @var \phpbb\cache\service */ /** @var \phpbb\cache\service */
protected $cache; protected $cache;
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
/** @var \phpbb\user */ /** @var \phpbb\user */
@ -37,14 +37,14 @@ class module implements \phpbb\db\migration\tool\tool_interface
/** /**
* Constructor * Constructor
* *
* @param \phpbb\db\driver\driver $db * @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\cache\service $cache * @param \phpbb\cache\service $cache
* @param \phpbb\user $user * @param \phpbb\user $user
* @param string $phpbb_root_path * @param string $phpbb_root_path
* @param string $php_ext * @param string $php_ext
* @param string $modules_table * @param string $modules_table
*/ */
public function __construct(\phpbb\db\driver\driver $db, \phpbb\cache\service $cache, \phpbb\user $user, $phpbb_root_path, $php_ext, $modules_table) public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\cache\service $cache, \phpbb\user $user, $phpbb_root_path, $php_ext, $modules_table)
{ {
$this->db = $db; $this->db = $db;
$this->cache = $cache; $this->cache = $cache;

View file

@ -22,7 +22,7 @@ class permission implements \phpbb\db\migration\tool\tool_interface
/** @var \phpbb\cache\service */ /** @var \phpbb\cache\service */
protected $cache; protected $cache;
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
/** @var string */ /** @var string */
@ -34,13 +34,13 @@ class permission implements \phpbb\db\migration\tool\tool_interface
/** /**
* Constructor * Constructor
* *
* @param \phpbb\db\driver\driver $db * @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\cache\service $cache * @param \phpbb\cache\service $cache
* @param \phpbb\auth\auth $auth * @param \phpbb\auth\auth $auth
* @param string $phpbb_root_path * @param string $phpbb_root_path
* @param string $php_ext * @param string $php_ext
*/ */
public function __construct(\phpbb\db\driver\driver $db, \phpbb\cache\service $cache, \phpbb\auth\auth $auth, $phpbb_root_path, $php_ext) public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\cache\service $cache, \phpbb\auth\auth $auth, $phpbb_root_path, $php_ext)
{ {
$this->db = $db; $this->db = $db;
$this->cache = $cache; $this->cache = $cache;

View file

@ -19,7 +19,7 @@ class migrator
/** @var \phpbb\config\config */ /** @var \phpbb\config\config */
protected $config; protected $config;
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
/** @var \phpbb\db\tools */ /** @var \phpbb\db\tools */
@ -68,7 +68,7 @@ class migrator
/** /**
* Constructor of the database migrator * Constructor of the database migrator
*/ */
public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\db\tools $db_tools, $migrations_table, $phpbb_root_path, $php_ext, $table_prefix, $tools, \phpbb\db\migration\helper $helper) public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\db\tools $db_tools, $migrations_table, $phpbb_root_path, $php_ext, $table_prefix, $tools, \phpbb\db\migration\helper $helper)
{ {
$this->config = $config; $this->config = $config;
$this->db = $db; $this->db = $db;

View file

@ -49,7 +49,7 @@ namespace phpbb\db;
*/ */
class sql_insert_buffer class sql_insert_buffer
{ {
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
/** @var string */ /** @var string */
@ -62,11 +62,11 @@ class sql_insert_buffer
protected $buffer = array(); protected $buffer = array();
/** /**
* @param \phpbb\db\driver\driver $db * @param \phpbb\db\driver\driver_interface $db
* @param string $table_name * @param string $table_name
* @param int $max_buffered_rows * @param int $max_buffered_rows
*/ */
public function __construct(\phpbb\db\driver\driver $db, $table_name, $max_buffered_rows = 500) public function __construct(\phpbb\db\driver\driver_interface $db, $table_name, $max_buffered_rows = 500)
{ {
$this->db = $db; $this->db = $db;
$this->table_name = $table_name; $this->table_name = $table_name;

View file

@ -304,10 +304,10 @@ class tools
/** /**
* Constructor. Set DB Object and set {@link $return_statements return_statements}. * Constructor. Set DB Object and set {@link $return_statements return_statements}.
* *
* @param \phpbb\db\driver\driver $db Database connection * @param \phpbb\db\driver\driver_interface $db Database connection
* @param bool $return_statements True if only statements should be returned and no SQL being executed * @param bool $return_statements True if only statements should be returned and no SQL being executed
*/ */
public function __construct(\phpbb\db\driver\driver $db, $return_statements = false) public function __construct(\phpbb\db\driver\driver_interface $db, $return_statements = false)
{ {
$this->db = $db; $this->db = $db;
$this->return_statements = $return_statements; $this->return_statements = $return_statements;

View file

@ -34,7 +34,7 @@ class manager
* Creates a manager and loads information from database * Creates a manager and loads information from database
* *
* @param ContainerInterface $container A container * @param ContainerInterface $container A container
* @param \phpbb\db\driver\driver $db A database connection * @param \phpbb\db\driver\driver_interface $db A database connection
* @param \phpbb\config\config $config \phpbb\config\config * @param \phpbb\config\config $config \phpbb\config\config
* @param \phpbb\filesystem $filesystem * @param \phpbb\filesystem $filesystem
* @param string $extension_table The name of the table holding extensions * @param string $extension_table The name of the table holding extensions
@ -43,7 +43,7 @@ class manager
* @param \phpbb\cache\driver\driver_interface $cache A cache instance or null * @param \phpbb\cache\driver\driver_interface $cache A cache instance or null
* @param string $cache_name The name of the cache variable, defaults to _ext * @param string $cache_name The name of the cache variable, defaults to _ext
*/ */
public function __construct(ContainerInterface $container, \phpbb\db\driver\driver $db, \phpbb\config\config $config, \phpbb\filesystem $filesystem, $extension_table, $phpbb_root_path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null, $cache_name = '_ext') public function __construct(ContainerInterface $container, \phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\filesystem $filesystem, $extension_table, $phpbb_root_path, $php_ext = 'php', \phpbb\cache\driver\driver_interface $cache = null, $cache_name = '_ext')
{ {
$this->container = $container; $this->container = $container;
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;

View file

@ -25,7 +25,7 @@ abstract class base
/** @var \phpbb\config\config */ /** @var \phpbb\config\config */
protected $config; protected $config;
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
/** @var \phpbb\cache\driver\driver_interface */ /** @var \phpbb\cache\driver\driver_interface */
@ -70,7 +70,7 @@ abstract class base
* *
* @param \phpbb\feed\helper $helper Feed helper * @param \phpbb\feed\helper $helper Feed helper
* @param \phpbb\config\config $config Config object * @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver $db Database connection * @param \phpbb\db\driver\driver_interface $db Database connection
* @param \phpbb\cache\driver\driver_interface $cache Cache object * @param \phpbb\cache\driver\driver_interface $cache Cache object
* @param \phpbb\user $user User object * @param \phpbb\user $user User object
* @param \phpbb\auth\auth $auth Auth object * @param \phpbb\auth\auth $auth Auth object
@ -78,7 +78,7 @@ abstract class base
* @param string $phpEx php file extension * @param string $phpEx php file extension
* @return null * @return null
*/ */
function __construct(\phpbb\feed\helper $helper, \phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\cache\driver\driver_interface $cache, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\content_visibility $content_visibility, $phpEx) function __construct(\phpbb\feed\helper $helper, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\cache\driver\driver_interface $cache, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\content_visibility $content_visibility, $phpEx)
{ {
$this->config = $config; $this->config = $config;
$this->helper = $helper; $this->helper = $helper;

View file

@ -24,7 +24,7 @@ class factory
/** @var \phpbb\config\config */ /** @var \phpbb\config\config */
protected $config; protected $config;
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
/** /**
@ -32,10 +32,10 @@ class factory
* *
* @param objec $container Container object * @param objec $container Container object
* @param \phpbb\config\config $config Config object * @param \phpbb\config\config $config Config object
* @param \phpbb\db\driver\driver $db Database connection * @param \phpbb\db\driver\driver_interface $db Database connection
* @return null * @return null
*/ */
public function __construct($container, \phpbb\config\config $config, \phpbb\db\driver\driver $db) public function __construct($container, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db)
{ {
$this->container = $container; $this->container = $container;
$this->config = $config; $this->config = $config;

View file

@ -26,7 +26,7 @@ class legend implements \phpbb\groupposition\groupposition_interface
/** /**
* Database object * Database object
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;
@ -39,10 +39,10 @@ class legend implements \phpbb\groupposition\groupposition_interface
/** /**
* Constructor * Constructor
* *
* @param \phpbb\db\driver\driver $db Database object * @param \phpbb\db\driver\driver_interface $db Database object
* @param \phpbb\user $user User object * @param \phpbb\user $user User object
*/ */
public function __construct(\phpbb\db\driver\driver $db, \phpbb\user $user) public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\user $user)
{ {
$this->db = $db; $this->db = $db;
$this->user = $user; $this->user = $user;

View file

@ -30,7 +30,7 @@ class teampage implements \phpbb\groupposition\groupposition_interface
/** /**
* Database object * Database object
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;
@ -49,11 +49,11 @@ class teampage implements \phpbb\groupposition\groupposition_interface
/** /**
* Constructor * Constructor
* *
* @param \phpbb\db\driver\driver $db Database object * @param \phpbb\db\driver\driver_interface $db Database object
* @param \phpbb\user $user User object * @param \phpbb\user $user User object
* @param \phpbb\cache\driver\driver_interface $cache Cache object * @param \phpbb\cache\driver\driver_interface $cache Cache object
*/ */
public function __construct(\phpbb\db\driver\driver $db, \phpbb\user $user, \phpbb\cache\driver\driver_interface $cache) public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\user $user, \phpbb\cache\driver\driver_interface $cache)
{ {
$this->db = $db; $this->db = $db;
$this->user = $user; $this->user = $user;

View file

@ -42,7 +42,7 @@ class db
/** /**
* A database connection * A database connection
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
private $db; private $db;
@ -53,9 +53,9 @@ class db
* *
* @param string $config_name A config variable to be used for locking * @param string $config_name A config variable to be used for locking
* @param array $config The phpBB configuration * @param array $config The phpBB configuration
* @param \phpbb\db\driver\driver $db A database connection * @param \phpbb\db\driver\driver_interface $db A database connection
*/ */
public function __construct($config_name, \phpbb\config\config $config, \phpbb\db\driver\driver $db) public function __construct($config_name, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db)
{ {
$this->config_name = $config_name; $this->config_name = $config_name;
$this->config = $config; $this->config = $config;

View file

@ -93,10 +93,10 @@ class log implements \phpbb\log\log_interface
/** /**
* Constructor * Constructor
* *
* @param \phpbb\db\driver\driver $db Database object * @param \phpbb\db\driver\driver_interface $db Database object
* @param \phpbb\user $user User object * @param \phpbb\user $user User object
* @param \phpbb\auth\auth $auth Auth object * @param \phpbb\auth\auth $auth Auth object
* @param phpbb_dispatcher $phpbb_dispatcher Event dispatcher * @param \phpbb\event\dispatcher $phpbb_dispatcher Event dispatcher
* @param string $phpbb_root_path Root path * @param string $phpbb_root_path Root path
* @param string $relative_admin_path Relative admin root path * @param string $relative_admin_path Relative admin root path
* @param string $php_ext PHP Extension * @param string $php_ext PHP Extension

View file

@ -30,7 +30,7 @@ class manager
/** @var \phpbb\config\config */ /** @var \phpbb\config\config */
protected $config; protected $config;
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
/** @var \phpbb\cache\service */ /** @var \phpbb\cache\service */
@ -62,7 +62,7 @@ class manager
* @param ContainerBuilder $phpbb_container * @param ContainerBuilder $phpbb_container
* @param \phpbb\user_loader $user_loader * @param \phpbb\user_loader $user_loader
* @param \phpbb\config\config $config * @param \phpbb\config\config $config
* @param \phpbb\db\driver\driver $db * @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\user $user * @param \phpbb\user $user
* @param string $phpbb_root_path * @param string $phpbb_root_path
* @param string $php_ext * @param string $php_ext
@ -71,7 +71,7 @@ class manager
* @param string $user_notifications_table * @param string $user_notifications_table
* @return \phpbb\notification\manager * @return \phpbb\notification\manager
*/ */
public function __construct($notification_types, $notification_methods, $phpbb_container, \phpbb\user_loader $user_loader, \phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\cache\service $cache, $user, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table) public function __construct($notification_types, $notification_methods, $phpbb_container, \phpbb\user_loader $user_loader, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\cache\service $cache, $user, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
{ {
$this->notification_types = $notification_types; $this->notification_types = $notification_types;
$this->notification_methods = $notification_methods; $this->notification_methods = $notification_methods;

View file

@ -21,7 +21,7 @@ abstract class base implements \phpbb\notification\method\method_interface
/** @var \phpbb\user_loader */ /** @var \phpbb\user_loader */
protected $user_loader; protected $user_loader;
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
/** @var \phpbb\cache\driver\driver_interface */ /** @var \phpbb\cache\driver\driver_interface */
@ -59,7 +59,7 @@ abstract class base implements \phpbb\notification\method\method_interface
* Notification Method Base Constructor * Notification Method Base Constructor
* *
* @param \phpbb\user_loader $user_loader * @param \phpbb\user_loader $user_loader
* @param \phpbb\db\driver\driver $db * @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\cache\driver\driver_interface $cache * @param \phpbb\cache\driver\driver_interface $cache
* @param \phpbb\user $user * @param \phpbb\user $user
* @param \phpbb\auth\auth $auth * @param \phpbb\auth\auth $auth
@ -68,7 +68,7 @@ abstract class base implements \phpbb\notification\method\method_interface
* @param string $php_ext * @param string $php_ext
* @return \phpbb\notification\method\base * @return \phpbb\notification\method\base
*/ */
public function __construct(\phpbb\user_loader $user_loader, \phpbb\db\driver\driver $db, \phpbb\cache\driver\driver_interface $cache, $user, \phpbb\auth\auth $auth, \phpbb\config\config $config, $phpbb_root_path, $php_ext) public function __construct(\phpbb\user_loader $user_loader, \phpbb\db\driver\driver_interface $db, \phpbb\cache\driver\driver_interface $cache, $user, \phpbb\auth\auth $auth, \phpbb\config\config $config, $phpbb_root_path, $php_ext)
{ {
$this->user_loader = $user_loader; $this->user_loader = $user_loader;
$this->db = $db; $this->db = $db;

View file

@ -21,7 +21,7 @@ abstract class base implements \phpbb\notification\type\type_interface
/** @var \phpbb\user_loader */ /** @var \phpbb\user_loader */
protected $user_loader; protected $user_loader;
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
/** @var \phpbb\cache\driver\driver_interface */ /** @var \phpbb\cache\driver\driver_interface */
@ -89,7 +89,7 @@ abstract class base implements \phpbb\notification\type\type_interface
* Notification Type Base Constructor * Notification Type Base Constructor
* *
* @param \phpbb\user_loader $user_loader * @param \phpbb\user_loader $user_loader
* @param \phpbb\db\driver\driver $db * @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\cache\driver\driver_interface $cache * @param \phpbb\cache\driver\driver_interface $cache
* @param \phpbb\user $user * @param \phpbb\user $user
* @param \phpbb\auth\auth $auth * @param \phpbb\auth\auth $auth
@ -101,7 +101,7 @@ abstract class base implements \phpbb\notification\type\type_interface
* @param string $user_notifications_table * @param string $user_notifications_table
* @return \phpbb\notification\type\base * @return \phpbb\notification\type\base
*/ */
public function __construct(\phpbb\user_loader $user_loader, \phpbb\db\driver\driver $db, \phpbb\cache\driver\driver_interface $cache, $user, \phpbb\auth\auth $auth, \phpbb\config\config $config, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table) public function __construct(\phpbb\user_loader $user_loader, \phpbb\db\driver\driver_interface $db, \phpbb\cache\driver\driver_interface $cache, $user, \phpbb\auth\auth $auth, \phpbb\config\config $config, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
{ {
$this->user_loader = $user_loader; $this->user_loader = $user_loader;
$this->db = $db; $this->db = $db;

View file

@ -23,7 +23,7 @@ class lang_helper
/** /**
* Database object * Database object
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;
@ -36,7 +36,7 @@ class lang_helper
/** /**
* Construct * Construct
* *
* @param \phpbb\db\driver\driver $db Database object * @param \phpbb\db\driver\driver_interface $db Database object
* @param string $language_table Table where the language strings are stored * @param string $language_table Table where the language strings are stored
*/ */
public function __construct($db, $language_table) public function __construct($db, $language_table)

View file

@ -23,7 +23,7 @@ class manager
/** /**
* Database object * Database object
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;
@ -63,7 +63,7 @@ class manager
* Construct * Construct
* *
* @param \phpbb\auth\auth $auth Auth object * @param \phpbb\auth\auth $auth Auth object
* @param \phpbb\db\driver\driver $db Database object * @param \phpbb\db\driver\driver_interface $db Database object
* @param \phpbb\request\request $request Request object * @param \phpbb\request\request $request Request object
* @param \phpbb\template\template $template Template object * @param \phpbb\template\template $template Template object
* @param \phpbb\di\service_collection $type_collection * @param \phpbb\di\service_collection $type_collection
@ -72,7 +72,7 @@ class manager
* @param string $fields_language_table * @param string $fields_language_table
* @param string $fields_data_table * @param string $fields_data_table
*/ */
public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver $db, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\di\service_collection $type_collection, \phpbb\user $user, $fields_table, $fields_language_table, $fields_data_table) public function __construct(\phpbb\auth\auth $auth, \phpbb\db\driver\driver_interface $db, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\di\service_collection $type_collection, \phpbb\user $user, $fields_table, $fields_language_table, $fields_data_table)
{ {
$this->auth = $auth; $this->auth = $auth;
$this->db = $db; $this->db = $db;

View file

@ -36,7 +36,7 @@ class fulltext_mysql extends \phpbb\search\base
/** /**
* Database connection * Database connection
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;

View file

@ -80,7 +80,7 @@ class fulltext_native extends \phpbb\search\base
/** /**
* Database connection * Database connection
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;

View file

@ -61,7 +61,7 @@ class fulltext_postgres extends \phpbb\search\base
/** /**
* Database connection * Database connection
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;

View file

@ -77,7 +77,7 @@ class fulltext_sphinx
/** /**
* Database connection * Database connection
* @var \phpbb\db\driver\driver * @var \phpbb\db\driver\driver_interface
*/ */
protected $db; protected $db;

View file

@ -11,7 +11,7 @@ namespace phpbb\tree;
abstract class nestedset implements \phpbb\tree\tree_interface abstract class nestedset implements \phpbb\tree\tree_interface
{ {
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db; protected $db;
/** @var \phpbb\lock\db */ /** @var \phpbb\lock\db */
@ -52,7 +52,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
/** /**
* Construct * Construct
* *
* @param \phpbb\db\driver\driver $db Database connection * @param \phpbb\db\driver\driver_interface $db Database connection
* @param \phpbb\lock\db $lock Lock class used to lock the table when moving forums around * @param \phpbb\lock\db $lock Lock class used to lock the table when moving forums around
* @param string $table_name Table name * @param string $table_name Table name
* @param string $message_prefix Prefix for the messages thrown by exceptions * @param string $message_prefix Prefix for the messages thrown by exceptions
@ -60,7 +60,7 @@ abstract class nestedset implements \phpbb\tree\tree_interface
* @param array $item_basic_data Array with basic item data that is stored in item_parents * @param array $item_basic_data Array with basic item data that is stored in item_parents
* @param array $columns Array with column names to overwrite * @param array $columns Array with column names to overwrite
*/ */
public function __construct(\phpbb\db\driver\driver $db, \phpbb\lock\db $lock, $table_name, $message_prefix = '', $sql_where = '', $item_basic_data = array(), $columns = array()) public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\lock\db $lock, $table_name, $message_prefix = '', $sql_where = '', $item_basic_data = array(), $columns = array())
{ {
$this->db = $db; $this->db = $db;
$this->lock = $lock; $this->lock = $lock;

View file

@ -14,11 +14,11 @@ class nestedset_forum extends \phpbb\tree\nestedset
/** /**
* Construct * Construct
* *
* @param \phpbb\db\driver\driver $db Database connection * @param \phpbb\db\driver\driver_interface $db Database connection
* @param \phpbb\lock\db $lock Lock class used to lock the table when moving forums around * @param \phpbb\lock\db $lock Lock class used to lock the table when moving forums around
* @param string $table_name Table name * @param string $table_name Table name
*/ */
public function __construct(\phpbb\db\driver\driver $db, \phpbb\lock\db $lock, $table_name) public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\lock\db $lock, $table_name)
{ {
parent::__construct( parent::__construct(
$db, $db,

View file

@ -19,7 +19,7 @@ namespace phpbb;
*/ */
class user_loader class user_loader
{ {
/** @var \phpbb\db\driver\driver */ /** @var \phpbb\db\driver\driver_interface */
protected $db = null; protected $db = null;
/** @var string */ /** @var string */
@ -41,12 +41,12 @@ class user_loader
/** /**
* User loader constructor * User loader constructor
* *
* @param \phpbb\db\driver\driver $db A database connection * @param \phpbb\db\driver\driver_interface $db A database connection
* @param string $phpbb_root_path Path to the phpbb includes directory. * @param string $phpbb_root_path Path to the phpbb includes directory.
* @param string $php_ext php file extension * @param string $php_ext php file extension
* @param string $users_table The name of the database table (phpbb_users) * @param string $users_table The name of the database table (phpbb_users)
*/ */
public function __construct(\phpbb\db\driver\driver $db, $phpbb_root_path, $php_ext, $users_table) public function __construct(\phpbb\db\driver\driver_interface $db, $phpbb_root_path, $php_ext, $users_table)
{ {
$this->db = $db; $this->db = $db;

View file

@ -140,7 +140,7 @@ class phpbb_mock_cache implements \phpbb\cache\driver\driver_interface
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public function sql_save(\phpbb\db\driver\driver $db, $query, $query_result, $ttl) public function sql_save(\phpbb\db\driver\driver_interface $db, $query, $query_result, $ttl)
{ {
return $query_result; return $query_result;
} }

View file

@ -63,10 +63,10 @@ class phpbb_session_testable_factory
/** /**
* Retrieve the configured session class instance * Retrieve the configured session class instance
* *
* @param \phpbb\db\driver\driver $dbal The database connection to use for session data * @param \phpbb\db\driver\driver_interface $dbal The database connection to use for session data
* @return phpbb_mock_session_testable A session instance * @return phpbb_mock_session_testable A session instance
*/ */
public function get_session(\phpbb\db\driver\driver $dbal) public function get_session(\phpbb\db\driver\driver_interface $dbal)
{ {
// set up all the global variables used by session // set up all the global variables used by session
global $SID, $_SID, $db, $config, $cache, $request, $phpbb_container; global $SID, $_SID, $db, $config, $cache, $request, $phpbb_container;

View file

@ -150,7 +150,7 @@ class phpbb_functional_test_case extends phpbb_test_case
{ {
global $phpbb_root_path, $phpEx; global $phpbb_root_path, $phpEx;
// so we don't reopen an open connection // so we don't reopen an open connection
if (!($this->db instanceof \phpbb\db\driver\driver)) if (!($this->db instanceof \phpbb\db\driver\driver_interface))
{ {
$dbms = self::$config['dbms']; $dbms = self::$config['dbms'];
$this->db = new $dbms(); $this->db = new $dbms();