Make use of …::class feature in ContentHandler/DatabaseUpdater
authorThiemo Mättig <thiemo.maettig@wikimedia.de>
Mon, 14 Mar 2016 15:54:50 +0000 (16:54 +0100)
committerThiemo Mättig <thiemo.maettig@wikimedia.de>
Mon, 14 Mar 2016 15:54:50 +0000 (16:54 +0100)
Change-Id: Ic0d51a41c50f52e1fbdab58e3b63319caa5c7d1d

includes/content/ContentHandler.php
includes/installer/DatabaseUpdater.php

index 9ab11f3..c0bd725 100644 (file)
@@ -777,7 +777,7 @@ abstract class ContentHandler {
         * @return string
         */
        protected function getDiffEngineClass() {
-               return 'DifferenceEngine';
+               return DifferenceEngine::class;
        }
 
        /**
index 03f091b..6a20abc 100644 (file)
@@ -63,18 +63,18 @@ abstract class DatabaseUpdater {
        protected $shared = false;
 
        /**
-        * Scripts to run after database update
+        * @var string[] Scripts to run after database update
         * Should be a subclass of LoggedUpdateMaintenance
         */
        protected $postDatabaseUpdateMaintenance = [
-               'DeleteDefaultMessages',
-               'PopulateRevisionLength',
-               'PopulateRevisionSha1',
-               'PopulateImageSha1',
-               'FixExtLinksProtocolRelative',
-               'PopulateFilearchiveSha1',
-               'PopulateBacklinkNamespace',
-               'FixDefaultJsonContentPages'
+               DeleteDefaultMessages::class,
+               PopulateRevisionLength::class,
+               PopulateRevisionSha1::class,
+               PopulateImageSha1::class,
+               FixExtLinksProtocolRelative::class,
+               PopulateFilearchiveSha1::class,
+               PopulateBacklinkNamespace::class,
+               FixDefaultJsonContentPages::class,
        ];
 
        /**
@@ -375,7 +375,7 @@ abstract class DatabaseUpdater {
        /**
         * @since 1.17
         *
-        * @return array
+        * @return string[]
         */
        public function getPostDatabaseUpdateMaintenance() {
                return $this->postDatabaseUpdateMaintenance;