Merge "Fix order of @var parameter in PHP"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 12 Apr 2019 15:17:23 +0000 (15:17 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 12 Apr 2019 15:17:23 +0000 (15:17 +0000)
1  2 
includes/installer/DatabaseUpdater.php
tests/phpunit/includes/page/WikiPageDbTestBase.php

@@@ -20,6 -20,7 +20,6 @@@
   * @file
   * @ingroup Deployment
   */
 -use Wikimedia\Rdbms\Database;
  use Wikimedia\Rdbms\IDatabase;
  use Wikimedia\Rdbms\IMaintainableDatabase;
  use MediaWiki\MediaWikiServices;
@@@ -59,7 -60,7 +59,7 @@@ abstract class DatabaseUpdater 
        /**
         * Handle to the database subclass
         *
 -       * @var Database
 +       * @var IMaintainableDatabase
         */
        protected $db;
  
        protected $holdContentHandlerUseDB = true;
  
        /**
 -       * @param Database &$db To perform updates on
 +       * @param IMaintainableDatabase &$db To perform updates on
         * @param bool $shared Whether to perform updates on shared tables
         * @param Maintenance|null $maintenance Maintenance object which created us
         */
 -      protected function __construct( Database &$db, $shared, Maintenance $maintenance = null ) {
 +      protected function __construct(
 +              IMaintainableDatabase &$db,
 +              $shared,
 +              Maintenance $maintenance = null
 +      ) {
                $this->db = $db;
                $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files
                $this->shared = $shared;
        /**
         * Get a database connection to run updates
         *
 -       * @return Database
 +       * @return IMaintainableDatabase
         */
        public function getDB() {
                return $this->db;
         */
        protected function rebuildLocalisationCache() {
                /**
-                * @var $cl RebuildLocalisationCache
+                * @var RebuildLocalisationCache $cl
                 */
                $cl = $this->maintenance->runChild(
                        RebuildLocalisationCache::class, 'rebuildLocalisationCache.php'
@@@ -71,7 -71,7 +71,7 @@@ abstract class WikiPageDbTestBase exten
  
        protected function tearDown() {
                foreach ( $this->pagesToDelete as $p ) {
-                       /* @var $p WikiPage */
+                       /* @var WikiPage $p */
  
                        try {
                                if ( $p->exists() ) {
                                'delete',
                                'delete',
                                'testing user 0 deletion',
 -                              '0',
 +                              null,
                                '127.0.0.1',
                                (string)$page->getTitle()->getNamespace(),
                                $page->getTitle()->getDBkey(),