[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Fix phpDocumentor type syntax

2017-06-10 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/358058 )

Change subject: Fix phpDocumentor type syntax
..


Fix phpDocumentor type syntax

I assumed that the Optional? syntax, which I knew from Ceylon [1], was
also supported by phpDocumentor; according to its documentation [2], I
assumed wrong :)

[1]: 
https://ceylon-lang.org/documentation/1.3/reference/structure/type-abbreviation/
[2]: https://www.phpdoc.org/docs/latest/guides/types.html

Change-Id: I5d455402f978a17bf4c4d3492563f2a3a6f57992
---
M includes/ConstraintCheck/Helper/SparqlHelper.php
M tests/phpunit/ResultAssertions.php
M tests/phpunit/SparqlHelperMock.php
3 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/ConstraintCheck/Helper/SparqlHelper.php 
b/includes/ConstraintCheck/Helper/SparqlHelper.php
index 8060342..8023a4c 100644
--- a/includes/ConstraintCheck/Helper/SparqlHelper.php
+++ b/includes/ConstraintCheck/Helper/SparqlHelper.php
@@ -97,7 +97,7 @@
 
/**
 * @param Statement $statement
-* @return EntityId?[]
+* @return (EntityId|null)[]
 */
public function findEntitiesWithSameStatement( Statement $statement ) {
$pid = $statement->getPropertyId()->serialize();
diff --git a/tests/phpunit/ResultAssertions.php 
b/tests/phpunit/ResultAssertions.php
index c053ec7..96a8561 100644
--- a/tests/phpunit/ResultAssertions.php
+++ b/tests/phpunit/ResultAssertions.php
@@ -35,7 +35,7 @@
 * Assert that $result indicates violation of a constraint.
 *
 * @param CheckResult $result
-* @param string? $messageKey If present, additionally assert that the 
violation message
+* @param string|null $messageKey If present, additionally assert that 
the violation message
 *matches the message given by this key.
 */
public function assertViolation( CheckResult $result, $messageKey = 
null ) {
@@ -96,7 +96,7 @@
 * and also record that $result should indicate violation once the 
constraint is implemented.
 *
 * @param CheckResult $result
-* @param string? $messageKey
+* @param string|null $messageKey
 * @see assertTodo
 * @see assertViolation
 */
diff --git a/tests/phpunit/SparqlHelperMock.php 
b/tests/phpunit/SparqlHelperMock.php
index 51dc540..de366bd 100644
--- a/tests/phpunit/SparqlHelperMock.php
+++ b/tests/phpunit/SparqlHelperMock.php
@@ -41,7 +41,7 @@
 
/**
 * @param Statement $expectedStatement
-* @param EntityId?[] $result
+* @param (EntityId|null)[] $result
 * @return SparqlHelper
 */
private function getSparqlHelperMockFindEntities(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5d455402f978a17bf4c4d3492563f2a3a6f57992
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Fix phpDocumentor type syntax

2017-06-09 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358058 )

Change subject: Fix phpDocumentor type syntax
..

Fix phpDocumentor type syntax

I assumed that the Optional? syntax, which I knew from Ceylon [1], was
also supported by phpDocumentor; according to its documentation [2], I
assumed wrong :)

[1]: 
https://ceylon-lang.org/documentation/1.3/reference/structure/type-abbreviation/
[2]: https://www.phpdoc.org/docs/latest/guides/types.html

Change-Id: I5d455402f978a17bf4c4d3492563f2a3a6f57992
---
M includes/ConstraintCheck/Helper/SparqlHelper.php
M tests/phpunit/ResultAssertions.php
M tests/phpunit/SparqlHelperMock.php
3 files changed, 4 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints
 refs/changes/58/358058/1

diff --git a/includes/ConstraintCheck/Helper/SparqlHelper.php 
b/includes/ConstraintCheck/Helper/SparqlHelper.php
index 8060342..8023a4c 100644
--- a/includes/ConstraintCheck/Helper/SparqlHelper.php
+++ b/includes/ConstraintCheck/Helper/SparqlHelper.php
@@ -97,7 +97,7 @@
 
/**
 * @param Statement $statement
-* @return EntityId?[]
+* @return (EntityId|null)[]
 */
public function findEntitiesWithSameStatement( Statement $statement ) {
$pid = $statement->getPropertyId()->serialize();
diff --git a/tests/phpunit/ResultAssertions.php 
b/tests/phpunit/ResultAssertions.php
index c053ec7..96a8561 100644
--- a/tests/phpunit/ResultAssertions.php
+++ b/tests/phpunit/ResultAssertions.php
@@ -35,7 +35,7 @@
 * Assert that $result indicates violation of a constraint.
 *
 * @param CheckResult $result
-* @param string? $messageKey If present, additionally assert that the 
violation message
+* @param string|null $messageKey If present, additionally assert that 
the violation message
 *matches the message given by this key.
 */
public function assertViolation( CheckResult $result, $messageKey = 
null ) {
@@ -96,7 +96,7 @@
 * and also record that $result should indicate violation once the 
constraint is implemented.
 *
 * @param CheckResult $result
-* @param string? $messageKey
+* @param string|null $messageKey
 * @see assertTodo
 * @see assertViolation
 */
diff --git a/tests/phpunit/SparqlHelperMock.php 
b/tests/phpunit/SparqlHelperMock.php
index 51dc540..de366bd 100644
--- a/tests/phpunit/SparqlHelperMock.php
+++ b/tests/phpunit/SparqlHelperMock.php
@@ -41,7 +41,7 @@
 
/**
 * @param Statement $expectedStatement
-* @param EntityId?[] $result
+* @param (EntityId|null)[] $result
 * @return SparqlHelper
 */
private function getSparqlHelperMockFindEntities(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d455402f978a17bf4c4d3492563f2a3a6f57992
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits