jenkins-bot has submitted this change and it was merged.

Change subject: Use "self" keyword to refer to own class name
......................................................................


Use "self" keyword to refer to own class name

Plus a bunch of minor fixups I had laying around in my stashes. If
you prefer this to be split into multiple patches, please tell me.

Change-Id: If4e9e6aba9e58682e2b5d41fd96c3beb6567eb51
---
M includes/ConstraintCheck/Checker/FormatChecker.php
M includes/ConstraintReportFactory.php
M tests/phpunit/Maintenance/UpdateConstraintsTableTest.php
3 files changed, 20 insertions(+), 12 deletions(-)

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



diff --git a/includes/ConstraintCheck/Checker/FormatChecker.php 
b/includes/ConstraintCheck/Checker/FormatChecker.php
index 0b2ceda..6132287 100644
--- a/includes/ConstraintCheck/Checker/FormatChecker.php
+++ b/includes/ConstraintCheck/Checker/FormatChecker.php
@@ -34,7 +34,7 @@
         * Checks 'Format' constraint.
         *
         * @param Statement $statement
-        * @param Constraint constraint
+        * @param Constraint $constraint
         * @param Entity $entity
         *
         * @return CheckResult
diff --git a/includes/ConstraintReportFactory.php 
b/includes/ConstraintReportFactory.php
index b789700..5e8eafe 100644
--- a/includes/ConstraintReportFactory.php
+++ b/includes/ConstraintReportFactory.php
@@ -24,10 +24,10 @@
 use 
WikibaseQuality\ConstraintReport\ConstraintCheck\Checker\SingleValueChecker;
 use WikibaseQuality\ConstraintReport\ConstraintCheck\Checker\MultiValueChecker;
 use 
WikibaseQuality\ConstraintReport\ConstraintCheck\Checker\UniqueValueChecker;
+use WikibaseQuality\ConstraintReport\ConstraintCheck\ConstraintChecker;
 use 
WikibaseQuality\ConstraintReport\ConstraintCheck\Helper\ConnectionCheckerHelper;
 use WikibaseQuality\ConstraintReport\ConstraintCheck\Helper\RangeCheckerHelper;
 use WikibaseQuality\ConstraintReport\ConstraintCheck\Helper\TypeCheckerHelper;
-
 
 class ConstraintReportFactory {
 
@@ -37,7 +37,7 @@
        private $constraintRepository;
 
        /**
-        * @var array
+        * @var ConstraintChecker[]
         */
        private $constraintCheckerMap;
 
@@ -52,7 +52,7 @@
        private $lookup;
 
        /**
-        * @var array
+        * @var array[]
         */
        private $constraintParameterMap;
 
@@ -60,7 +60,7 @@
         * Returns the default instance.
         * IMPORTANT: Use only when it is not feasible to inject an instance 
properly.
         *
-        * @return ConstraintReportFactory
+        * @return self
         */
        public static function getDefaultInstance() {
                static $instance = null;
@@ -91,7 +91,7 @@
        }
 
        /**
-        * @return array
+        * @return ConstraintChecker[]
         */
        private function getConstraintCheckerMap(){
                if ( $this->constraintCheckerMap === null ) {
@@ -125,6 +125,9 @@
                return $this->constraintCheckerMap;
        }
 
+       /**
+        * @return array[]
+        */
        public function getConstraintParameterMap() {
                if ( $this->constraintParameterMap === null ) {
                        $this->constraintParameterMap = array(
@@ -152,6 +155,9 @@
                return $this->constraintParameterMap;
        }
 
+       /**
+        * @return ConstraintRepository
+        */
        public function getConstraintRepository() {
                if ( $this->constraintRepository === null ) {
                        $this->constraintRepository = new ConstraintRepository( 
CONSTRAINT_TABLE );
@@ -160,4 +166,4 @@
                return $this->constraintRepository;
        }
 
-}
\ No newline at end of file
+}
diff --git a/tests/phpunit/Maintenance/UpdateConstraintsTableTest.php 
b/tests/phpunit/Maintenance/UpdateConstraintsTableTest.php
index 7232faa..e13f9e5 100644
--- a/tests/phpunit/Maintenance/UpdateConstraintsTableTest.php
+++ b/tests/phpunit/Maintenance/UpdateConstraintsTableTest.php
@@ -2,8 +2,8 @@
 
 namespace WikibaseQuality\ConstraintReport\Tests\Maintenance;
 
+use MediaWikiTestCase;
 use WikibaseQuality\ConstraintReport\Maintenance\UpdateConstraintsTable;
-
 
 /**
  * @covers WikibaseQuality\ConstraintReport\Maintenance\UpdateConstraintsTable
@@ -15,10 +15,11 @@
  * @author BP2014N1
  * @license GNU GPL v2+
  */
-class UpdateConstraintsTableTest extends \MediaWikiTestCase {
+class UpdateConstraintsTableTest extends MediaWikiTestCase {
 
-    protected function setup() {
-        parent::setup();
+       protected function setUp() {
+               parent::setUp();
+
         $this->tablesUsed[] = CONSTRAINT_TABLE;
     }
 
@@ -83,4 +84,5 @@
             )
         );
     }
-}
\ No newline at end of file
+
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4e9e6aba9e58682e2b5d41fd96c3beb6567eb51
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Bene <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jonaskeutel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to