mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/12282] Use interface for type hinting
PHPBB3-12282
This commit is contained in:
@@ -23,7 +23,7 @@ class db extends \phpbb\config\config
|
||||
|
||||
/**
|
||||
* Database connection
|
||||
* @var \phpbb\db\driver\driver
|
||||
* @var \phpbb\db\driver\driver_interface
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
@@ -36,11 +36,11 @@ class db extends \phpbb\config\config
|
||||
/**
|
||||
* 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 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->cache = $cache;
|
||||
|
@@ -20,7 +20,7 @@ class db_text
|
||||
{
|
||||
/**
|
||||
* Database connection
|
||||
* @var \phpbb\db\driver\driver
|
||||
* @var \phpbb\db\driver\driver_interface
|
||||
*/
|
||||
protected $db;
|
||||
|
||||
@@ -31,10 +31,10 @@ class db_text
|
||||
protected $table;
|
||||
|
||||
/**
|
||||
* @param \phpbb\db\driver\driver $db Database connection
|
||||
* @param \phpbb\db\driver\driver_interface $db Database connection
|
||||
* @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->table = $this->db->sql_escape($table);
|
||||
|
Reference in New Issue
Block a user