1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

Merge remote-tracking branch 'github-nickvergessen/ticket/12282' into develop-ascraeus

* github-nickvergessen/ticket/12282:
  [ticket/12282] Update new references
  [ticket/12282] Update container db mock
  [ticket/12282] Add new line at EOF of the interface
  [ticket/12282] Use interface for type hinting
  [ticket/12282] Use {@inheritDoc} for inherited methods
  [ticket/12282] Add Interface for DBAL drivers
This commit is contained in:
Nils Adermann
2014-04-10 14:04:43 -07:00
66 changed files with 617 additions and 411 deletions

View File

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

View File

@@ -2404,7 +2404,7 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
* via admin_permissions. Changes of usernames and group names
* 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\auth\auth $auth Authentication object
* @return null
@@ -2627,7 +2627,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
/**
* 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 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

View File

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

View File

@@ -22,14 +22,14 @@ if (!defined('IN_PHPBB'))
*
* 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 $column Column whose values to change
* @param array $from_values An array of values that should be changed
* @param int $to_value The new value
* @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
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.
*
* @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 $column Column whose values to change
* @param array $from_values An array of values that should be changed
* @param int $to_value The new value
* @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
FROM $table

View File

@@ -596,7 +596,7 @@ function phpbb_parse_range_request($request_array, $filesize)
/**
* 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
*
* @return null
@@ -617,7 +617,7 @@ function phpbb_increment_downloads($db, $ids)
/**
* 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 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
*
* @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 int $user_id The user id
* @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
*
* @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 $msg_id The id of the PM that we are downloading from
*