Thiemo Mättig (WMDE) has uploaded a new change for review.
https://gerrit.wikimedia.org/r/135420
Change subject: Fix broken documentation in Lib
......................................................................
Fix broken documentation in Lib
Fixing a whole bunch of documentation errors as reported by the
PHPStorm code analysis. Along with some obvious typos.
If you think I did something wrong, please ask.
Change-Id: I47988f27230e3d14f767e5fe393ef58e3d828b2d
---
M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
M lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
M lib/resources/wikibase.Site.js
M lib/resources/wikibase.datamodel/datamodel.entities/wikibase.Entity.js
M lib/resources/wikibase.js
M lib/resources/wikibase.ui.PropertyEditTool.EditableAliases.js
M lib/resources/wikibase.ui.PropertyEditTool.EditableSiteLink.js
M lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
M lib/resources/wikibase.ui.PropertyEditTool.EditableValue.ListInterface.js
M lib/resources/wikibase.ui.PropertyEditTool.EditableValue.SiteIdInterface.js
M lib/resources/wikibase.ui.PropertyEditTool.EditableValue.js
M lib/resources/wikibase.ui.SiteLinksEditTool.js
M lib/resources/wikibase.ui.js
M lib/resources/wikibase.utilities/wikibase.utilities.GuidGenerator.js
M lib/resources/wikibase.utilities/wikibase.utilities.jQuery.js
M lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.js
M
lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.js
M lib/resources/wikibase.utilities/wikibase.utilities.js
M lib/resources/wikibase.utilities/wikibase.utilities.ui.StatableObject.js
M lib/resources/wikibase.utilities/wikibase.utilities.ui.js
M lib/tests/qunit/wikibase.datamodel/datamodel.Entity.tests.js
M lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableDescription.tests.js
M lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableLabel.tests.js
M
lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableValue.SiteIdInterface.tests.js
M lib/tests/qunit/wikibase.utilities/wikibase.utilities.jQuery.tests.js
M
lib/tests/qunit/wikibase.utilities/wikibase.utilities.ui.StatableObject.tests.js
26 files changed, 75 insertions(+), 74 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/20/135420/1
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
index 9de45fe..81341a1 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
@@ -278,7 +278,7 @@
this.$hiddenInput = null;
}
this._term = null;
- this._offest = 0;
+ this.offset = 0;
$.ui.suggester.prototype.destroy.call( this );
},
diff --git a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
index 45c8746..615cafa 100644
--- a/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
+++ b/lib/resources/wikibase.RepoApi/wikibase.RepoApi.js
@@ -313,9 +313,9 @@
/**
* Changes the Main Snak of an existing claim.
*
- * @param {String} claimGuid The GUID of the Claim to be changed
(wb.Claim.getGuid)
- * @param {Number} baseRevId
- * @param {string} snaktype The type of the snak
+ * @param {string} claimGuid The GUID of the Claim to be changed
(wb.Claim.getGuid)
+ * @param {number} baseRevId
+ * @param {string} snakType The type of the snak
* @param {string} property Id of the snak's property
* @param {object} value The value to set the datavalue of the the main
snak of the claim to
* @return {jQuery.Promise}
@@ -469,8 +469,8 @@
*
* @since 0.4
*
- * @param {Object} params parameters for the API call
- * @param {Object} ajax options
+ * @param {object} params parameters for the API call
+ * @param {object} options AJAX options
*/
_extendRepoCallParams: function( params, options ) {
var localServerRaw = mw.config.get( 'wgServer' ).replace(
/.*\/\//, '' ),
diff --git a/lib/resources/wikibase.Site.js b/lib/resources/wikibase.Site.js
index 80cb373..22dc0c1 100644
--- a/lib/resources/wikibase.Site.js
+++ b/lib/resources/wikibase.Site.js
@@ -96,7 +96,7 @@
* NOTE: for solving bug 40399 there is some additional magic in
EditableSiteLink where we overwrite this function
* to cache the exact urls returned by the API after creating a
new site-link.
*
- * @param string pageTitle title of the page within the site
+ * @param {string} pageTitle title of the page within the site
* @return string
*/
getUrlTo: function( pageTitle ) {
@@ -107,7 +107,7 @@
/**
* Returns a html link to a site of the site. To get the url only, use
getUrlTo().
*
- * @param string pageTitle title of the site within the site
+ * @param {string} pageTitle title of the site within the site
* @return jQuery link to the site
*/
getLinkTo: function( pageTitle ) {
@@ -156,7 +156,7 @@
* Does the encoding for a site so it can be used within the url to the
site.
* This should propably be over written in case the site is not a
MediaWiki installation.
*
- * @param string pageTitle
+ * @param {string} pageTitle
* @return string
*/
_urlEncodeSite: function( pageTitle ) {
diff --git
a/lib/resources/wikibase.datamodel/datamodel.entities/wikibase.Entity.js
b/lib/resources/wikibase.datamodel/datamodel.entities/wikibase.Entity.js
index 3721db8..7e10868 100644
--- a/lib/resources/wikibase.datamodel/datamodel.entities/wikibase.Entity.js
+++ b/lib/resources/wikibase.datamodel/datamodel.entities/wikibase.Entity.js
@@ -113,9 +113,9 @@
* Helper function to compare whether two entities have the same values
for a multi-lingual
* property.
*
- * @param {string} fieldAccessor wb.Entity's function name to get the
fields values.
* @param {wb.Entity} entity1
* @param {wb.Entity} entity2
+ * @param {string} fieldFnName wb.Entity's function name to get the
fields values.
* @return boolean
*/
function entitiesHaveEqualMultiLingualField( entity1, entity2,
fieldFnName ) {
diff --git a/lib/resources/wikibase.js b/lib/resources/wikibase.js
index bb09a5d..5210147 100644
--- a/lib/resources/wikibase.js
+++ b/lib/resources/wikibase.js
@@ -187,7 +187,7 @@
* Returns a wikibase.Site object with details about a site by the
sites ID. If there is no site
* related to the given ID, null will be returned.
*
- * @param int siteId
+ * @param {int} siteId
* @return wikibase.Site|null
*/
this.getSite = function( siteId ) {
@@ -209,7 +209,7 @@
*
* @since 0.4
*
- * @param string globalSiteId
+ * @param {string} globalSiteId
* @return wikibase.Site|null
*/
this.getSiteByGlobalId = function( globalSiteId ) {
diff --git a/lib/resources/wikibase.ui.PropertyEditTool.EditableAliases.js
b/lib/resources/wikibase.ui.PropertyEditTool.EditableAliases.js
index aa427ff..13cb774 100644
--- a/lib/resources/wikibase.ui.PropertyEditTool.EditableAliases.js
+++ b/lib/resources/wikibase.ui.PropertyEditTool.EditableAliases.js
@@ -107,7 +107,7 @@
* Sets a value
* @see wikibase.ui.PropertyEditTool.EditableValue
*
- * @param Array value to set
+ * @param {array} value to set
* @return Array set value
*/
setValue: function( value ) {
diff --git a/lib/resources/wikibase.ui.PropertyEditTool.EditableSiteLink.js
b/lib/resources/wikibase.ui.PropertyEditTool.EditableSiteLink.js
index a037bc3..3f91895 100644
--- a/lib/resources/wikibase.ui.PropertyEditTool.EditableSiteLink.js
+++ b/lib/resources/wikibase.ui.PropertyEditTool.EditableSiteLink.js
@@ -234,7 +234,7 @@
/**
* Calling the corresponding method in the wikibase.RepoApi
*
- * @param number apiAction see this.API_ACTION enum for all available
actions
+ * @param {number} apiAction see this.API_ACTION enum for all available
actions
* @return {jQuery.Promise}
*/
queryApi: function( apiAction ) {
diff --git
a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
index d93cb41..f8dafa8 100644
--- a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
+++ b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
@@ -216,7 +216,7 @@
/**
* Set HTML language and directionality attributes.
*
- * @param Object language
+ * @param {object} language
*/
setLanguageAttributes: function( language ) {
this.getSubject().attr( 'lang', language.code ).attr( 'dir',
language.dir );
@@ -284,7 +284,7 @@
/**
* Destroys the edit box and displays the original text or the inputs
new value.
*
- * @param bool save whether to save the new user given value
+ * @param {bool} save whether to save the new user given value
* @return bool whether the value has changed compared to the original
value
*/
stopEditing: function( save ) {
@@ -391,7 +391,7 @@
* invalid values will result into emptying the widget's
value (setting the value
* to null)
*
- * @param string value
+ * @param {string} value
* @return string|null same as value but normalized, null in case the
value was invalid
*/
setValue: function( value ) {
@@ -417,8 +417,8 @@
/**
* Helper function comparing two values returned by getValue() or
getInitialValue().
*
- * @param String value1
- * @param String value2 [optional] if not given, this will check
whether value1 is empty
+ * @param {string} value1
+ * @param {string} value2 [optional] if not given, this will check
whether value1 is empty
* @return bool true for equal/empty, false if not
*/
valueCompare: function( value1, value2 ) {
@@ -434,7 +434,7 @@
/**
* Called by setValue() if the value has to be injected into the input
interface in edit mode.
*
- * @param string value
+ * @param {string} value
* @return bool whether the value has been changed
*/
_setValue_inEditMode: function( value ) {
@@ -445,7 +445,7 @@
/**
* Called by setValue() if the value has to be injected into the static
DOM nodes, not into input elements.
*
- * @param string value
+ * @param {string} value
* @return bool whether the value has been changed
*/
_setValue_inNonEditMode: function( value ) {
@@ -458,7 +458,7 @@
* This will be done automatically when using setValue().
* In case the given value is invalid, null will be returned.
*
- * @param string value
+ * @param {string} value
* @return string|null
*/
normalize: function( value ) {
@@ -524,7 +524,7 @@
/**
* Velidates whether a certain value would be valid for this editable
value.
*
- * @param string text
+ * @param {string} value
* @return bool
*/
validate: function( value ) {
diff --git
a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.ListInterface.js
b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.ListInterface.js
index 7829b3d..ffe9329 100644
--- a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.ListInterface.js
+++ b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.ListInterface.js
@@ -133,7 +133,7 @@
/**
* @see
wikibase.ui.PropertyEditTool.EditableValue.Interface._getValue_inEditMode
*
- * @param string[]
+ * @return string[]
*/
_getValue_inEditMode: function() {
var tagadata = this._getTagadata(),
@@ -151,7 +151,7 @@
/**
* @see
wikibase.ui.PropertyEditTool.EditableValue.Interface._getValue_inNonEditMode
*
- * @param string[]
+ * @return string[]
*/
_getValue_inNonEditMode: function() {
var values = [],
@@ -167,7 +167,7 @@
/**
* @see
wikibase.ui.PropertyEditTool.EditableValue.Interface._setValue_inEditMode
*
- * @param string[] value
+ * @param {string[]} value
* @return bool
*/
_setValue_inEditMode: function( value ) {
@@ -182,7 +182,7 @@
/**
* @see
wikibase.ui.PropertyEditTool.EditableValue.Interface._setValue_inNonEditMode
*
- * @param string[] value
+ * @param {string[]} value
* @return bool
*/
_setValue_inNonEditMode: function( value ) {
@@ -257,8 +257,8 @@
* Compares all values of the two lists, normalizes the lists first.
This means the values can be in random and
* still be considered equal.
*
- * @param String[] value1
- * @param String[] value2 [optional] if not given, this will check
whether value1 is empty
+ * @param {string[]} value1
+ * @param {string[]} value2 [optional] if not given, this will check
whether value1 is empty
* @return bool true for equal/empty, false if not
*/
valueCompare: function( value1, value2 ) {
@@ -306,7 +306,7 @@
* Normalizes a set of values. If any of the values pieces is invalid,
the piece will be removed.
* If in the end no piece is left because all pieces were invalid, an
empty array will be returned.
*
- * @param String[] value
+ * @param {string[]} value
* @return String[] all parts of the value which are valid, can be an
empty array
*/
normalize: function( value ) {
@@ -326,7 +326,7 @@
/**
* Validates a piece of a list value.
*
- * @param String value
+ * @param {string} value
* @return Bool
*/
validatePiece: function( value ) {
@@ -339,7 +339,7 @@
* This will be done automatically when using setValue().
* In case the given value is invalid, null will be returned.
*
- * @param String value
+ * @param {string} value
* @return String|null
*/
normalizePiece: function( value ) {
diff --git
a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.SiteIdInterface.js
b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.SiteIdInterface.js
index c9b16d6..546f622 100644
---
a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.SiteIdInterface.js
+++
b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.SiteIdInterface.js
@@ -177,7 +177,7 @@
/**
* @see
wikibase.ui.PropertyEditTool.EditableValue.Interface._setValue_inNonEditMode
*
- * @param string value
+ * @param {string} value
* @return bool whether the value has been changed
*/
_setValue_inNonEditMode: function( value ) {
diff --git a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.js
b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.js
index 2fb3e77..c1e2a6c 100644
--- a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.js
+++ b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.js
@@ -683,7 +683,7 @@
* Returns null in case the API module doesn't return any normalized
value. This will fai an error if the given
* response is not compatible.
*
- * @param array response
+ * @param {array} response
* @return array|null // TODO should be a DataValue object
*/
_getValueFromApiResponse: function( response ) {
@@ -695,7 +695,7 @@
/**
* Extracts the returned revision id from the API response and saves it
to the revision store
*
- * @param array response
+ * @param {array} response
*/
_setRevisionIdFromApiResponse: function( response ) {
return true;
@@ -796,7 +796,7 @@
* Sets a value
* // TODO: should take an object representing a data value
*
- * @param Array|string value
+ * @param {array|string} value
* @return Array value but normalized
*/
setValue: function( value ) {
@@ -876,7 +876,7 @@
*
* @todo: we might want to move this into a data value/type
representing prototype later.
*
- * @param Array value
+ * @param {array} value
* @return bool
*/
validate: function( value ) {
@@ -902,8 +902,8 @@
*
* @todo: mark this deprecated as soon as we use objects representing
property values...
*
- * @param Array value1
- * @param Array value2 [optional] if not given, this will check whether
value1 is empty
+ * @param {array} value1
+ * @param {array} value2 [optional] if not given, this will check
whether value1 is empty
* @return bool true for equal/empty, false if not
*/
valueCompare: function( value1, value2 ) {
diff --git a/lib/resources/wikibase.ui.SiteLinksEditTool.js
b/lib/resources/wikibase.ui.SiteLinksEditTool.js
index 277b064..b6d6e52 100644
--- a/lib/resources/wikibase.ui.SiteLinksEditTool.js
+++ b/lib/resources/wikibase.ui.SiteLinksEditTool.js
@@ -320,9 +320,9 @@
/**
* @see wb.ui.PropertyEditTool._newValueHandler_onAfterStopEditing
*
- * @param wikibase.ui.PropertyEditTool.EditableValue newValue
- * @param bool save
- * @param bool wasPending
+ * @param {wikibase.ui.PropertyEditTool.EditableValue} newValue
+ * @param {bool} save
+ * @param {bool} wasPending
*/
_newValueHandler_onAfterStopEditing: function( newValue, save,
wasPending ) {
PARENT.prototype._newValueHandler_onAfterStopEditing.call(
this, newValue, save );
diff --git a/lib/resources/wikibase.ui.js b/lib/resources/wikibase.ui.js
index ad8ed60..6db9b2d 100644
--- a/lib/resources/wikibase.ui.js
+++ b/lib/resources/wikibase.ui.js
@@ -6,7 +6,7 @@
* @author Daniel Werner
* @author H. Snater
*/
-( function( mw, wb, $, undefined ) {
+( function( wb ) {
'use strict';
/**
@@ -18,4 +18,4 @@
*/
wb.ui = wb.ui || {};
-} )( mediaWiki, wikibase, jQuery );
+} )( wikibase );
diff --git
a/lib/resources/wikibase.utilities/wikibase.utilities.GuidGenerator.js
b/lib/resources/wikibase.utilities/wikibase.utilities.GuidGenerator.js
index a4b5fec..7eaf799 100644
--- a/lib/resources/wikibase.utilities/wikibase.utilities.GuidGenerator.js
+++ b/lib/resources/wikibase.utilities/wikibase.utilities.GuidGenerator.js
@@ -36,7 +36,7 @@
*
* @param {number} min Minimum number
* @param {number} max Maximum number
- * @return {Number}
+ * @return {string}
*/
_getRandomHex: function( min, max ) {
return ( Math.floor( Math.random() * ( max - min + 1 )
) + min ).toString( 16 );
diff --git a/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.js
b/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.js
index 0d0773e..12b33a7 100644
--- a/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.js
+++ b/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.js
@@ -23,7 +23,7 @@
*
* @since 0.1
*
- * @param RegExp classNameRegex
+ * @param {RegExp} classNameRegex
* @return jQuery
*/
$.fn.removeClassByRegex = function( classNameRegex ) {
diff --git a/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.js
b/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.js
index 9c54ef7..ece6ea1 100644
--- a/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.js
+++ b/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.js
@@ -7,7 +7,7 @@
* @licence GNU GPL v2+
* @author Daniel Werner
*/
-( function( mw, wb, $, undefined ) {
+( function( wb ) {
'use strict';
/**
@@ -16,4 +16,4 @@
*/
wb.utilities.jQuery.ui = wb.utilities.jQuery.ui || {};
-}( mediaWiki, wikibase, jQuery ) );
\ No newline at end of file
+}( wikibase ) );
\ No newline at end of file
diff --git
a/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.js
b/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.js
index 73a97ee..11f7d62 100644
---
a/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.js
+++
b/lib/resources/wikibase.utilities/wikibase.utilities.jQuery.ui.tagadata/wikibase.utilities.jQuery.ui.tagadata.js
@@ -146,7 +146,7 @@
/**
* Returns a tags element by its label. If the tag is not in
the list, null will be returned.
*
- * @param string label
+ * @param {string} label
* @return jQuery|null
*/
getTag: function( label ) {
@@ -165,7 +165,7 @@
/**
* Helper function to return all tags having the same value
currently
*
- * @param String label
+ * @param {string} label
* @return jQuery
*/
_getTags: function( label ) {
@@ -180,7 +180,7 @@
/**
* Returns the label of a tag represented by a DOM node.
*
- * @param jQuery tag
+ * @param {jQuery} tag
* @return string
*/
getTagLabel: function( tag ) {
@@ -195,7 +195,7 @@
/**
* Returns whether the tag with an given label is present
within the list of tags already
*
- * @param string label
+ * @param {string} label
* @return Boolean
*/
hasTag: function( label ) {
@@ -230,8 +230,8 @@
*
* TODO: this function is waaay too long
*
- * @param String value
- * @param String|Array additionalClasses
+ * @param {string} value
+ * @param {string|array} additionalClasses
* @return jQuery
*/
createTag: function( value, additionalClasses ) {
@@ -456,8 +456,8 @@
/**
* Returns whether the given tag is the helper tag. Doesn NOT
create a helper tag if it isn't.
*
- * @param tag jQuery
- * @return Boolean
+ * @param {jQuery} tag
+ * @return boolean
*/
isHelperTag: function( tag ) {
var helperTag = this.tagList.find(
'.tagadata-choice:last' );
@@ -467,9 +467,9 @@
/**
* Removes a tag which can be received by getTag() via its
label.
*
- * @param jQuery tag
- * @param animate (optional)
- * @return Boolean
+ * @param {jQuery} tag
+ * @param {boolean} animate (optional)
+ * @return boolean
*/
removeTag: function( tag, animate ) {
animate = animate || this.options.animate;
diff --git a/lib/resources/wikibase.utilities/wikibase.utilities.js
b/lib/resources/wikibase.utilities/wikibase.utilities.js
index a53ae46..8c860ac 100644
--- a/lib/resources/wikibase.utilities/wikibase.utilities.js
+++ b/lib/resources/wikibase.utilities/wikibase.utilities.js
@@ -15,8 +15,8 @@
* Can be used to create an empty constructor which can be used to
create a new Object and at the same time has a
* static function to extend an existing Object/constructor with some
functionality.
*
- * @param Function base (optional) another extension or object from
which the new one should inherit
- * @param Object members the prototype definition of the new
constructor.
+ * @param {function} base (optional) another extension or object from
which the new one should inherit
+ * @param {object} members the prototype definition of the new
constructor.
*
* @return Function the constructor for the standalone version of the
extension, which also has a static 'extend'
* function attached for extending Objects/constructors with
the extensions functionality.
@@ -34,8 +34,8 @@
* Since JavaScript doesn't support multiple parents in
prototype chains, this will copy functions into the
* given object or the constructors prototype if a constructor
is given.
*
- * @param Function|Object target constructor or Object which
should receive the extension.
- * @param Object members allows to immediately overwrite
(abstract) extension functions.
+ * @param {function|object} target constructor or Object which
should receive the extension.
+ * @param {object} members allows to immediately overwrite
(abstract) extension functions.
*/
Ext.useWith = function( target, members ) {
// we can extend Objects or constructors (prototypes)
diff --git
a/lib/resources/wikibase.utilities/wikibase.utilities.ui.StatableObject.js
b/lib/resources/wikibase.utilities/wikibase.utilities.ui.StatableObject.js
index acb9dc2..ea53ce5 100644
--- a/lib/resources/wikibase.utilities/wikibase.utilities.ui.StatableObject.js
+++ b/lib/resources/wikibase.utilities/wikibase.utilities.ui.StatableObject.js
@@ -57,7 +57,7 @@
/**
* Sets the object's state.
*
- * @param Number state one of wb.ui.EditableValue.STATE
+ * @param {number} state one of wb.ui.EditableValue.STATE
* @return Boolean whether the desired state has been applied
(or had been applied already)
*/
setState: function( state ) {
diff --git a/lib/resources/wikibase.utilities/wikibase.utilities.ui.js
b/lib/resources/wikibase.utilities/wikibase.utilities.ui.js
index 9bc60d1..2858848 100644
--- a/lib/resources/wikibase.utilities/wikibase.utilities.ui.js
+++ b/lib/resources/wikibase.utilities/wikibase.utilities.ui.js
@@ -37,7 +37,7 @@
* @since 0.4
*
* @param {wb.Entity} entity
- * @param {mw.Title} title
+ * @param {Title} title
* @return {jQuery} An 'a' element
*/
wb.utilities.ui.buildLinkToEntityPage = function( entity, title ) {
diff --git a/lib/tests/qunit/wikibase.datamodel/datamodel.Entity.tests.js
b/lib/tests/qunit/wikibase.datamodel/datamodel.Entity.tests.js
index 6aaf31b..3c9a3f5 100644
--- a/lib/tests/qunit/wikibase.datamodel/datamodel.Entity.tests.js
+++ b/lib/tests/qunit/wikibase.datamodel/datamodel.Entity.tests.js
@@ -42,7 +42,7 @@
* Returns a new Entity with the given data given to the
constructor, or an empty Entity
* if first parameter is omitted.
*
- * @param {Object} data
+ * @param {object} [data] (optional)
* @return wb.Entity
*/
function newEntity( data ) {
diff --git
a/lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableDescription.tests.js
b/lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableDescription.tests.js
index ab59fc9..d0685d3 100644
--- a/lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableDescription.tests.js
+++ b/lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableDescription.tests.js
@@ -77,7 +77,7 @@
} else {
return '';
}
- }
+ };
var withLanguage = setup( { valueLanguageContext: 'de' } ),
withoutLanguage = setup( { valueLanguageContext: 'ru' }
);
diff --git
a/lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableLabel.tests.js
b/lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableLabel.tests.js
index 84a3c7f..ba63911 100644
--- a/lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableLabel.tests.js
+++ b/lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableLabel.tests.js
@@ -77,7 +77,7 @@
} else {
return '';
}
- }
+ };
var withLanguage = setup( { valueLanguageContext: 'de' } ),
withoutLanguage = setup( { valueLanguageContext: 'ru' }
);
diff --git
a/lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableValue.SiteIdInterface.tests.js
b/lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableValue.SiteIdInterface.tests.js
index fb53f3f..2ea7517 100644
---
a/lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableValue.SiteIdInterface.tests.js
+++
b/lib/tests/qunit/wikibase.ui.PropertyEditTool.EditableValue.SiteIdInterface.tests.js
@@ -16,7 +16,8 @@
* Factory for creating a new SiteIdInteface object suited for testing.
*
* @param {jQuery} [$node]
- * @return {wb.ui.PropertyEditTool.EditableValue.SiteIdInterface}
+ * @param {object} [options]
+ * @return {wb.ui.PropertyEditTool.EditableValue.SiteIdInterface}
*/
var newTestSiteIdInterface = function( $node, options ) {
if ( options === undefined ) {
diff --git
a/lib/tests/qunit/wikibase.utilities/wikibase.utilities.jQuery.tests.js
b/lib/tests/qunit/wikibase.utilities/wikibase.utilities.jQuery.tests.js
index 24038b2..cacf3b9 100644
--- a/lib/tests/qunit/wikibase.utilities/wikibase.utilities.jQuery.tests.js
+++ b/lib/tests/qunit/wikibase.utilities/wikibase.utilities.jQuery.tests.js
@@ -71,7 +71,7 @@
'removed all classes from all three elements (from a
clone)'
);
- var tmp = subject.clone().removeClassByRegex( /^\d+$/ );
+ tmp = subject.clone().removeClassByRegex( /^\d+$/ );
equal(
$( tmp[0] ).attr( 'class' ) + "_" + $( tmp[1] ).attr(
'class' ) + "_" + $( tmp[2] ).attr( 'class' ),
'A B C_AA BB CC_AAA BBB CCC',
diff --git
a/lib/tests/qunit/wikibase.utilities/wikibase.utilities.ui.StatableObject.tests.js
b/lib/tests/qunit/wikibase.utilities/wikibase.utilities.ui.StatableObject.tests.js
index b1ab998..2f302e6 100644
---
a/lib/tests/qunit/wikibase.utilities/wikibase.utilities.ui.StatableObject.tests.js
+++
b/lib/tests/qunit/wikibase.utilities/wikibase.utilities.ui.StatableObject.tests.js
@@ -52,10 +52,10 @@
/**
* Helper function for testing getState(), isEnabled() and
isDisabled()
*
- * @param String currentState
- * @param String fnName name of the function to be tested
- * @param Array args (optional) arguments for the function. Can
be skipped.
- * @param expected what the function should return
+ * @param {int} currentState
+ * @param {string} fnName name of the function to be tested
+ * @param {array} [args] (optional) arguments for the function.
Can be skipped.
+ * @param {int|bool} expected what the function should return
*/
var testStateFunction = function( currentState, fnName, args,
expected ) {
if( expected === undefined ) {
--
To view, visit https://gerrit.wikimedia.org/r/135420
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I47988f27230e3d14f767e5fe393ef58e3d828b2d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits