mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Remove docs that repeat what the code already says
Just reading the method signature gives the exact same information in these cases. In other words, this code is able to explain itself. Change-Id: I04d031f2b24c3b0d21fede2c19c64b54d30b5b0c
This commit is contained in:
parent
df5238cd11
commit
35de3aa143
|
@ -41,28 +41,21 @@ OO.mixinClass( ve.dm.MWParameterModel, OO.EventEmitter );
|
|||
/* Methods */
|
||||
|
||||
/**
|
||||
* Check if parameter is required.
|
||||
*
|
||||
* @return {boolean} Parameter is required
|
||||
* @return {boolean}
|
||||
*/
|
||||
ve.dm.MWParameterModel.prototype.isRequired = function () {
|
||||
return this.template.getSpec().isParameterRequired( this.name );
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if parameter is suggested.
|
||||
*
|
||||
* @param {string} name Parameter name
|
||||
* @return {boolean} Parameter is suggested
|
||||
* @return {boolean}
|
||||
*/
|
||||
ve.dm.MWParameterModel.prototype.isSuggested = function () {
|
||||
return this.template.getSpec().isParameterSuggested( this.name );
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if parameter is deprecated.
|
||||
*
|
||||
* @return {boolean} Parameter is deprecated
|
||||
* @return {boolean}
|
||||
*/
|
||||
ve.dm.MWParameterModel.prototype.isDeprecated = function () {
|
||||
return this.template.getSpec().isParameterDeprecated( this.name );
|
||||
|
@ -105,8 +98,6 @@ ve.dm.MWParameterModel.prototype.getOriginalName = function () {
|
|||
};
|
||||
|
||||
/**
|
||||
* Get parameter value.
|
||||
*
|
||||
* @return {string} Parameter value, or automatic value if there is none stored.
|
||||
* Otherwise an empty string.
|
||||
*/
|
||||
|
@ -115,18 +106,14 @@ ve.dm.MWParameterModel.prototype.getValue = function () {
|
|||
};
|
||||
|
||||
/**
|
||||
* Get parameter suggested values.
|
||||
*
|
||||
* @return {string[]} Parameter suggested values
|
||||
* @return {string[]}
|
||||
*/
|
||||
ve.dm.MWParameterModel.prototype.getSuggestedValues = function () {
|
||||
return this.template.getSpec().getParameterSuggestedValues( this.name );
|
||||
};
|
||||
|
||||
/**
|
||||
* Get default parameter value.
|
||||
*
|
||||
* @return {string} Default parameter value
|
||||
* @return {string}
|
||||
*/
|
||||
ve.dm.MWParameterModel.prototype.getDefaultValue = function () {
|
||||
return this.template.getSpec().getParameterDefaultValue( this.name );
|
||||
|
@ -142,27 +129,21 @@ ve.dm.MWParameterModel.prototype.getExampleValue = function () {
|
|||
};
|
||||
|
||||
/**
|
||||
* Get automatic parameter value.
|
||||
*
|
||||
* @return {string} Automatic parameter name.
|
||||
* @return {string}
|
||||
*/
|
||||
ve.dm.MWParameterModel.prototype.getAutoValue = function () {
|
||||
return this.template.getSpec().getParameterAutoValue( this.name );
|
||||
};
|
||||
|
||||
/**
|
||||
* Get parameter type.
|
||||
*
|
||||
* @return {string} Parameter type
|
||||
* @return {string} Parameter type, e.g. "string"
|
||||
*/
|
||||
ve.dm.MWParameterModel.prototype.getType = function () {
|
||||
return this.template.getSpec().getParameterType( this.name );
|
||||
};
|
||||
|
||||
/**
|
||||
* Set parameter value.
|
||||
*
|
||||
* @param {string} value Parameter value
|
||||
* @param {string} value
|
||||
*/
|
||||
ve.dm.MWParameterModel.prototype.setValue = function ( value ) {
|
||||
this.value = value;
|
||||
|
|
|
@ -140,8 +140,6 @@ ve.dm.MWTemplateModel.prototype.getParameters = function () {
|
|||
};
|
||||
|
||||
/**
|
||||
* Get a parameter.
|
||||
*
|
||||
* @param {string} name Parameter name
|
||||
* @return {ve.dm.MWParameterModel} Parameter
|
||||
*/
|
||||
|
|
|
@ -52,10 +52,8 @@ OO.mixinClass( ve.init.mw.ApiResponseCache, OO.EventEmitter );
|
|||
ve.init.mw.ApiResponseCache.static.processPage = null;
|
||||
|
||||
/**
|
||||
* Normalize the title of the response
|
||||
*
|
||||
* @param {string} title Title
|
||||
* @return {string} Normalized title
|
||||
* @param {string} title
|
||||
* @return {string}
|
||||
*/
|
||||
ve.init.mw.ApiResponseCache.static.normalizeTitle = function ( title ) {
|
||||
var titleObj = mw.Title.newFromText( title );
|
||||
|
|
Loading…
Reference in a new issue