Merge "Perform a permission check on the title when changing the page language"
[lhc/web/wiklou.git] / includes / api / ApiQueryBase.php
index 2d21865..44526e8 100644 (file)
@@ -24,6 +24,9 @@
  * @file
  */
 
+use Wikimedia\Rdbms\IDatabase;
+use Wikimedia\Rdbms\ResultWrapper;
+
 /**
  * This is a base class for all Query modules.
  * It provides some common functionality such as constructing various SQL
@@ -103,7 +106,7 @@ abstract class ApiQueryBase extends ApiBase {
 
        /**
         * Get the Query database connection (read-only)
-        * @return Database
+        * @return IDatabase
         */
        protected function getDB() {
                if ( is_null( $this->mDb ) ) {
@@ -119,7 +122,7 @@ abstract class ApiQueryBase extends ApiBase {
         * @param string $name Name to assign to the database connection
         * @param int $db One of the DB_* constants
         * @param array $groups Query groups
-        * @return Database
+        * @return IDatabase
         */
        public function selectNamedDB( $name, $db, $groups ) {
                $this->mDb = $this->getQuery()->getNamedDB( $name, $db, $groups );
@@ -353,7 +356,6 @@ abstract class ApiQueryBase extends ApiBase {
         * @return ResultWrapper
         */
        protected function select( $method, $extraQuery = [], array &$hookData = null ) {
-
                $tables = array_merge(
                        $this->tables,
                        isset( $extraQuery['tables'] ) ? (array)$extraQuery['tables'] : []
@@ -476,7 +478,7 @@ abstract class ApiQueryBase extends ApiBase {
        /**
         * Add information (title and namespace) about a Title object to a
         * result array
-        * @param array $arr Result array à la ApiResult
+        * @param array &$arr Result array à la ApiResult
         * @param Title $title
         * @param string $prefix Module prefix
         */