From 136254a5aa5788ad4d3c67526f017e4625195a6f Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 6 Mar 2014 16:08:47 +0100 Subject: [PATCH] jsduck: Clean up odd use of @returns instead of @return The fast majority in core uses @return, a handful were using @returns though (which works because JSDuck supports it as alias for @return). Also cleaned up minor things in touched areas: * Hoist second description for jQuery.matchSrcSet (there can only be one, it was currently interpreted as continuation of the @return caption). * Remove redundant @method. Change-Id: I15d1d023f0424e38c58a252139e6bb2f0b36d2b4 --- resources/jquery/jquery.client.js | 4 ++-- resources/jquery/jquery.hidpi.js | 10 ++++------ resources/jquery/jquery.localize.js | 2 +- resources/mediawiki/mediawiki.js | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/resources/jquery/jquery.client.js b/resources/jquery/jquery.client.js index 4c6a7ac6b1..6689b7cb3c 100644 --- a/resources/jquery/jquery.client.js +++ b/resources/jquery/jquery.client.js @@ -20,7 +20,7 @@ * * @param {Object} nav An object with atleast a 'userAgent' and 'platform' key. * Defaults to the global Navigator object. - * @returns {Object} The resulting client object will be in the following format: + * @return {Object} The resulting client object will be in the following format: * { * 'name': 'firefox', * 'layout': 'gecko', @@ -231,7 +231,7 @@ * @param {boolean} [exactMatchOnly=false] Only return true if the browser is matched, otherwise * returns true if the browser is not found. * - * @returns {boolean} The current browser is in the support map + * @return {boolean} The current browser is in the support map */ test: function ( map, profile, exactMatchOnly ) { /*jshint evil: true */ diff --git a/resources/jquery/jquery.hidpi.js b/resources/jquery/jquery.hidpi.js index 70bfc4ea3c..eb29db9906 100644 --- a/resources/jquery/jquery.hidpi.js +++ b/resources/jquery/jquery.hidpi.js @@ -16,8 +16,7 @@ * * Uses window.devicePixelRatio if available, or CSS media queries on IE. * - * @method - * @returns {number} Device pixel ratio + * @return {number} Device pixel ratio */ $.devicePixelRatio = function () { if ( window.devicePixelRatio !== undefined ) { @@ -51,8 +50,7 @@ $.devicePixelRatio = function () { * Implement responsive images based on srcset attributes, if browser has no * native srcset support. * - * @method - * @returns {jQuery} This selection + * @return {jQuery} This selection */ $.fn.hidpi = function () { var $target = this, @@ -81,11 +79,11 @@ $.fn.hidpi = function () { /** * Match a srcset entry for the given device pixel ratio * + * Exposed for testing. + * * @param {number} devicePixelRatio * @param {string} srcset * @return {mixed} null or the matching src string - * - * Exposed for testing. */ $.matchSrcSet = function ( devicePixelRatio, srcset ) { var candidates, diff --git a/resources/jquery/jquery.localize.js b/resources/jquery/jquery.localize.js index d9a2b199f3..e0d9de2bc4 100644 --- a/resources/jquery/jquery.localize.js +++ b/resources/jquery/jquery.localize.js @@ -9,7 +9,7 @@ * * @param {Object} options * @param {string} key - * @returns {string} Localized message + * @return {string} Localized message */ function msg( options, key ) { var args = options.params[key] || []; diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js index a7c946d0a2..597f396f53 100644 --- a/resources/mediawiki/mediawiki.js +++ b/resources/mediawiki/mediawiki.js @@ -381,7 +381,7 @@ var mw = ( function ( $, undefined ) { * values with microsecond precision that are guaranteed to be monotonic. On all other browsers, * it will fall back to using `Date`. * - * @returns {number} Current time + * @return {number} Current time */ now: ( function () { var perf = window.performance, -- 2.20.1