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

Change subject: More specific types in value validators
......................................................................


More specific types in value validators

Similar to what we do in formatters and parsers.

Change-Id: I3cb1171b699dba6efd0f03e238d87ea04b8d690a
---
M repo/includes/Validators/MembershipValidator.php
M repo/tests/phpunit/includes/Validators/TestValidator.php
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Adrian Lang: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/includes/Validators/MembershipValidator.php 
b/repo/includes/Validators/MembershipValidator.php
index edc4a12..626cf13 100644
--- a/repo/includes/Validators/MembershipValidator.php
+++ b/repo/includes/Validators/MembershipValidator.php
@@ -16,7 +16,7 @@
 class MembershipValidator implements ValueValidator {
 
        /**
-        * @var array
+        * @var string[]
         */
        private $allowed;
 
@@ -31,7 +31,7 @@
        private $normalizer;
 
        /**
-        * @param array $allowed The allowed values
+        * @param string[] $allowed The allowed values
         * @param string $errorCode Code to use in Errors; should indicate what 
kind of value would have been allowed.
         * @param callable|string|null $normalizer An optional function to 
normalize the value before
         *                        comparing it to the list of allowed values, 
e.g. 'strtolower'.
diff --git a/repo/tests/phpunit/includes/Validators/TestValidator.php 
b/repo/tests/phpunit/includes/Validators/TestValidator.php
index 2824030..bc8eb95 100644
--- a/repo/tests/phpunit/includes/Validators/TestValidator.php
+++ b/repo/tests/phpunit/includes/Validators/TestValidator.php
@@ -26,7 +26,7 @@
        }
 
        /**
-        * @param mixed $value
+        * @param string|DataValue $value
         *
         * @return Result
         */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3cb1171b699dba6efd0f03e238d87ea04b8d690a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Adrian Lang <[email protected]>
Gerrit-Reviewer: Bene <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to