1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-11 11:13:59 +02:00

[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

@@ -23,7 +23,7 @@ abstract class migration
/** @var \phpbb\config\config */
protected $config;
/** @var \phpbb\db\driver\driver */
/** @var \phpbb\db\driver\driver_interface */
protected $db;
/** @var \phpbb\db\tools */
@@ -48,13 +48,13 @@ abstract class migration
* Constructor
*
* @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 string $phpbb_root_path
* @param string $php_ext
* @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->db = $db;

View File

@@ -19,7 +19,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
/** @var \phpbb\cache\service */
protected $cache;
/** @var \phpbb\db\driver\driver */
/** @var \phpbb\db\driver\driver_interface */
protected $db;
/** @var \phpbb\user */
@@ -37,14 +37,14 @@ class module implements \phpbb\db\migration\tool\tool_interface
/**
* Constructor
*
* @param \phpbb\db\driver\driver $db
* @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\cache\service $cache
* @param \phpbb\user $user
* @param string $phpbb_root_path
* @param string $php_ext
* @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->cache = $cache;

View File

@@ -22,7 +22,7 @@ class permission implements \phpbb\db\migration\tool\tool_interface
/** @var \phpbb\cache\service */
protected $cache;
/** @var \phpbb\db\driver\driver */
/** @var \phpbb\db\driver\driver_interface */
protected $db;
/** @var string */
@@ -34,13 +34,13 @@ class permission implements \phpbb\db\migration\tool\tool_interface
/**
* Constructor
*
* @param \phpbb\db\driver\driver $db
* @param \phpbb\db\driver\driver_interface $db
* @param \phpbb\cache\service $cache
* @param \phpbb\auth\auth $auth
* @param string $phpbb_root_path
* @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->cache = $cache;

View File

@@ -19,7 +19,7 @@ class migrator
/** @var \phpbb\config\config */
protected $config;
/** @var \phpbb\db\driver\driver */
/** @var \phpbb\db\driver\driver_interface */
protected $db;
/** @var \phpbb\db\tools */
@@ -68,7 +68,7 @@ class 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->db = $db;

View File

@@ -49,7 +49,7 @@ namespace phpbb\db;
*/
class sql_insert_buffer
{
/** @var \phpbb\db\driver\driver */
/** @var \phpbb\db\driver\driver_interface */
protected $db;
/** @var string */
@@ -62,11 +62,11 @@ class sql_insert_buffer
protected $buffer = array();
/**
* @param \phpbb\db\driver\driver $db
* @param \phpbb\db\driver\driver_interface $db
* @param string $table_name
* @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->table_name = $table_name;

View File

@@ -304,10 +304,10 @@ class tools
/**
* 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
*/
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->return_statements = $return_statements;