mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
[ticket/12282] Use interface for type hinting
PHPBB3-12282
This commit is contained in:
@@ -140,7 +140,7 @@ class phpbb_mock_cache implements \phpbb\cache\driver\driver_interface
|
||||
/**
|
||||
* {@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;
|
||||
}
|
||||
|
@@ -63,10 +63,10 @@ class phpbb_session_testable_factory
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
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
|
||||
global $SID, $_SID, $db, $config, $cache, $request, $phpbb_container;
|
||||
|
@@ -150,7 +150,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
// 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'];
|
||||
$this->db = new $dbms();
|
||||
|
Reference in New Issue
Block a user