1
0
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:
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

@@ -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;
}

View File

@@ -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;

View File

@@ -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();