Umherirrender has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/371006 )
Change subject: Improve some parameter docs
......................................................................
Improve some parameter docs
Change-Id: I4cb9f1739ada66ddb368a1bb94d7d4f11462d0c0
---
M api/ApiQueryMessageGroups.php
M messagegroups/WikiPageMessageGroup.php
M phpcs.xml
M tag/TranslatablePage.php
M ttmserver/Interfaces.php
M utils/TranslationHelpers.php
6 files changed, 21 insertions(+), 21 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate
refs/changes/06/371006/1
diff --git a/api/ApiQueryMessageGroups.php b/api/ApiQueryMessageGroups.php
index 3305ae9..7ec0da1 100644
--- a/api/ApiQueryMessageGroups.php
+++ b/api/ApiQueryMessageGroups.php
@@ -203,7 +203,7 @@
* Get the workflow states applicable to the given message group
*
* @param MessageGroup $group
- * @return boolean|array Associative array with states as key and
localized state
+ * @return bool|array Associative array with states as key and
localized state
* labels as values
*/
protected function getWorkflowStates( MessageGroup $group ) {
diff --git a/messagegroups/WikiPageMessageGroup.php
b/messagegroups/WikiPageMessageGroup.php
index a991989..230cd7c 100644
--- a/messagegroups/WikiPageMessageGroup.php
+++ b/messagegroups/WikiPageMessageGroup.php
@@ -108,7 +108,7 @@
*
* @param string $key Message key
* @param string $code Language code
- * @param integer $flags READ_* class constant bitfield
+ * @param int $flags READ_* class constant bitfield
* @return string|null Stored translation or null.
*/
public function getMessage( $key, $code, $flags = self::READ_LATEST ) {
diff --git a/phpcs.xml b/phpcs.xml
index 673182e..366a58c 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<ruleset>
- <rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
+ <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude
name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentStart"/><!--T168963-->
<exclude
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected"/>
<exclude
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic"/>
diff --git a/tag/TranslatablePage.php b/tag/TranslatablePage.php
index bfbb914..44f643b 100644
--- a/tag/TranslatablePage.php
+++ b/tag/TranslatablePage.php
@@ -87,7 +87,7 @@
* behavior will happen.
*
* @param Title $title
- * @param integer $revision Revision number
+ * @param int $revision Revision number
* @throws MWException
* @return TranslatablePage
*/
@@ -159,7 +159,7 @@
/**
* Revision is null if object was constructed using newFromText.
- * @return null or integer
+ * @return null|int
*/
public function getRevision() {
return $this->revision;
@@ -167,7 +167,7 @@
/**
* Manually set a revision number to use loading page text.
- * @param integer $revision
+ * @param int $revision
*/
public function setRevision( $revision ) {
$this->revision = $revision;
@@ -510,7 +510,7 @@
/**
* Adds a tag which indicates that this page is
* suitable for translation.
- * @param integer $revision
+ * @param int $revision
* @param null|string $value
*/
public function addMarkedTag( $revision, $value = null ) {
@@ -520,7 +520,7 @@
/**
* Adds a tag which indicates that this page source is
* ready for marking for translation.
- * @param integer $revision
+ * @param int $revision
*/
public function addReadyTag( $revision ) {
$this->addTag( 'tp:tag', $revision );
@@ -559,7 +559,7 @@
/**
* Returns the latest revision which has marked tag, if any.
- * @return integer|bool false
+ * @return int|bool false
*/
public function getMarkedTag() {
return $this->getTag( 'tp:mark' );
diff --git a/ttmserver/Interfaces.php b/ttmserver/Interfaces.php
index cda9ee1..64e1906 100644
--- a/ttmserver/Interfaces.php
+++ b/ttmserver/Interfaces.php
@@ -113,7 +113,7 @@
* a frozen service may lead to errors or unexpected behaviors.
*
* @since 2017.04
- * @return boolean true if the service is frozen
+ * @return bool true if the service is frozen
*/
public function isFrozen();
}
diff --git a/utils/TranslationHelpers.php b/utils/TranslationHelpers.php
index 04bca1a..0650b10 100644
--- a/utils/TranslationHelpers.php
+++ b/utils/TranslationHelpers.php
@@ -82,7 +82,7 @@
/**
* Sets the HTML id of the text area that contains the translation.
- * @param $id String
+ * @param String $id
*/
public function setTextareaId( $id ) {
$this->textareaId = $id;
@@ -90,7 +90,7 @@
/**
* Enable or disable extra help for editing.
- * @param $mode Boolean
+ * @param bool $mode
*/
public function setEditMode( $mode = true ) {
$this->editMode = $mode;
@@ -169,8 +169,8 @@
* Returns block element HTML snippet that contains the translation
aids.
* Not all boxes are shown all the time depending on whether they have
* any information to show and on configuration variables.
- * @param $suggestions string
- * @return String. Block level HTML snippet or empty string.
+ * @param string $suggestions
+ * @return String Block level HTML snippet or empty string.
*/
public function getBoxes( $suggestions = 'sync' ) {
// Box filter
@@ -527,7 +527,7 @@
}
/**
- * @param $label string
+ * @param string $label
* @return string
*/
protected static function legend( $label ) {
@@ -543,7 +543,7 @@
}
/**
- * @param $code string
+ * @param string $code
* @return array
*/
protected static function getFallbacks( $code ) {
@@ -608,8 +608,8 @@
}
/**
- * @param $id string|int
- * @param $text string
+ * @param string|int $id
+ * @param string $text
* @return string
*/
public function wrapInsert( $id, $text ) {
@@ -618,8 +618,8 @@
/**
* Ajax-enabled message editing link.
- * @param $target Title: Title of the target message.
- * @param $text String: Link text for Linker::link()
+ * @param Title $target Title of the target message.
+ * @param string $text Link text for Linker::link()
* @return string HTML link
*/
public static function ajaxEditLink( $target, $text ) {
@@ -637,7 +637,7 @@
/**
* Escapes $id such that it can be used in jQuery selector.
- * @param $id string
+ * @param string $id
* @return string
*/
public static function jQueryPathId( $id ) {
--
To view, visit https://gerrit.wikimedia.org/r/371006
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4cb9f1739ada66ddb368a1bb94d7d4f11462d0c0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits