Problem with Drupal.Commenting.FunctionComment.ParamCommentFullStop: Lists

Created on 6 April 2021, about 4 years ago
Updated 13 February 2025, about 2 months ago

Problem/Motivation

In #2721309: Fix Drupal.Commenting.FunctionComment.ParamCommentFullStop we are trying to implement "Drupal.Commenting.FunctionComment.ParamCommentFullStop", but we run in to some troubles.

Currently the sniff requires a full stop at the end of a list.

The following code:

  /**
   * Saves the override.
   *
   * @param string $id
   *   A menu link plugin ID.
   * @param array $definition
   *   The definition values to override. Supported keys:
   *   - menu_name
   *   - parent
   *   - weight
   *   - expanded
   *   - enabled
   *
   * @return array
   *   A list of properties which got saved.
   */
  public function loadOverride($id);

when sniffed comes back with:

-------------------------------------------------------------------------------------
 75 | ERROR | [x] Parameter comment must end with a full stop
-------------------------------------------------------------------------------------

That goes away when we put a full stop at the end of the list like so:

  /**
   * Saves the override.
   *
   * @param string $id
   *   A menu link plugin ID.
   * @param array $definition
   *   The definition values to override. Supported keys:
   *   - menu_name
   *   - parent
   *   - weight
   *   - expanded
   *   - enabled.
   *
   * @return array
   *   A list of properties which got saved.
   */

However, this has been deemed confusing.

Steps to reproduce

Proposed resolution

Change "Drupal.Commenting.FunctionComment.ParamCommentFullStop", so that it does not check for a fullstop at the end of a list.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

8.3

Component

Coder Sniffer

Created by

🇳🇱Netherlands spokje

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024