`Drupal.Commenting.FunctionComment.InvalidReturn` breaks on intersection return type annotations

Created on 14 August 2022, almost 2 years ago
Updated 28 April 2023, about 1 year ago

Problem/Motivation

The Drupal.Commenting.FunctionComment.InvalidReturn sniff apparently does not like union types in return values.

 19 | ERROR | [x] Expected "\Drupal\user\EntityOwnerInterface\Drupal\Core\Entity\ContentEntityInterface" but found "\Drupal\user\EntityOwnerInterface&\Drupal\Core\Entity\ContentEntityInterface" for function return
    |       |     type (Drupal.Commenting.FunctionComment.InvalidReturn)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

8.3

Component

Coder Sniffer

Created by

πŸ‡ΊπŸ‡ΈUnited States bradjones1 Digital Nomad Life

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.69.0 2024