Make WordPress Core


Ignore:
Timestamp:
09/11/2026 06:29:08 AM (7 hours ago)
Author:
afercia
Message:

General: Enable the JSDoc rule require-param-description.

Enables the JSDoc rule require-param-description and fixes all the reported violations.
Part of the effort to improve JS inline documentation for 7.2.

Developed in https://github.com/WordPress/wordpress-develop/pull/13475

Props afercia, westonruter.
See #66033.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/media/models/attachments.js

    r63521 r63598  
    3131         * Initializes the Attachments collection.
    3232         *
    33          * @param {Array} [models=[]] Array of models used to populate the collection.
    34          * @param {Object} [options={}]
     33         * @param {Array}  [models=[]]  Optional. Array of models used to populate the collection.
     34         * @param {Object} [options={}] Optional. Additional options for the collection.
    3535         */
    3636        initialize: function( models, options ) {
     
    8282         * @access private
    8383         *
    84          * @param {Backbone.Model} model
    85          * @param {string} orderby
     84         * @param {Backbone.Model} model   The model that triggered the change.
     85         * @param {string}         orderby The new orderby value.
    8686         */
    8787        _changeOrderby: function( model, orderby ) {
     
    102102         * @access private
    103103         *
    104          * @param {Backbone.Model} model
    105          * @param {boolean} query
     104         * @param {Backbone.Model} model The model that triggered the change.
     105         * @param {boolean}        query The new query value.
    106106         */
    107107        _changeQuery: function( model, query ) {
     
    118118         * @access private
    119119         *
    120          * @param {Backbone.Model} model
     120         * @param {Backbone.Model} model The model that triggered the change.
    121121         */
    122122        _changeFilteredProps: function( model ) {
     
    164164         * Checks whether an attachment is valid.
    165165         *
    166          * @param {wp.media.model.Attachment} attachment
     166         * @param {wp.media.model.Attachment} attachment The attachment to validate.
    167167         * @return {boolean} True if the attachment is valid, false otherwise.
    168168         */
     
    179179         * Adds or removes an attachment to the collection depending on its validity.
    180180         *
    181          * @param {wp.media.model.Attachment} attachment
    182          * @param {Object} options
     181         * @param {wp.media.model.Attachment} attachment The attachment to validate and potentially add or remove.
     182         * @param {Object}                    options    Additional options for the operation.
    183183         * @return {wp.media.model.Attachments} Returns itself to allow chaining.
    184184         */
     
    199199         * Adds or removes all attachments from another collection depending on each one's validity.
    200200         *
    201          * @param {wp.media.model.Attachments} attachments
    202          * @param {Object} [options={}]
     201         * @param {wp.media.model.Attachments} attachments  The attachments collection to validate against.
     202         * @param {Object}                     [options={}] Additional options for the operation.
    203203         *
    204204         * @fires wp.media.model.Attachments#reset
     
    282282         * @access private
    283283         *
    284          * @param {wp.media.model.Attachments} attachment
    285          * @param {wp.media.model.Attachments} attachments
    286          * @param {Object} options
     284         * @param {wp.media.model.Attachments} attachment  The attachment to validate.
     285         * @param {wp.media.model.Attachments} attachments The attachments collection the attachment belongs to.
     286         * @param {Object}                     options     Additional options for the operation.
    287287         *
    288288         * @return {wp.media.model.Attachments} Returns itself to allow chaining.
     
    302302         * @access private
    303303         *
    304          * @param {wp.media.model.Attachments} attachments
    305          * @param {Object} options
     304         * @param {wp.media.model.Attachments} attachments The attachments collection to validate against.
     305         * @param {Object}                     options     Additional options for the operation.
    306306         * @return {wp.media.model.Attachments} Returns itself to allow chaining.
    307307         */
     
    356356         * server persistence by itself.
    357357         *
    358          * @param {Object} options
     358         * @param {Object} options Additional options for the operation.
    359359         * @return {Promise} A promise that resolves when the request is complete.
    360360         */
     
    425425         *
    426426         * @param {Object|Array} response The raw response Object/Array.
    427          * @param {Object} xhr
     427         * @param {Object}       xhr      The XMLHttpRequest object.
    428428         * @return {Array} The array of model attributes to be added to the collection
    429429         */
     
    506506         * and its subclasses. @see wp.media.model.Attachments._changeOrderby().
    507507         *
    508          * @param {Backbone.Model} a
    509          * @param {Backbone.Model} b
    510          * @param {Object} options
     508         * @param {Backbone.Model} a       The first attachment model to compare.
     509         * @param {Backbone.Model} b       The second attachment model to compare.
     510         * @param {Object}         options Additional options for the comparison.
    511511         * @return {number} -1 if the first model should come before the second,
    512512         *                   0 if they are of the same rank and
     
    543543                 * to our server-side searching.
    544544                 *
    545                  * @param {wp.media.model.Attachment} attachment
     545                 * @param {wp.media.model.Attachment} attachment The attachment to filter based on the search query.
    546546                 *
    547547                 * @this wp.media.model.Attachments
     
    563563                 *
    564564                 * @static
    565                  * @param {wp.media.model.Attachment} attachment
     565                 * @param {wp.media.model.Attachment} attachment The attachment to filter based on its type.
    566566                 *
    567567                 * @this wp.media.model.Attachments
     
    592592                 *
    593593                 * @static
    594                  * @param {wp.media.model.Attachment} attachment
     594                 * @param {wp.media.model.Attachment} attachment The attachment to filter based on its uploadedTo property.
    595595                 *
    596596                 * @this wp.media.model.Attachments
     
    610610                 *
    611611                 * @static
    612                  * @param {wp.media.model.Attachment} attachment
     612                 * @param {wp.media.model.Attachment} attachment The attachment to filter based on its status property.
    613613                 *
    614614                 * @this wp.media.model.Attachments
Note: See TracChangeset for help on using the changeset viewer.