Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/399960 )

Change subject: Change typehint from DatabaseBase to IDatabase
......................................................................

Change typehint from DatabaseBase to IDatabase

Change-Id: I8e3328e18ad78f750363861d45e8232b5f9ad525
---
M Memento/MementoResource.php
M Memento/TimeMapResource.php
2 files changed, 11 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Memento 
refs/changes/60/399960/1

diff --git a/Memento/MementoResource.php b/Memento/MementoResource.php
index 8bc3651..cfdd146 100644
--- a/Memento/MementoResource.php
+++ b/Memento/MementoResource.php
@@ -28,6 +28,8 @@
 
  */
 
+use Wikimedia\Rdbms\IDatabase;
+
 /**
  * This abstract class is the parent of all MementoResource types.
  * As such, it contains the methods used by all of the Memento Pages.
@@ -38,17 +40,17 @@
        /**
         * Constructor for MementoResource and its children
         *
-        * @param DatabaseBase $db
+        * @param IDatabase $db
         * @param Article $article
         *
         */
-       public function __construct( DatabaseBase $db, Article $article ) {
+       public function __construct( IDatabase $db, Article $article ) {
                $this->db = $db;
                $this->article = $article;
        }
 
        /**
-        * @var DatabaseBase $db DatabaseBase object for Memento Extension
+        * @var IDatabase $db Database object for Memento Extension
         */
        protected $db;
 
@@ -429,13 +431,13 @@
         *
         * A factory for creating the correct MementoPageResource type.
         *
-        * @param DatabaseBase $db passed to constructor
+        * @param IDatabase $db passed to constructor
         * @param Article $article passed to constructor
         * @param int $oldID revision ID used in decision
         *
         * @return MementoResource the correct instance of MementoResource base 
on $oldID
         */
-       public static function mementoPageResourceFactory( DatabaseBase $db, 
$article, $oldID ) {
+       public static function mementoPageResourceFactory( IDatabase $db, 
$article, $oldID ) {
                $resource = null;
 
                if ( $oldID == 0 ) {
diff --git a/Memento/TimeMapResource.php b/Memento/TimeMapResource.php
index fbb007d..2fafc74 100644
--- a/Memento/TimeMapResource.php
+++ b/Memento/TimeMapResource.php
@@ -28,6 +28,8 @@
 
  */
 
+use Wikimedia\Rdbms\IDatabase;
+
 /**
  * This class provides the base functions for all Memento TimeMap types
  */
@@ -97,14 +99,14 @@
         * This function determines which TimeMap object behavior we will get
         * based on the input.
         *
-        * @param DatabaseBase $db database connection object
+        * @param IDatabase $db database connection object
         * @param Article $article article object for TimeMap
         * @param string $urlparam the data passed into a SpecialPage
         *
         * @return TimeMapResource
         *
         */
-       public static function timeMapFactory( DatabaseBase $db, Article 
$article, $urlparam ) {
+       public static function timeMapFactory( IDatabase $db, Article $article, 
$urlparam ) {
                if ( self::containsPivot( $urlparam ) ) {
                        if ( self::isPivotAscending( $urlparam ) ) {
                                $tm = new TimeMapPivotAscendingResource( $db, 
$article );

-- 
To view, visit https://gerrit.wikimedia.org/r/399960
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e3328e18ad78f750363861d45e8232b5f9ad525
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Memento
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to