jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/356358 )

Change subject: Make use of the …::class feature
......................................................................


Make use of the …::class feature

Change-Id: I7a8f6ced47775375c47053fb1784d3f8670be072
---
M composer.json
M includes/Hooks.php
M includes/specials/SpecialAboutTopic.php
M tests/phpunit/includes/SearchHookHandlerTest.php
4 files changed, 23 insertions(+), 4 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/composer.json b/composer.json
index ae69b1b..2176f7d 100644
--- a/composer.json
+++ b/composer.json
@@ -13,6 +13,9 @@
                "issues": "https://phabricator.wikimedia.org/";,
                "irc": "irc://irc.freenode.net/wikidata"
        },
+       "require": {
+               "php": ">=5.5.9"
+       },
        "require-dev": {
                "jakub-onderka/php-parallel-lint": "0.9.2",
                "mediawiki/mediawiki-codesniffer": "0.7.2"
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 6e38f2b..81fb3b4 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -2,6 +2,8 @@
 
 namespace ArticlePlaceholder;
 
+use ArticlePlaceholder\Lua\Scribunto_LuaArticlePlaceholderLibrary;
+
 /**
  * File defining the hook handlers for the ArticlePlaceholder extension.
  *
@@ -19,7 +21,7 @@
        public static function onScribuntoExternalLibraries( $engine, array 
&$extraLibraries ) {
                if ( $engine === 'lua' ) {
                        
$extraLibraries['mw.ext.articlePlaceholder.entityRenderer'] = [
-                               'class' => 
'ArticlePlaceholder\Lua\Scribunto_LuaArticlePlaceholderLibrary',
+                               'class' => 
Scribunto_LuaArticlePlaceholderLibrary::class,
                                'deferLoad' => true,
                        ];
                }
diff --git a/includes/specials/SpecialAboutTopic.php 
b/includes/specials/SpecialAboutTopic.php
index 1ac195f..a1b264e 100644
--- a/includes/specials/SpecialAboutTopic.php
+++ b/includes/specials/SpecialAboutTopic.php
@@ -81,7 +81,7 @@
        private $entityLookup;
 
        /**
-        * @var bool|string $searchEngineIndexed
+        * @var bool|string
         */
        private $searchEngineIndexed;
 
diff --git a/tests/phpunit/includes/SearchHookHandlerTest.php 
b/tests/phpunit/includes/SearchHookHandlerTest.php
index fcf7fd8..e80bc96 100644
--- a/tests/phpunit/includes/SearchHookHandlerTest.php
+++ b/tests/phpunit/includes/SearchHookHandlerTest.php
@@ -9,8 +9,10 @@
 use Liuggio\StatsdClient\Factory\StatsdDataFactory;
 use MediaWikiTestCase;
 use OutputPage;
+use PHPUnit_Framework_MockObject_MockObject;
 use ReflectionMethod;
 use RequestContext;
+use SpecialSearch;
 use Title;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\ItemId;
@@ -96,17 +98,29 @@
                return $termSearchInteractor;
        }
 
+       /**
+        * @return SpecialSearch|PHPUnit_Framework_MockObject_MockObject
+        */
        private function getSpecialSearch() {
-               $mock = $this->getMockBuilder( 'SpecialSearch' )
+               return $this->getMockBuilder( SpecialSearch::class )
                        ->disableOriginalConstructor()
                        ->getMock();
-               return $mock;
        }
 
+       /**
+        * @return string
+        */
        private function getLanguageCode() {
                return 'en';
        }
 
+       /**
+        * @param bool $doNotReturnTerms
+        * @param int &$hasResults
+        * @param int &$noResults
+        *
+        * @return SearchHookHandler
+        */
        protected function newSearchHookHandler(
                $doNotReturnTerms = false,
                &$hasResults = 0,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a8f6ced47775375c47053fb1784d3f8670be072
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticlePlaceholder
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Lucie Kaffee <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to