Fix Drupal.Commenting.FunctionComment.MissingReturnComment in non-tests

Created on 24 November 2024, 5 months ago

Problem/Motivation

Fix the sniff for non-tests in core, excluding core/lib/Drupal/Core/*.

Steps to reproduce

Proposed resolution

This adds a comment in most cases. There are a few like the following that use an ignore line instead. This retains the more specific return type which mstrlen states assists with static analysis.

  /**
   * {@inheritdoc}
   *
   * @return \Drupal\Core\Entity\EntityTypeInterface[]
   */
  // phpcs:ignore Drupal.Commenting.FunctionComment.MissingReturnComment
  public function getDefinitions();

Remaining tasks

Perhaps add a followup for the ignore lines or rely on existing work to add return type hints.

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Needs review

Version

11.0 🔥

Component

other

Created by

🇳🇿New Zealand quietone

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024